diff --git a/.github/workflows/osx_arm64.yml b/.github/workflows/osx_arm64.yml new file mode 100644 index 00000000..bb02df48 --- /dev/null +++ b/.github/workflows/osx_arm64.yml @@ -0,0 +1,2845 @@ +jobs: + stage_0_job_0: + name: mutex urdfdom-headers urdfdom urdfdom-py + runs-on: macos-14 + strategy: + fail-fast: false + needs: [] + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros2-distro-mutex ros-jazzy-urdfdom-headers ros-jazzy-urdfdom ros-jazzy-urdfdom-py + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros2-distro-mutex ros-jazzy-urdfdom-headers ros-jazzy-urdfdom + ros-jazzy-urdfdom-py + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_1_job_1: + name: ament-package ament-cmake-core ros-workspace ros-environment + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_0_job_0 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-package ros-jazzy-ament-cmake-core ros-jazzy-ros-workspace + ros-jazzy-ros-environment + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-package ros-jazzy-ament-cmake-core ros-jazzy-ros-workspace + ros-jazzy-ros-environment + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_2_job_2: + name: ament-lint ament-cmake-python gtest-vendor ament-cmake-libraries ament-cmake-include-directories + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_1_job_1 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-lint ros-jazzy-ament-cmake-python ros-jazzy-gtest-vendor + ros-jazzy-ament-cmake-libraries ros-jazzy-ament-cmake-include-directories + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-lint ros-jazzy-ament-cmake-python ros-jazzy-gtest-vendor + ros-jazzy-ament-cmake-libraries ros-jazzy-ament-cmake-include-directories + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_2_job_3: + name: ament-cmake-export-libraries ament-cmake-version ament-cmake-export-link-flags + ament-cmake-export-include-directories ament-cmake-export-definitions + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_1_job_1 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-cmake-export-libraries ros-jazzy-ament-cmake-version + ros-jazzy-ament-cmake-export-link-flags ros-jazzy-ament-cmake-export-include-directories + ros-jazzy-ament-cmake-export-definitions + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-cmake-export-libraries ros-jazzy-ament-cmake-version + ros-jazzy-ament-cmake-export-link-flags ros-jazzy-ament-cmake-export-include-directories + ros-jazzy-ament-cmake-export-definitions + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_2_job_4: + name: ament-pycodestyle osrf-pycommon google-benchmark-vendor osrf-testing-tools-cpp + test-interface-files + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_1_job_1 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-pycodestyle ros-jazzy-osrf-pycommon ros-jazzy-google-benchmark-vendor + ros-jazzy-osrf-testing-tools-cpp ros-jazzy-test-interface-files + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-pycodestyle ros-jazzy-osrf-pycommon ros-jazzy-google-benchmark-vendor + ros-jazzy-osrf-testing-tools-cpp ros-jazzy-test-interface-files + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_2_job_5: + name: iceoryx-hoofs sdformat-test-files ruckig ompl gtsam + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_1_job_1 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-iceoryx-hoofs ros-jazzy-sdformat-test-files ros-jazzy-ruckig + ros-jazzy-ompl ros-jazzy-gtsam + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-iceoryx-hoofs ros-jazzy-sdformat-test-files ros-jazzy-ruckig + ros-jazzy-ompl ros-jazzy-gtsam + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_2_job_6: + name: ros-industrial-cmake-boilerplate apriltag + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_1_job_1 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ros-industrial-cmake-boilerplate ros-jazzy-apriltag + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ros-industrial-cmake-boilerplate ros-jazzy-apriltag + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_3_job_7: + name: ament-flake8 ament-cmake-test ament-cmake-export-dependencies ament-cmake-target-dependencies + ament-cmake-export-targets + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_2_job_2 + - stage_2_job_3 + - stage_2_job_4 + - stage_2_job_5 + - stage_2_job_6 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-flake8 ros-jazzy-ament-cmake-test ros-jazzy-ament-cmake-export-dependencies + ros-jazzy-ament-cmake-target-dependencies ros-jazzy-ament-cmake-export-targets + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-flake8 ros-jazzy-ament-cmake-test ros-jazzy-ament-cmake-export-dependencies + ros-jazzy-ament-cmake-target-dependencies ros-jazzy-ament-cmake-export-targets + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_3_job_8: + name: ament-cmake-export-interfaces gmock-vendor iceoryx-posh backward-ros stomp + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_2_job_2 + - stage_2_job_3 + - stage_2_job_4 + - stage_2_job_5 + - stage_2_job_6 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-cmake-export-interfaces ros-jazzy-gmock-vendor ros-jazzy-iceoryx-posh + ros-jazzy-backward-ros ros-jazzy-stomp + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-cmake-export-interfaces ros-jazzy-gmock-vendor + ros-jazzy-iceoryx-posh ros-jazzy-backward-ros ros-jazzy-stomp + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_4_job_9: + name: ament-pep257 ament-cmake-gtest ament-cmake-vendor-package ament-mypy ament-lint-auto + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_3_job_7 + - stage_3_job_8 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-pep257 ros-jazzy-ament-cmake-gtest ros-jazzy-ament-cmake-vendor-package + ros-jazzy-ament-mypy ros-jazzy-ament-lint-auto + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-pep257 ros-jazzy-ament-cmake-gtest ros-jazzy-ament-cmake-vendor-package + ros-jazzy-ament-mypy ros-jazzy-ament-lint-auto + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_4_job_10: + name: ament-cmake-pytest ament-cmake-google-benchmark iceoryx-binding-c ament-cmake-catch2 + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_3_job_7 + - stage_3_job_8 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-cmake-pytest ros-jazzy-ament-cmake-google-benchmark + ros-jazzy-iceoryx-binding-c ros-jazzy-ament-cmake-catch2 + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-cmake-pytest ros-jazzy-ament-cmake-google-benchmark + ros-jazzy-iceoryx-binding-c ros-jazzy-ament-cmake-catch2 + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_5_job_11: + name: ament-copyright ament-cmake-gen-version-h ament-cmake-gmock cyclonedds + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_4_job_9 + - stage_4_job_10 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-copyright ros-jazzy-ament-cmake-gen-version-h ros-jazzy-ament-cmake-gmock + ros-jazzy-cyclonedds + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-copyright ros-jazzy-ament-cmake-gen-version-h + ros-jazzy-ament-cmake-gmock ros-jazzy-cyclonedds + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_6_job_12: + name: ament-lint-cmake ament-cmake ament-xmllint ament-cpplint ament-cppcheck + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_5_job_11 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-lint-cmake ros-jazzy-ament-cmake ros-jazzy-ament-xmllint + ros-jazzy-ament-cpplint ros-jazzy-ament-cppcheck + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-lint-cmake ros-jazzy-ament-cmake ros-jazzy-ament-xmllint + ros-jazzy-ament-cpplint ros-jazzy-ament-cppcheck + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_6_job_13: + name: ament-index-python domain-coordinator generate-parameter-library-py ament-clang-format + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_5_job_11 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-index-python ros-jazzy-domain-coordinator ros-jazzy-generate-parameter-library-py + ros-jazzy-ament-clang-format + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-index-python ros-jazzy-domain-coordinator + ros-jazzy-generate-parameter-library-py ros-jazzy-ament-clang-format + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_7_job_14: + name: ament-cmake-lint-cmake uncrustify-vendor launch rosidl-cli fastcdr + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_6_job_12 + - stage_6_job_13 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-cmake-lint-cmake ros-jazzy-uncrustify-vendor ros-jazzy-launch + ros-jazzy-rosidl-cli ros-jazzy-fastcdr + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-cmake-lint-cmake ros-jazzy-uncrustify-vendor + ros-jazzy-launch ros-jazzy-rosidl-cli ros-jazzy-fastcdr + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_7_job_15: + name: rpyutils tl-expected tcb-span pybind11-vendor tinyxml2-vendor + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_6_job_12 + - stage_6_job_13 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rpyutils ros-jazzy-tl-expected ros-jazzy-tcb-span ros-jazzy-pybind11-vendor + ros-jazzy-tinyxml2-vendor + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rpyutils ros-jazzy-tl-expected ros-jazzy-tcb-span + ros-jazzy-pybind11-vendor ros-jazzy-tinyxml2-vendor + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_7_job_16: + name: ros2-control-test-assets yaml-cpp-vendor zstd-vendor liblz4-vendor sqlite3-vendor + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_6_job_12 + - stage_6_job_13 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ros2-control-test-assets ros-jazzy-yaml-cpp-vendor ros-jazzy-zstd-vendor + ros-jazzy-liblz4-vendor ros-jazzy-sqlite3-vendor + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ros2-control-test-assets ros-jazzy-yaml-cpp-vendor + ros-jazzy-zstd-vendor ros-jazzy-liblz4-vendor ros-jazzy-sqlite3-vendor + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_7_job_17: + name: libcurl-vendor xacro moveit-resources-panda-description random-numbers eigen-stl-containers + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_6_job_12 + - stage_6_job_13 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-libcurl-vendor ros-jazzy-xacro ros-jazzy-moveit-resources-panda-description + ros-jazzy-random-numbers ros-jazzy-eigen-stl-containers + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-libcurl-vendor ros-jazzy-xacro ros-jazzy-moveit-resources-panda-description + ros-jazzy-random-numbers ros-jazzy-eigen-stl-containers + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_7_job_18: + name: moveit-resources-pr2-description moveit-common angles moveit-resources-fanuc-description + ament-cmake-auto + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_6_job_12 + - stage_6_job_13 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-moveit-resources-pr2-description ros-jazzy-moveit-common + ros-jazzy-angles ros-jazzy-moveit-resources-fanuc-description ros-jazzy-ament-cmake-auto + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-moveit-resources-pr2-description ros-jazzy-moveit-common + ros-jazzy-angles ros-jazzy-moveit-resources-fanuc-description ros-jazzy-ament-cmake-auto + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_7_job_19: + name: sdl2-vendor + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_6_job_12 + - stage_6_job_13 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-sdl2-vendor + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-sdl2-vendor + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_8_job_20: + name: ament-cmake-copyright ament-uncrustify launch-yaml launch-xml mcap-vendor + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_7_job_14 + - stage_7_job_15 + - stage_7_job_16 + - stage_7_job_17 + - stage_7_job_18 + - stage_7_job_19 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-cmake-copyright ros-jazzy-ament-uncrustify ros-jazzy-launch-yaml + ros-jazzy-launch-xml ros-jazzy-mcap-vendor + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-cmake-copyright ros-jazzy-ament-uncrustify + ros-jazzy-launch-yaml ros-jazzy-launch-xml ros-jazzy-mcap-vendor + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_8_job_21: + name: moveit-resources-prbt-support + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_7_job_14 + - stage_7_job_15 + - stage_7_job_16 + - stage_7_job_17 + - stage_7_job_18 + - stage_7_job_19 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-moveit-resources-prbt-support + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-moveit-resources-prbt-support + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_9_job_22: + name: ament-cmake-xmllint ament-cmake-uncrustify ament-cmake-pep257 ament-cmake-flake8 + ament-cmake-cpplint + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_8_job_20 + - stage_8_job_21 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-cmake-xmllint ros-jazzy-ament-cmake-uncrustify ros-jazzy-ament-cmake-pep257 + ros-jazzy-ament-cmake-flake8 ros-jazzy-ament-cmake-cpplint + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-cmake-xmllint ros-jazzy-ament-cmake-uncrustify + ros-jazzy-ament-cmake-pep257 ros-jazzy-ament-cmake-flake8 ros-jazzy-ament-cmake-cpplint + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_9_job_23: + name: ament-cmake-cppcheck launch-testing eigen3-cmake-module ament-cmake-clang-format + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_8_job_20 + - stage_8_job_21 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-cmake-cppcheck ros-jazzy-launch-testing ros-jazzy-eigen3-cmake-module + ros-jazzy-ament-cmake-clang-format + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-cmake-cppcheck ros-jazzy-launch-testing ros-jazzy-eigen3-cmake-module + ros-jazzy-ament-cmake-clang-format + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_10_job_24: + name: ament-lint-common foonathan-memory-vendor gz-cmake-vendor rviz-ogre-vendor + rviz-assimp-vendor + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_9_job_22 + - stage_9_job_23 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-lint-common ros-jazzy-foonathan-memory-vendor ros-jazzy-gz-cmake-vendor + ros-jazzy-rviz-ogre-vendor ros-jazzy-rviz-assimp-vendor + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-lint-common ros-jazzy-foonathan-memory-vendor + ros-jazzy-gz-cmake-vendor ros-jazzy-rviz-ogre-vendor ros-jazzy-rviz-assimp-vendor + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_10_job_25: + name: gz-ogre-next-vendor gz-dartsim-vendor launch-pytest + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_9_job_22 + - stage_9_job_23 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-gz-ogre-next-vendor ros-jazzy-gz-dartsim-vendor ros-jazzy-launch-pytest + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-gz-ogre-next-vendor ros-jazzy-gz-dartsim-vendor + ros-jazzy-launch-pytest + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_11_job_26: + name: python-cmake-module rosidl-adapter performance-test-fixture mimick-vendor + ament-cmake-ros + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_10_job_24 + - stage_10_job_25 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-python-cmake-module ros-jazzy-rosidl-adapter ros-jazzy-performance-test-fixture + ros-jazzy-mimick-vendor ros-jazzy-ament-cmake-ros + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-python-cmake-module ros-jazzy-rosidl-adapter ros-jazzy-performance-test-fixture + ros-jazzy-mimick-vendor ros-jazzy-ament-cmake-ros + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_11_job_27: + name: rosidl-typesupport-interface fastrtps-cmake-module fastrtps rti-connext-dds-cmake-module + rmw-implementation-cmake + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_10_job_24 + - stage_10_job_25 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rosidl-typesupport-interface ros-jazzy-fastrtps-cmake-module + ros-jazzy-fastrtps ros-jazzy-rti-connext-dds-cmake-module ros-jazzy-rmw-implementation-cmake + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rosidl-typesupport-interface ros-jazzy-fastrtps-cmake-module + ros-jazzy-fastrtps ros-jazzy-rti-connext-dds-cmake-module ros-jazzy-rmw-implementation-cmake + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_11_job_28: + name: ament-index-cpp spdlog-vendor gz-utils-vendor gz-tools-vendor orocos-kdl-vendor + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_10_job_24 + - stage_10_job_25 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ament-index-cpp ros-jazzy-spdlog-vendor ros-jazzy-gz-utils-vendor + ros-jazzy-gz-tools-vendor ros-jazzy-orocos-kdl-vendor + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ament-index-cpp ros-jazzy-spdlog-vendor ros-jazzy-gz-utils-vendor + ros-jazzy-gz-tools-vendor ros-jazzy-orocos-kdl-vendor + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_11_job_29: + name: python-qt-binding smclib osqp-vendor tango-icons-vendor keyboard-handler + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_10_job_24 + - stage_10_job_25 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-python-qt-binding ros-jazzy-smclib ros-jazzy-osqp-vendor + ros-jazzy-tango-icons-vendor ros-jazzy-keyboard-handler + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-python-qt-binding ros-jazzy-smclib ros-jazzy-osqp-vendor + ros-jazzy-tango-icons-vendor ros-jazzy-keyboard-handler + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_12_job_30: + name: launch-testing-ament-cmake rosidl-parser tracetools libyaml-vendor console-bridge-vendor + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_11_job_26 + - stage_11_job_27 + - stage_11_job_28 + - stage_11_job_29 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-launch-testing-ament-cmake ros-jazzy-rosidl-parser ros-jazzy-tracetools + ros-jazzy-libyaml-vendor ros-jazzy-console-bridge-vendor + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-launch-testing-ament-cmake ros-jazzy-rosidl-parser + ros-jazzy-tracetools ros-jazzy-libyaml-vendor ros-jazzy-console-bridge-vendor + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_12_job_31: + name: urdf-parser-plugin gz-math-vendor resource-retriever gz-plugin-vendor qt-gui + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_11_job_26 + - stage_11_job_27 + - stage_11_job_28 + - stage_11_job_29 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-urdf-parser-plugin ros-jazzy-gz-math-vendor ros-jazzy-resource-retriever + ros-jazzy-gz-plugin-vendor ros-jazzy-qt-gui + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-urdf-parser-plugin ros-jazzy-gz-math-vendor ros-jazzy-resource-retriever + ros-jazzy-gz-plugin-vendor ros-jazzy-qt-gui + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_12_job_32: + name: qt-gui-py-common tracetools-image-pipeline qt-dotgraph + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_11_job_26 + - stage_11_job_27 + - stage_11_job_28 + - stage_11_job_29 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-qt-gui-py-common ros-jazzy-tracetools-image-pipeline ros-jazzy-qt-dotgraph + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-qt-gui-py-common ros-jazzy-tracetools-image-pipeline + ros-jazzy-qt-dotgraph + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_13_job_33: + name: rcutils rosidl-pycommon rosidl-generator-type-description sdformat-vendor + rviz-rendering + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_12_job_30 + - stage_12_job_31 + - stage_12_job_32 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rcutils ros-jazzy-rosidl-pycommon ros-jazzy-rosidl-generator-type-description + ros-jazzy-sdformat-vendor ros-jazzy-rviz-rendering + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rcutils ros-jazzy-rosidl-pycommon ros-jazzy-rosidl-generator-type-description + ros-jazzy-sdformat-vendor ros-jazzy-rviz-rendering + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_13_job_34: + name: gz-msgs-vendor gz-common-vendor + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_12_job_30 + - stage_12_job_31 + - stage_12_job_32 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-gz-msgs-vendor ros-jazzy-gz-common-vendor + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-gz-msgs-vendor ros-jazzy-gz-common-vendor + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_14_job_35: + name: rosidl-runtime-c rosidl-cmake rcpputils rviz-rendering-tests gz-transport-vendor + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_13_job_33 + - stage_13_job_34 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rosidl-runtime-c ros-jazzy-rosidl-cmake ros-jazzy-rcpputils + ros-jazzy-rviz-rendering-tests ros-jazzy-gz-transport-vendor + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rosidl-runtime-c ros-jazzy-rosidl-cmake ros-jazzy-rcpputils + ros-jazzy-rviz-rendering-tests ros-jazzy-gz-transport-vendor + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_14_job_36: + name: gz-rendering-vendor gz-physics-vendor gz-fuel-tools-vendor + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_13_job_33 + - stage_13_job_34 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-gz-rendering-vendor ros-jazzy-gz-physics-vendor ros-jazzy-gz-fuel-tools-vendor + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-gz-rendering-vendor ros-jazzy-gz-physics-vendor + ros-jazzy-gz-fuel-tools-vendor + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_15_job_37: + name: rosidl-runtime-cpp rosidl-generator-c rosidl-dynamic-typesupport rcl-logging-interface + class-loader + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_14_job_35 + - stage_14_job_36 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rosidl-runtime-cpp ros-jazzy-rosidl-generator-c ros-jazzy-rosidl-dynamic-typesupport + ros-jazzy-rcl-logging-interface ros-jazzy-class-loader + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rosidl-runtime-cpp ros-jazzy-rosidl-generator-c + ros-jazzy-rosidl-dynamic-typesupport ros-jazzy-rcl-logging-interface ros-jazzy-class-loader + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_15_job_38: + name: gz-sensors-vendor gz-gui-vendor + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_14_job_35 + - stage_14_job_36 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-gz-sensors-vendor ros-jazzy-gz-gui-vendor + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-gz-sensors-vendor ros-jazzy-gz-gui-vendor + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_16_job_39: + name: rosidl-generator-cpp rmw rosidl-typesupport-introspection-c rosidl-dynamic-typesupport-fastrtps + rcl-logging-spdlog + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_15_job_37 + - stage_15_job_38 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rosidl-generator-cpp ros-jazzy-rmw ros-jazzy-rosidl-typesupport-introspection-c + ros-jazzy-rosidl-dynamic-typesupport-fastrtps ros-jazzy-rcl-logging-spdlog + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rosidl-generator-cpp ros-jazzy-rmw ros-jazzy-rosidl-typesupport-introspection-c + ros-jazzy-rosidl-dynamic-typesupport-fastrtps ros-jazzy-rcl-logging-spdlog + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_16_job_40: + name: pluginlib gz-sim-vendor + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_15_job_37 + - stage_15_job_38 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-pluginlib ros-jazzy-gz-sim-vendor + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-pluginlib ros-jazzy-gz-sim-vendor + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_17_job_41: + name: rosidl-typesupport-fastrtps-cpp rosidl-typesupport-introspection-cpp rcl-yaml-param-parser + urdf qt-gui-cpp + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_16_job_39 + - stage_16_job_40 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rosidl-typesupport-fastrtps-cpp ros-jazzy-rosidl-typesupport-introspection-cpp + ros-jazzy-rcl-yaml-param-parser ros-jazzy-urdf ros-jazzy-qt-gui-cpp + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rosidl-typesupport-fastrtps-cpp ros-jazzy-rosidl-typesupport-introspection-cpp + ros-jazzy-rcl-yaml-param-parser ros-jazzy-urdf ros-jazzy-qt-gui-cpp + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_18_job_42: + name: rosidl-typesupport-fastrtps-c sdformat-urdf kdl-parser srdfdom + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_17_job_41 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rosidl-typesupport-fastrtps-c ros-jazzy-sdformat-urdf + ros-jazzy-kdl-parser ros-jazzy-srdfdom + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rosidl-typesupport-fastrtps-c ros-jazzy-sdformat-urdf + ros-jazzy-kdl-parser ros-jazzy-srdfdom + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_19_job_43: + name: rosidl-typesupport-c rosidl-typesupport-cpp rosidl-generator-py + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_18_job_42 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rosidl-typesupport-c ros-jazzy-rosidl-typesupport-cpp + ros-jazzy-rosidl-generator-py + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rosidl-typesupport-c ros-jazzy-rosidl-typesupport-cpp + ros-jazzy-rosidl-generator-py + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_20_job_44: + name: rosidl-core-runtime rosidl-core-generators builtin-interfaces unique-identifier-msgs + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_19_job_43 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rosidl-core-runtime ros-jazzy-rosidl-core-generators ros-jazzy-builtin-interfaces + ros-jazzy-unique-identifier-msgs + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rosidl-core-runtime ros-jazzy-rosidl-core-generators + ros-jazzy-builtin-interfaces ros-jazzy-unique-identifier-msgs + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_21_job_45: + name: service-msgs action-msgs type-description-interfaces + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_20_job_44 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-service-msgs ros-jazzy-action-msgs ros-jazzy-type-description-interfaces + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-service-msgs ros-jazzy-action-msgs ros-jazzy-type-description-interfaces + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_22_job_46: + name: rosidl-default-runtime rosidl-default-generators + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_21_job_45 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rosidl-default-runtime ros-jazzy-rosidl-default-generators + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rosidl-default-runtime ros-jazzy-rosidl-default-generators + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_23_job_47: + name: rmw-dds-common test-msgs rcl-interfaces std-msgs statistics-msgs + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_22_job_46 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rmw-dds-common ros-jazzy-test-msgs ros-jazzy-rcl-interfaces + ros-jazzy-std-msgs ros-jazzy-statistics-msgs + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rmw-dds-common ros-jazzy-test-msgs ros-jazzy-rcl-interfaces + ros-jazzy-std-msgs ros-jazzy-statistics-msgs + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_23_job_48: + name: rosgraph-msgs lifecycle-msgs std-srvs example-interfaces ros2cli-test-interfaces + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_22_job_46 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rosgraph-msgs ros-jazzy-lifecycle-msgs ros-jazzy-std-srvs + ros-jazzy-example-interfaces ros-jazzy-ros2cli-test-interfaces + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rosgraph-msgs ros-jazzy-lifecycle-msgs ros-jazzy-std-srvs + ros-jazzy-example-interfaces ros-jazzy-ros2cli-test-interfaces + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_23_job_49: + name: topic-tools-interfaces rosbag2-test-msgdefs rosbag2-interfaces action-tutorials-interfaces + pendulum-msgs + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_22_job_46 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-topic-tools-interfaces ros-jazzy-rosbag2-test-msgdefs + ros-jazzy-rosbag2-interfaces ros-jazzy-action-tutorials-interfaces ros-jazzy-pendulum-msgs + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-topic-tools-interfaces ros-jazzy-rosbag2-test-msgdefs + ros-jazzy-rosbag2-interfaces ros-jazzy-action-tutorials-interfaces ros-jazzy-pendulum-msgs + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_24_job_50: + name: rmw-fastrtps-shared-cpp rmw-connextdds-common rmw-cyclonedds-cpp composition-interfaces + geometry-msgs + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_23_job_47 + - stage_23_job_48 + - stage_23_job_49 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rmw-fastrtps-shared-cpp ros-jazzy-rmw-connextdds-common + ros-jazzy-rmw-cyclonedds-cpp ros-jazzy-composition-interfaces ros-jazzy-geometry-msgs + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rmw-fastrtps-shared-cpp ros-jazzy-rmw-connextdds-common + ros-jazzy-rmw-cyclonedds-cpp ros-jazzy-composition-interfaces ros-jazzy-geometry-msgs + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_24_job_51: + name: rosidl-runtime-py controller-manager-msgs bond actionlib-msgs ackermann-msgs + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_23_job_47 + - stage_23_job_48 + - stage_23_job_49 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rosidl-runtime-py ros-jazzy-controller-manager-msgs ros-jazzy-bond + ros-jazzy-actionlib-msgs ros-jazzy-ackermann-msgs + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rosidl-runtime-py ros-jazzy-controller-manager-msgs + ros-jazzy-bond ros-jazzy-actionlib-msgs ros-jazzy-ackermann-msgs + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_24_job_52: + name: gps-msgs actuator-msgs velodyne-msgs rtcm-msgs nmea-msgs + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_23_job_47 + - stage_23_job_48 + - stage_23_job_49 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-gps-msgs ros-jazzy-actuator-msgs ros-jazzy-velodyne-msgs + ros-jazzy-rtcm-msgs ros-jazzy-nmea-msgs + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-gps-msgs ros-jazzy-actuator-msgs ros-jazzy-velodyne-msgs + ros-jazzy-rtcm-msgs ros-jazzy-nmea-msgs + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_24_job_53: + name: apriltag-msgs + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_23_job_47 + - stage_23_job_48 + - stage_23_job_49 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-apriltag-msgs + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-apriltag-msgs + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_25_job_54: + name: rmw-fastrtps-dynamic-cpp rmw-fastrtps-cpp rmw-connextdds sensor-msgs trajectory-msgs + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_24_job_50 + - stage_24_job_51 + - stage_24_job_52 + - stage_24_job_53 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rmw-fastrtps-dynamic-cpp ros-jazzy-rmw-fastrtps-cpp ros-jazzy-rmw-connextdds + ros-jazzy-sensor-msgs ros-jazzy-trajectory-msgs + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rmw-fastrtps-dynamic-cpp ros-jazzy-rmw-fastrtps-cpp + ros-jazzy-rmw-connextdds ros-jazzy-sensor-msgs ros-jazzy-trajectory-msgs + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_25_job_55: + name: tf2-msgs tf2 diagnostic-msgs shape-msgs nav-msgs + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_24_job_50 + - stage_24_job_51 + - stage_24_job_52 + - stage_24_job_53 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-tf2-msgs ros-jazzy-tf2 ros-jazzy-diagnostic-msgs ros-jazzy-shape-msgs + ros-jazzy-nav-msgs + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-tf2-msgs ros-jazzy-tf2 ros-jazzy-diagnostic-msgs + ros-jazzy-shape-msgs ros-jazzy-nav-msgs + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_25_job_56: + name: geographic-msgs octomap-msgs nav-2d-msgs vision-msgs ros-gz-interfaces + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_24_job_50 + - stage_24_job_51 + - stage_24_job_52 + - stage_24_job_53 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-geographic-msgs ros-jazzy-octomap-msgs ros-jazzy-nav-2d-msgs + ros-jazzy-vision-msgs ros-jazzy-ros-gz-interfaces + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-geographic-msgs ros-jazzy-octomap-msgs ros-jazzy-nav-2d-msgs + ros-jazzy-vision-msgs ros-jazzy-ros-gz-interfaces + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_26_job_57: + name: rmw-implementation control-msgs object-recognition-msgs visualization-msgs + stereo-msgs + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_25_job_54 + - stage_25_job_55 + - stage_25_job_56 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rmw-implementation ros-jazzy-control-msgs ros-jazzy-object-recognition-msgs + ros-jazzy-visualization-msgs ros-jazzy-stereo-msgs + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rmw-implementation ros-jazzy-control-msgs ros-jazzy-object-recognition-msgs + ros-jazzy-visualization-msgs ros-jazzy-stereo-msgs + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_26_job_58: + name: sensor-msgs-py map-msgs tf2-eigen-kdl dwb-msgs image-geometry + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_25_job_54 + - stage_25_job_55 + - stage_25_job_56 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-sensor-msgs-py ros-jazzy-map-msgs ros-jazzy-tf2-eigen-kdl + ros-jazzy-dwb-msgs ros-jazzy-image-geometry + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-sensor-msgs-py ros-jazzy-map-msgs ros-jazzy-tf2-eigen-kdl + ros-jazzy-dwb-msgs ros-jazzy-image-geometry + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_26_job_59: + name: pcl-msgs + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_25_job_54 + - stage_25_job_55 + - stage_25_job_56 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-pcl-msgs + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-pcl-msgs + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_27_job_60: + name: rcl moveit-msgs common-interfaces + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_26_job_57 + - stage_26_job_58 + - stage_26_job_59 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rcl ros-jazzy-moveit-msgs ros-jazzy-common-interfaces + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rcl ros-jazzy-moveit-msgs ros-jazzy-common-interfaces + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_28_job_61: + name: libstatistics-collector rcl-lifecycle rcl-action + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_27_job_60 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-libstatistics-collector ros-jazzy-rcl-lifecycle ros-jazzy-rcl-action + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-libstatistics-collector ros-jazzy-rcl-lifecycle + ros-jazzy-rcl-action + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_29_job_62: + name: rclcpp rclpy + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_28_job_61 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rclcpp ros-jazzy-rclpy + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rclcpp ros-jazzy-rclpy + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_30_job_63: + name: rsl rclcpp-lifecycle rclcpp-action launch-ros ros2cli + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_29_job_62 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rsl ros-jazzy-rclcpp-lifecycle ros-jazzy-rclcpp-action + ros-jazzy-launch-ros ros-jazzy-ros2cli + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rsl ros-jazzy-rclcpp-lifecycle ros-jazzy-rclcpp-action + ros-jazzy-launch-ros ros-jazzy-ros2cli + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_30_job_64: + name: rclcpp-components rosbag2-test-common tf2-py geometric-shapes cv-bridge + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_29_job_62 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rclcpp-components ros-jazzy-rosbag2-test-common ros-jazzy-tf2-py + ros-jazzy-geometric-shapes ros-jazzy-cv-bridge + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rclcpp-components ros-jazzy-rosbag2-test-common + ros-jazzy-tf2-py ros-jazzy-geometric-shapes ros-jazzy-cv-bridge + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_30_job_65: + name: launch-param-builder filters laser-geometry behaviortree-cpp rqt-gui + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_29_job_62 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-launch-param-builder ros-jazzy-filters ros-jazzy-laser-geometry + ros-jazzy-behaviortree-cpp ros-jazzy-rqt-gui + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-launch-param-builder ros-jazzy-filters ros-jazzy-laser-geometry + ros-jazzy-behaviortree-cpp ros-jazzy-rqt-gui + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_30_job_66: + name: rqt-py-common rqt-gui-cpp camera-calibration-parsers teleop-twist-keyboard + dummy-sensors + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_29_job_62 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rqt-py-common ros-jazzy-rqt-gui-cpp ros-jazzy-camera-calibration-parsers + ros-jazzy-teleop-twist-keyboard ros-jazzy-dummy-sensors + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rqt-py-common ros-jazzy-rqt-gui-cpp ros-jazzy-camera-calibration-parsers + ros-jazzy-teleop-twist-keyboard ros-jazzy-dummy-sensors + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_30_job_67: + name: dummy-map-server demo-nodes-py quality-of-service-demo-py intra-process-demo + examples-rclpy-minimal-subscriber + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_29_job_62 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-dummy-map-server ros-jazzy-demo-nodes-py ros-jazzy-quality-of-service-demo-py + ros-jazzy-intra-process-demo ros-jazzy-examples-rclpy-minimal-subscriber + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-dummy-map-server ros-jazzy-demo-nodes-py ros-jazzy-quality-of-service-demo-py + ros-jazzy-intra-process-demo ros-jazzy-examples-rclpy-minimal-subscriber + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_30_job_68: + name: examples-rclpy-minimal-service examples-rclpy-minimal-publisher examples-rclpy-minimal-client + examples-rclpy-minimal-action-server examples-rclpy-minimal-action-client + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_29_job_62 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-examples-rclpy-minimal-service ros-jazzy-examples-rclpy-minimal-publisher + ros-jazzy-examples-rclpy-minimal-client ros-jazzy-examples-rclpy-minimal-action-server + ros-jazzy-examples-rclpy-minimal-action-client + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-examples-rclpy-minimal-service ros-jazzy-examples-rclpy-minimal-publisher + ros-jazzy-examples-rclpy-minimal-client ros-jazzy-examples-rclpy-minimal-action-server + ros-jazzy-examples-rclpy-minimal-action-client + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_30_job_69: + name: examples-rclpy-executors examples-rclcpp-multithreaded-executor examples-rclcpp-minimal-timer + examples-rclcpp-minimal-service examples-rclcpp-minimal-publisher + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_29_job_62 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-examples-rclpy-executors ros-jazzy-examples-rclcpp-multithreaded-executor + ros-jazzy-examples-rclcpp-minimal-timer ros-jazzy-examples-rclcpp-minimal-service + ros-jazzy-examples-rclcpp-minimal-publisher + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-examples-rclpy-executors ros-jazzy-examples-rclcpp-multithreaded-executor + ros-jazzy-examples-rclcpp-minimal-timer ros-jazzy-examples-rclcpp-minimal-service + ros-jazzy-examples-rclcpp-minimal-publisher + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_30_job_70: + name: examples-rclcpp-minimal-client action-tutorials-py plotjuggler + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_29_job_62 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-examples-rclcpp-minimal-client ros-jazzy-action-tutorials-py + ros-jazzy-plotjuggler + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-examples-rclcpp-minimal-client ros-jazzy-action-tutorials-py + ros-jazzy-plotjuggler + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_31_job_71: + name: parameter-traits realtime-tools launch-testing-ros message-filters ros2lifecycle-test-fixtures + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_30_job_63 + - stage_30_job_64 + - stage_30_job_65 + - stage_30_job_66 + - stage_30_job_67 + - stage_30_job_68 + - stage_30_job_69 + - stage_30_job_70 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-parameter-traits ros-jazzy-realtime-tools ros-jazzy-launch-testing-ros + ros-jazzy-message-filters ros-jazzy-ros2lifecycle-test-fixtures + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-parameter-traits ros-jazzy-realtime-tools ros-jazzy-launch-testing-ros + ros-jazzy-message-filters ros-jazzy-ros2lifecycle-test-fixtures + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_31_job_72: + name: rosbag2-storage ros2multicast tf2-ros-py nav2-common topic-tools + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_30_job_63 + - stage_30_job_64 + - stage_30_job_65 + - stage_30_job_66 + - stage_30_job_67 + - stage_30_job_68 + - stage_30_job_69 + - stage_30_job_70 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rosbag2-storage ros-jazzy-ros2multicast ros-jazzy-tf2-ros-py + ros-jazzy-nav2-common ros-jazzy-topic-tools + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rosbag2-storage ros-jazzy-ros2multicast ros-jazzy-tf2-ros-py + ros-jazzy-nav2-common ros-jazzy-topic-tools + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_31_job_73: + name: bondcpp moveit-configs-utils ros-gz-bridge rqt-gui-py ros-gz-sim + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_30_job_63 + - stage_30_job_64 + - stage_30_job_65 + - stage_30_job_66 + - stage_30_job_67 + - stage_30_job_68 + - stage_30_job_69 + - stage_30_job_70 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-bondcpp ros-jazzy-moveit-configs-utils ros-jazzy-ros-gz-bridge + ros-jazzy-rqt-gui-py ros-jazzy-ros-gz-sim + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-bondcpp ros-jazzy-moveit-configs-utils ros-jazzy-ros-gz-bridge + ros-jazzy-rqt-gui-py ros-jazzy-ros-gz-sim + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_31_job_74: + name: camera-info-manager joy velodyne-laserscan vision-opencv turtlesim + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_30_job_63 + - stage_30_job_64 + - stage_30_job_65 + - stage_30_job_66 + - stage_30_job_67 + - stage_30_job_68 + - stage_30_job_69 + - stage_30_job_70 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-camera-info-manager ros-jazzy-joy ros-jazzy-velodyne-laserscan + ros-jazzy-vision-opencv ros-jazzy-turtlesim + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-camera-info-manager ros-jazzy-joy ros-jazzy-velodyne-laserscan + ros-jazzy-vision-opencv ros-jazzy-turtlesim + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_31_job_75: + name: topic-monitor quality-of-service-demo-cpp examples-rclcpp-minimal-subscriber + examples-rclcpp-minimal-composition examples-rclcpp-minimal-action-server + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_30_job_63 + - stage_30_job_64 + - stage_30_job_65 + - stage_30_job_66 + - stage_30_job_67 + - stage_30_job_68 + - stage_30_job_69 + - stage_30_job_70 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-topic-monitor ros-jazzy-quality-of-service-demo-cpp ros-jazzy-examples-rclcpp-minimal-subscriber + ros-jazzy-examples-rclcpp-minimal-composition ros-jazzy-examples-rclcpp-minimal-action-server + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-topic-monitor ros-jazzy-quality-of-service-demo-cpp + ros-jazzy-examples-rclcpp-minimal-subscriber ros-jazzy-examples-rclcpp-minimal-composition + ros-jazzy-examples-rclcpp-minimal-action-server + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_31_job_76: + name: examples-rclcpp-minimal-action-client depthimage-to-laserscan action-tutorials-cpp + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_30_job_63 + - stage_30_job_64 + - stage_30_job_65 + - stage_30_job_66 + - stage_30_job_67 + - stage_30_job_68 + - stage_30_job_69 + - stage_30_job_70 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-examples-rclcpp-minimal-action-client ros-jazzy-depthimage-to-laserscan + ros-jazzy-action-tutorials-cpp + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-examples-rclcpp-minimal-action-client ros-jazzy-depthimage-to-laserscan + ros-jazzy-action-tutorials-cpp + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_32_job_77: + name: generate-parameter-library ros2pkg ros2service ros2node tf2-ros + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_31_job_71 + - stage_31_job_72 + - stage_31_job_73 + - stage_31_job_74 + - stage_31_job_75 + - stage_31_job_76 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-generate-parameter-library ros-jazzy-ros2pkg ros-jazzy-ros2service + ros-jazzy-ros2node ros-jazzy-tf2-ros + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-generate-parameter-library ros-jazzy-ros2pkg ros-jazzy-ros2service + ros-jazzy-ros2node ros-jazzy-tf2-ros + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_32_job_78: + name: ros2test diagnostic-updater ros2topic ros2interface ros2doctor + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_31_job_71 + - stage_31_job_72 + - stage_31_job_73 + - stage_31_job_74 + - stage_31_job_75 + - stage_31_job_76 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ros2test ros-jazzy-diagnostic-updater ros-jazzy-ros2topic + ros-jazzy-ros2interface ros-jazzy-ros2doctor + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ros2test ros-jazzy-diagnostic-updater ros-jazzy-ros2topic + ros-jazzy-ros2interface ros-jazzy-ros2doctor + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_32_job_79: + name: ros2action rosbag2-storage-sqlite3 rosbag2-storage-mcap nav2-msgs nav2-voxel-grid + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_31_job_71 + - stage_31_job_72 + - stage_31_job_73 + - stage_31_job_74 + - stage_31_job_75 + - stage_31_job_76 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ros2action ros-jazzy-rosbag2-storage-sqlite3 ros-jazzy-rosbag2-storage-mcap + ros-jazzy-nav2-msgs ros-jazzy-nav2-voxel-grid + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ros2action ros-jazzy-rosbag2-storage-sqlite3 ros-jazzy-rosbag2-storage-mcap + ros-jazzy-nav2-msgs ros-jazzy-nav2-voxel-grid + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_32_job_80: + name: point-cloud-transport image-transport rqt-plot pcl-conversions rqt-console + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_31_job_71 + - stage_31_job_72 + - stage_31_job_73 + - stage_31_job_74 + - stage_31_job_75 + - stage_31_job_76 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-point-cloud-transport ros-jazzy-image-transport ros-jazzy-rqt-plot + ros-jazzy-pcl-conversions ros-jazzy-rqt-console + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-point-cloud-transport ros-jazzy-image-transport + ros-jazzy-rqt-plot ros-jazzy-pcl-conversions ros-jazzy-rqt-console + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_32_job_81: + name: camera-calibration tf2-tools diagnostic-aggregator teleop-twist-joy rqt-shell + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_31_job_71 + - stage_31_job_72 + - stage_31_job_73 + - stage_31_job_74 + - stage_31_job_75 + - stage_31_job_76 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-camera-calibration ros-jazzy-tf2-tools ros-jazzy-diagnostic-aggregator + ros-jazzy-teleop-twist-joy ros-jazzy-rqt-shell + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-camera-calibration ros-jazzy-tf2-tools ros-jazzy-diagnostic-aggregator + ros-jazzy-teleop-twist-joy ros-jazzy-rqt-shell + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_32_job_82: + name: rqt-service-caller rqt-py-console rqt-publisher rqt-graph logging-demo + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_31_job_71 + - stage_31_job_72 + - stage_31_job_73 + - stage_31_job_74 + - stage_31_job_75 + - stage_31_job_76 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rqt-service-caller ros-jazzy-rqt-py-console ros-jazzy-rqt-publisher + ros-jazzy-rqt-graph ros-jazzy-logging-demo + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rqt-service-caller ros-jazzy-rqt-py-console ros-jazzy-rqt-publisher + ros-jazzy-rqt-graph ros-jazzy-logging-demo + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_32_job_83: + name: image-tools demo-nodes-cpp-native demo-nodes-cpp composition + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_31_job_71 + - stage_31_job_72 + - stage_31_job_73 + - stage_31_job_74 + - stage_31_job_75 + - stage_31_job_76 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-image-tools ros-jazzy-demo-nodes-cpp-native ros-jazzy-demo-nodes-cpp + ros-jazzy-composition + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-image-tools ros-jazzy-demo-nodes-cpp-native ros-jazzy-demo-nodes-cpp + ros-jazzy-composition + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_33_job_84: + name: joint-limits ros2run ros2param robot-state-publisher ros-testing + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_32_job_77 + - stage_32_job_78 + - stage_32_job_79 + - stage_32_job_80 + - stage_32_job_81 + - stage_32_job_82 + - stage_32_job_83 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-joint-limits ros-jazzy-ros2run ros-jazzy-ros2param ros-jazzy-robot-state-publisher + ros-jazzy-ros-testing + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-joint-limits ros-jazzy-ros2run ros-jazzy-ros2param + ros-jazzy-robot-state-publisher ros-jazzy-ros-testing + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_33_job_85: + name: ros2lifecycle ros2launch joint-state-publisher tf2-geometry-msgs rosbag2-storage-default-plugins + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_32_job_77 + - stage_32_job_78 + - stage_32_job_79 + - stage_32_job_80 + - stage_32_job_81 + - stage_32_job_82 + - stage_32_job_83 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ros2lifecycle ros-jazzy-ros2launch ros-jazzy-joint-state-publisher + ros-jazzy-tf2-geometry-msgs ros-jazzy-rosbag2-storage-default-plugins + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ros2lifecycle ros-jazzy-ros2launch ros-jazzy-joint-state-publisher + ros-jazzy-tf2-geometry-msgs ros-jazzy-rosbag2-storage-default-plugins + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_33_job_86: + name: tf2-kdl tf2-eigen tf2-sensor-msgs rviz-common zstd-image-transport + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_32_job_77 + - stage_32_job_78 + - stage_32_job_79 + - stage_32_job_80 + - stage_32_job_81 + - stage_32_job_82 + - stage_32_job_83 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-tf2-kdl ros-jazzy-tf2-eigen ros-jazzy-tf2-sensor-msgs + ros-jazzy-rviz-common ros-jazzy-zstd-image-transport + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-tf2-kdl ros-jazzy-tf2-eigen ros-jazzy-tf2-sensor-msgs + ros-jazzy-rviz-common ros-jazzy-zstd-image-transport + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_33_job_87: + name: theora-image-transport compressed-image-transport compressed-depth-image-transport + ros-gz-image nav2-simple-commander + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_32_job_77 + - stage_32_job_78 + - stage_32_job_79 + - stage_32_job_80 + - stage_32_job_81 + - stage_32_job_82 + - stage_32_job_83 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-theora-image-transport ros-jazzy-compressed-image-transport + ros-jazzy-compressed-depth-image-transport ros-jazzy-ros-gz-image ros-jazzy-nav2-simple-commander + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-theora-image-transport ros-jazzy-compressed-image-transport + ros-jazzy-compressed-depth-image-transport ros-jazzy-ros-gz-image ros-jazzy-nav2-simple-commander + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_33_job_88: + name: rqt-topic rqt-image-view image-view image-publisher tf2-bullet + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_32_job_77 + - stage_32_job_78 + - stage_32_job_79 + - stage_32_job_80 + - stage_32_job_81 + - stage_32_job_82 + - stage_32_job_83 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rqt-topic ros-jazzy-rqt-image-view ros-jazzy-image-view + ros-jazzy-image-publisher ros-jazzy-tf2-bullet + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rqt-topic ros-jazzy-rqt-image-view ros-jazzy-image-view + ros-jazzy-image-publisher ros-jazzy-tf2-bullet + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_33_job_89: + name: rqt-msg velodyne-pointcloud velodyne-driver rqt-reconfigure image-common + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_32_job_77 + - stage_32_job_78 + - stage_32_job_79 + - stage_32_job_80 + - stage_32_job_81 + - stage_32_job_82 + - stage_32_job_83 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rqt-msg ros-jazzy-velodyne-pointcloud ros-jazzy-velodyne-driver + ros-jazzy-rqt-reconfigure ros-jazzy-image-common + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rqt-msg ros-jazzy-velodyne-pointcloud ros-jazzy-velodyne-driver + ros-jazzy-rqt-reconfigure ros-jazzy-image-common + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_33_job_90: + name: self-test diagnostic-common-diagnostics apriltag-ros + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_32_job_77 + - stage_32_job_78 + - stage_32_job_79 + - stage_32_job_80 + - stage_32_job_81 + - stage_32_job_82 + - stage_32_job_83 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-self-test ros-jazzy-diagnostic-common-diagnostics ros-jazzy-apriltag-ros + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-self-test ros-jazzy-diagnostic-common-diagnostics + ros-jazzy-apriltag-ros + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_34_job_91: + name: hardware-interface sros2 ros2component joint-state-publisher-gui nav2-util + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_33_job_84 + - stage_33_job_85 + - stage_33_job_86 + - stage_33_job_87 + - stage_33_job_88 + - stage_33_job_89 + - stage_33_job_90 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-hardware-interface ros-jazzy-sros2 ros-jazzy-ros2component + ros-jazzy-joint-state-publisher-gui ros-jazzy-nav2-util + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-hardware-interface ros-jazzy-sros2 ros-jazzy-ros2component + ros-jazzy-joint-state-publisher-gui ros-jazzy-nav2-util + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_34_job_92: + name: rosbag2-cpp rviz-visual-testing-framework interactive-markers warehouse-ros + robot-localization + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_33_job_84 + - stage_33_job_85 + - stage_33_job_86 + - stage_33_job_87 + - stage_33_job_88 + - stage_33_job_89 + - stage_33_job_90 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rosbag2-cpp ros-jazzy-rviz-visual-testing-framework ros-jazzy-interactive-markers + ros-jazzy-warehouse-ros ros-jazzy-robot-localization + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rosbag2-cpp ros-jazzy-rviz-visual-testing-framework + ros-jazzy-interactive-markers ros-jazzy-warehouse-ros ros-jazzy-robot-localization + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_34_job_93: + name: image-transport-plugins image-proc image-rotate pcl-ros geometry2 + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_33_job_84 + - stage_33_job_85 + - stage_33_job_86 + - stage_33_job_87 + - stage_33_job_88 + - stage_33_job_89 + - stage_33_job_90 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-image-transport-plugins ros-jazzy-image-proc ros-jazzy-image-rotate + ros-jazzy-pcl-ros ros-jazzy-geometry2 + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-image-transport-plugins ros-jazzy-image-proc ros-jazzy-image-rotate + ros-jazzy-pcl-ros ros-jazzy-geometry2 + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_34_job_94: + name: rqt-srv rqt-action velodyne laser-filters lifecycle + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_33_job_84 + - stage_33_job_85 + - stage_33_job_86 + - stage_33_job_87 + - stage_33_job_88 + - stage_33_job_89 + - stage_33_job_90 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rqt-srv ros-jazzy-rqt-action ros-jazzy-velodyne ros-jazzy-laser-filters + ros-jazzy-lifecycle + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rqt-srv ros-jazzy-rqt-action ros-jazzy-velodyne + ros-jazzy-laser-filters ros-jazzy-lifecycle + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_34_job_95: + name: dummy-robot-bringup sbg-driver diagnostics + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_33_job_84 + - stage_33_job_85 + - stage_33_job_86 + - stage_33_job_87 + - stage_33_job_88 + - stage_33_job_89 + - stage_33_job_90 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-dummy-robot-bringup ros-jazzy-sbg-driver ros-jazzy-diagnostics + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-dummy-robot-bringup ros-jazzy-sbg-driver ros-jazzy-diagnostics + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_35_job_96: + name: hardware-interface-testing controller-interface ros2cli-common-extensions + nav2-map-server nav2-lifecycle-manager + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_34_job_91 + - stage_34_job_92 + - stage_34_job_93 + - stage_34_job_94 + - stage_34_job_95 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-hardware-interface-testing ros-jazzy-controller-interface + ros-jazzy-ros2cli-common-extensions ros-jazzy-nav2-map-server ros-jazzy-nav2-lifecycle-manager + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-hardware-interface-testing ros-jazzy-controller-interface + ros-jazzy-ros2cli-common-extensions ros-jazzy-nav2-map-server ros-jazzy-nav2-lifecycle-manager + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_35_job_97: + name: rosbag2-compression nav2-behavior-tree nav-2d-utils rviz-default-plugins + opennav-docking-core + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_34_job_91 + - stage_34_job_92 + - stage_34_job_93 + - stage_34_job_94 + - stage_34_job_95 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rosbag2-compression ros-jazzy-nav2-behavior-tree ros-jazzy-nav-2d-utils + ros-jazzy-rviz-default-plugins ros-jazzy-opennav-docking-core + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rosbag2-compression ros-jazzy-nav2-behavior-tree + ros-jazzy-nav-2d-utils ros-jazzy-rviz-default-plugins ros-jazzy-opennav-docking-core + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_35_job_98: + name: nav2-velocity-smoother nav2-amcl stereo-image-proc depth-image-proc sros2-cmake + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_34_job_91 + - stage_34_job_92 + - stage_34_job_93 + - stage_34_job_94 + - stage_34_job_95 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-nav2-velocity-smoother ros-jazzy-nav2-amcl ros-jazzy-stereo-image-proc + ros-jazzy-depth-image-proc ros-jazzy-sros2-cmake + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-nav2-velocity-smoother ros-jazzy-nav2-amcl ros-jazzy-stereo-image-proc + ros-jazzy-depth-image-proc ros-jazzy-sros2-cmake + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_35_job_99: + name: perception-pcl + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_34_job_91 + - stage_34_job_92 + - stage_34_job_93 + - stage_34_job_94 + - stage_34_job_95 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-perception-pcl + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-perception-pcl + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_36_job_100: + name: controller-manager nav2-costmap-2d rosbag2-compression-zstd rviz2 nav2-rviz-plugins + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_35_job_96 + - stage_35_job_97 + - stage_35_job_98 + - stage_35_job_99 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-controller-manager ros-jazzy-nav2-costmap-2d ros-jazzy-rosbag2-compression-zstd + ros-jazzy-rviz2 ros-jazzy-nav2-rviz-plugins + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-controller-manager ros-jazzy-nav2-costmap-2d ros-jazzy-rosbag2-compression-zstd + ros-jazzy-rviz2 ros-jazzy-nav2-rviz-plugins + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_36_job_101: + name: slam-toolbox image-pipeline ros-core + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_35_job_96 + - stage_35_job_97 + - stage_35_job_98 + - stage_35_job_99 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-slam-toolbox ros-jazzy-image-pipeline ros-jazzy-ros-core + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-slam-toolbox ros-jazzy-image-pipeline ros-jazzy-ros-core + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_37_job_102: + name: forward-command-controller nav2-core rosbag2-transport costmap-queue nav2-collision-monitor + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_36_job_100 + - stage_36_job_101 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-forward-command-controller ros-jazzy-nav2-core ros-jazzy-rosbag2-transport + ros-jazzy-costmap-queue ros-jazzy-nav2-collision-monitor + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-forward-command-controller ros-jazzy-nav2-core + ros-jazzy-rosbag2-transport ros-jazzy-costmap-queue ros-jazzy-nav2-collision-monitor + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_37_job_103: + name: ros-gz-sim-demos + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_36_job_100 + - stage_36_job_101 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ros-gz-sim-demos + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ros-gz-sim-demos + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_38_job_104: + name: position-controllers nav2-controller dwb-core rosbag2-py nav2-regulated-pure-pursuit-controller + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_37_job_102 + - stage_37_job_103 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-position-controllers ros-jazzy-nav2-controller ros-jazzy-dwb-core + ros-jazzy-rosbag2-py ros-jazzy-nav2-regulated-pure-pursuit-controller + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-position-controllers ros-jazzy-nav2-controller + ros-jazzy-dwb-core ros-jazzy-rosbag2-py ros-jazzy-nav2-regulated-pure-pursuit-controller + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_38_job_105: + name: opennav-docking-bt nav2-waypoint-follower nav2-theta-star-planner nav2-smoother + nav2-smac-planner + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_37_job_102 + - stage_37_job_103 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-opennav-docking-bt ros-jazzy-nav2-waypoint-follower ros-jazzy-nav2-theta-star-planner + ros-jazzy-nav2-smoother ros-jazzy-nav2-smac-planner + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-opennav-docking-bt ros-jazzy-nav2-waypoint-follower + ros-jazzy-nav2-theta-star-planner ros-jazzy-nav2-smoother ros-jazzy-nav2-smac-planner + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_38_job_106: + name: nav2-planner nav2-navfn-planner nav2-mppi-controller nav2-constrained-smoother + nav2-bt-navigator + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_37_job_102 + - stage_37_job_103 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-nav2-planner ros-jazzy-nav2-navfn-planner ros-jazzy-nav2-mppi-controller + ros-jazzy-nav2-constrained-smoother ros-jazzy-nav2-bt-navigator + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-nav2-planner ros-jazzy-nav2-navfn-planner ros-jazzy-nav2-mppi-controller + ros-jazzy-nav2-constrained-smoother ros-jazzy-nav2-bt-navigator + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_38_job_107: + name: nav2-behaviors ros-gz + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_37_job_102 + - stage_37_job_103 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-nav2-behaviors ros-jazzy-ros-gz + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-nav2-behaviors ros-jazzy-ros-gz + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_39_job_108: + name: moveit-resources-panda-moveit-config moveit-resources-fanuc-moveit-config + nav2-graceful-controller dwb-plugins dwb-critics + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_38_job_104 + - stage_38_job_105 + - stage_38_job_106 + - stage_38_job_107 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-moveit-resources-panda-moveit-config ros-jazzy-moveit-resources-fanuc-moveit-config + ros-jazzy-nav2-graceful-controller ros-jazzy-dwb-plugins ros-jazzy-dwb-critics + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-moveit-resources-panda-moveit-config ros-jazzy-moveit-resources-fanuc-moveit-config + ros-jazzy-nav2-graceful-controller ros-jazzy-dwb-plugins ros-jazzy-dwb-critics + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_39_job_109: + name: ros2bag nav2-rotation-shim-controller rqt-bag + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_38_job_104 + - stage_38_job_105 + - stage_38_job_106 + - stage_38_job_107 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-ros2bag ros-jazzy-nav2-rotation-shim-controller ros-jazzy-rqt-bag + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-ros2bag ros-jazzy-nav2-rotation-shim-controller + ros-jazzy-rqt-bag + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_40_job_110: + name: moveit-core opennav-docking nav2-dwb-controller rosbag2-tests + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_39_job_108 + - stage_39_job_109 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-moveit-core ros-jazzy-opennav-docking ros-jazzy-nav2-dwb-controller + ros-jazzy-rosbag2-tests + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-moveit-core ros-jazzy-opennav-docking ros-jazzy-nav2-dwb-controller + ros-jazzy-rosbag2-tests + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_41_job_111: + name: moveit-ros-occupancy-map-monitor moveit-resources-prbt-ikfast-manipulator-plugin + moveit-simple-controller-manager pilz-industrial-motion-planner-testutils navigation2 + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_40_job_110 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-moveit-ros-occupancy-map-monitor ros-jazzy-moveit-resources-prbt-ikfast-manipulator-plugin + ros-jazzy-moveit-simple-controller-manager ros-jazzy-pilz-industrial-motion-planner-testutils + ros-jazzy-navigation2 + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-moveit-ros-occupancy-map-monitor ros-jazzy-moveit-resources-prbt-ikfast-manipulator-plugin + ros-jazzy-moveit-simple-controller-manager ros-jazzy-pilz-industrial-motion-planner-testutils + ros-jazzy-navigation2 + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_41_job_112: + name: rosbag2 chomp-motion-planner moveit-planners-stomp + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_40_job_110 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-rosbag2 ros-jazzy-chomp-motion-planner ros-jazzy-moveit-planners-stomp + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-rosbag2 ros-jazzy-chomp-motion-planner ros-jazzy-moveit-planners-stomp + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_42_job_113: + name: moveit-ros-planning rqt-bag-plugins moveit-planners-chomp ros-base moveit-plugins + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_41_job_111 + - stage_41_job_112 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-moveit-ros-planning ros-jazzy-rqt-bag-plugins ros-jazzy-moveit-planners-chomp + ros-jazzy-ros-base ros-jazzy-moveit-plugins + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-moveit-ros-planning ros-jazzy-rqt-bag-plugins ros-jazzy-moveit-planners-chomp + ros-jazzy-ros-base ros-jazzy-moveit-plugins + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_42_job_114: + name: plotjuggler-ros + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_41_job_111 + - stage_41_job_112 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-plotjuggler-ros + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-plotjuggler-ros + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_43_job_115: + name: moveit-kinematics moveit-ros-warehouse moveit-ros-robot-interaction moveit-planners-ompl + rqt-common-plugins + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_42_job_113 + - stage_42_job_114 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-moveit-kinematics ros-jazzy-moveit-ros-warehouse ros-jazzy-moveit-ros-robot-interaction + ros-jazzy-moveit-planners-ompl ros-jazzy-rqt-common-plugins + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-moveit-kinematics ros-jazzy-moveit-ros-warehouse + ros-jazzy-moveit-ros-robot-interaction ros-jazzy-moveit-planners-ompl ros-jazzy-rqt-common-plugins + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_43_job_116: + name: simulation perception + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_42_job_113 + - stage_42_job_114 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-simulation ros-jazzy-perception + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-simulation ros-jazzy-perception + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_44_job_117: + name: moveit-ros-move-group moveit-ros-benchmarks desktop + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_43_job_115 + - stage_43_job_116 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-moveit-ros-move-group ros-jazzy-moveit-ros-benchmarks + ros-jazzy-desktop + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-moveit-ros-move-group ros-jazzy-moveit-ros-benchmarks + ros-jazzy-desktop + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_45_job_118: + name: moveit-resources-prbt-moveit-config moveit-ros-planning-interface desktop-full + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_44_job_117 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-moveit-resources-prbt-moveit-config ros-jazzy-moveit-ros-planning-interface + ros-jazzy-desktop-full + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-moveit-resources-prbt-moveit-config ros-jazzy-moveit-ros-planning-interface + ros-jazzy-desktop-full + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_46_job_119: + name: moveit-resources-prbt-pg70-support moveit-ros-visualization + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_45_job_118 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-moveit-resources-prbt-pg70-support ros-jazzy-moveit-ros-visualization + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-moveit-resources-prbt-pg70-support ros-jazzy-moveit-ros-visualization + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_47_job_120: + name: pilz-industrial-motion-planner moveit-setup-framework moveit-ros + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_46_job_119 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-pilz-industrial-motion-planner ros-jazzy-moveit-setup-framework + ros-jazzy-moveit-ros + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-pilz-industrial-motion-planner ros-jazzy-moveit-setup-framework + ros-jazzy-moveit-ros + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_48_job_121: + name: moveit-planners moveit-setup-core-plugins moveit-setup-controllers moveit-setup-app-plugins + moveit-setup-srdf-plugins + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_47_job_120 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-moveit-planners ros-jazzy-moveit-setup-core-plugins ros-jazzy-moveit-setup-controllers + ros-jazzy-moveit-setup-app-plugins ros-jazzy-moveit-setup-srdf-plugins + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-moveit-planners ros-jazzy-moveit-setup-core-plugins + ros-jazzy-moveit-setup-controllers ros-jazzy-moveit-setup-app-plugins ros-jazzy-moveit-setup-srdf-plugins + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh + stage_49_job_122: + name: moveit-setup-assistant moveit + runs-on: macos-14 + strategy: + fail-fast: false + needs: + - stage_48_job_121 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build ros-jazzy-moveit-setup-assistant ros-jazzy-moveit + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + CURRENT_RECIPES: ros-jazzy-moveit-setup-assistant ros-jazzy-moveit + run: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/build_osx_arm64.sh +name: build_osx +on: + push: + branches: + - buildbranch_osx_arm64 diff --git a/activate.bat b/activate.bat new file mode 100755 index 00000000..48ff1d71 --- /dev/null +++ b/activate.bat @@ -0,0 +1,15 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +@if not defined CONDA_PREFIX goto:eof + +@REM Don't do anything when we are in conda build. +@if defined SYS_PREFIX exit /b 0 + +@set "QT_PLUGIN_PATH=%CONDA_PREFIX%\Library\plugins" + +@call "%CONDA_PREFIX%\Library\local_setup.bat" +@set PYTHONHOME= +@set "ROS_OS_OVERRIDE=conda:win64" +@set "ROS_ETC_DIR=%CONDA_PREFIX%\Library\etc\ros" +@set "AMENT_PREFIX_PATH=%CONDA_PREFIX%\Library" +@set "AMENT_PYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe" diff --git a/activate.ps1 b/activate.ps1 new file mode 100755 index 00000000..137e67ae --- /dev/null +++ b/activate.ps1 @@ -0,0 +1,16 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! +if ($null -eq ${env:CONDA_PREFIX}) { Exit } + +# Don't do anything when we are in conda build. +if ($null -ne ${env:SYS_PREFIX}) { Exit 0 } + +$Env:QT_PLUGIN_PATH="${env:CONDA_PREFIX}\Library\plugins" + +& "${env:CONDA_PREFIX}\Library\local_setup.ps1" + +$Env:PYTHONHOME='' +$Env:ROS_OS_OVERRIDE='conda:win64' +$Env:ROS_ETC_DIR="${env:CONDA_PREFIX}\Library\etc\ros" +$Env:AMENT_PREFIX_PATH="${env:CONDA_PREFIX}\Library" +$Env:AMENT_PYTHON_EXECUTABLE="${env:CONDA_PREFIX}\python.exe" diff --git a/activate.sh b/activate.sh new file mode 100755 index 00000000..aece9708 --- /dev/null +++ b/activate.sh @@ -0,0 +1,26 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! +# if [ -z "${CONDA_PREFIX}" ]; then +# exit 0; +# fi + +# Not sure if this is necessary on UNIX? +# export QT_PLUGIN_PATH=$CONDA_PREFIX\plugins + +if [ "$CONDA_BUILD" = "1" -a "$target_platform" != "$build_platform" ]; then + # ignore sourcing + echo "Not activating ROS when cross-compiling"; +else + source $CONDA_PREFIX/setup.sh +fi + +case "$OSTYPE" in + darwin*) export ROS_OS_OVERRIDE="conda:osx"; export RMW_IMPLEMENTATION="rmw_cyclonedds_cpp";; + linux*) export ROS_OS_OVERRIDE="conda:linux";; +esac + +export ROS_ETC_DIR=$CONDA_PREFIX/etc/ros +export AMENT_PREFIX_PATH=$CONDA_PREFIX + +# Looks unnecessary for UNIX +# unset PYTHONHOME= diff --git a/bld_ament_cmake.bat b/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/bld_ament_python.bat b/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/bld_catkin.bat b/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/bld_catkin_merge.bat b/bld_catkin_merge.bat new file mode 100755 index 00000000..0c8cef7c --- /dev/null +++ b/bld_catkin_merge.bat @@ -0,0 +1,34 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set CATKIN_MAKE_ISOLATED=src\ros-jazzy-catkin\bin\catkin_make_isolated +set CMAKE_PREFIX_PATH=%CMAKE_PREFIX_PATH:\=/% + +%PYTHON% %CATKIN_MAKE_ISOLATED% ^ + --install-space %LIBRARY_PREFIX% ^ + --use-ninja ^ + --install ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DCATKIN_SKIP_TESTING=ON +if errorlevel 1 exit 1 + +:: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. +:: This will allow them to be run on environment activation. +for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat +) diff --git a/bld_colcon_merge.bat b/bld_colcon_merge.bat new file mode 100755 index 00000000..b795d97d --- /dev/null +++ b/bld_colcon_merge.bat @@ -0,0 +1,38 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +colcon build ^ + --event-handlers console_cohesion+ ^ + --merge-install ^ + --install-base %LIBRARY_PREFIX% ^ + --cmake-args ^ + --compile-no-warning-as-error ^ + -G Ninja ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DBUILD_TESTING=OFF ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + -DPYTHON_EXECUTABLE=%PYTHON% +if errorlevel 1 exit 1 + +:: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. +:: This will allow them to be run on environment activation. +for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat +) diff --git a/build_ament_cmake.sh b/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/build_ament_python.sh b/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/build_catkin.sh b/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/buildorder.txt b/buildorder.txt new file mode 100644 index 00000000..fee66659 --- /dev/null +++ b/buildorder.txt @@ -0,0 +1,513 @@ +ros2-distro-mutex +ros-jazzy-urdfdom-headers +ros-jazzy-urdfdom +ros-jazzy-urdfdom-py +ros-jazzy-ament-package +ros-jazzy-ament-cmake-core +ros-jazzy-ros-workspace +ros-jazzy-ros-environment +ros-jazzy-ament-lint +ros-jazzy-ament-cmake-python +ros-jazzy-gtest-vendor +ros-jazzy-ament-cmake-libraries +ros-jazzy-ament-cmake-include-directories +ros-jazzy-ament-cmake-export-libraries +ros-jazzy-ament-cmake-version +ros-jazzy-ament-cmake-export-link-flags +ros-jazzy-ament-cmake-export-include-directories +ros-jazzy-ament-cmake-export-definitions +ros-jazzy-ament-pycodestyle +ros-jazzy-osrf-pycommon +ros-jazzy-google-benchmark-vendor +ros-jazzy-osrf-testing-tools-cpp +ros-jazzy-test-interface-files +ros-jazzy-iceoryx-hoofs +ros-jazzy-sdformat-test-files +ros-jazzy-ruckig +ros-jazzy-ompl +ros-jazzy-gtsam +ros-jazzy-ros-industrial-cmake-boilerplate +ros-jazzy-apriltag +ros-jazzy-ament-flake8 +ros-jazzy-ament-cmake-test +ros-jazzy-ament-cmake-export-dependencies +ros-jazzy-ament-cmake-target-dependencies +ros-jazzy-ament-cmake-export-targets +ros-jazzy-ament-cmake-export-interfaces +ros-jazzy-gmock-vendor +ros-jazzy-iceoryx-posh +ros-jazzy-backward-ros +ros-jazzy-stomp +ros-jazzy-ament-pep257 +ros-jazzy-ament-cmake-gtest +ros-jazzy-ament-cmake-vendor-package +ros-jazzy-ament-mypy +ros-jazzy-ament-lint-auto +ros-jazzy-ament-cmake-pytest +ros-jazzy-ament-cmake-google-benchmark +ros-jazzy-iceoryx-binding-c +ros-jazzy-ament-cmake-catch2 +ros-jazzy-ament-copyright +ros-jazzy-ament-cmake-gen-version-h +ros-jazzy-ament-cmake-gmock +ros-jazzy-cyclonedds +ros-jazzy-ament-lint-cmake +ros-jazzy-ament-cmake +ros-jazzy-ament-xmllint +ros-jazzy-ament-cpplint +ros-jazzy-ament-cppcheck +ros-jazzy-ament-index-python +ros-jazzy-domain-coordinator +ros-jazzy-generate-parameter-library-py +ros-jazzy-ament-clang-format +ros-jazzy-ament-cmake-lint-cmake +ros-jazzy-uncrustify-vendor +ros-jazzy-launch +ros-jazzy-rosidl-cli +ros-jazzy-fastcdr +ros-jazzy-rpyutils +ros-jazzy-tl-expected +ros-jazzy-tcb-span +ros-jazzy-pybind11-vendor +ros-jazzy-tinyxml2-vendor +ros-jazzy-ros2-control-test-assets +ros-jazzy-yaml-cpp-vendor +ros-jazzy-zstd-vendor +ros-jazzy-liblz4-vendor +ros-jazzy-sqlite3-vendor +ros-jazzy-libcurl-vendor +ros-jazzy-xacro +ros-jazzy-moveit-resources-panda-description +ros-jazzy-random-numbers +ros-jazzy-eigen-stl-containers +ros-jazzy-moveit-resources-pr2-description +ros-jazzy-moveit-common +ros-jazzy-angles +ros-jazzy-moveit-resources-fanuc-description +ros-jazzy-ament-cmake-auto +ros-jazzy-sdl2-vendor +ros-jazzy-ament-cmake-copyright +ros-jazzy-ament-uncrustify +ros-jazzy-launch-yaml +ros-jazzy-launch-xml +ros-jazzy-mcap-vendor +ros-jazzy-moveit-resources-prbt-support +ros-jazzy-ament-cmake-xmllint +ros-jazzy-ament-cmake-uncrustify +ros-jazzy-ament-cmake-pep257 +ros-jazzy-ament-cmake-flake8 +ros-jazzy-ament-cmake-cpplint +ros-jazzy-ament-cmake-cppcheck +ros-jazzy-launch-testing +ros-jazzy-eigen3-cmake-module +ros-jazzy-ament-cmake-clang-format +ros-jazzy-ament-lint-common +ros-jazzy-foonathan-memory-vendor +ros-jazzy-gz-cmake-vendor +ros-jazzy-rviz-ogre-vendor +ros-jazzy-rviz-assimp-vendor +ros-jazzy-gz-ogre-next-vendor +ros-jazzy-gz-dartsim-vendor +ros-jazzy-launch-pytest +ros-jazzy-python-cmake-module +ros-jazzy-rosidl-adapter +ros-jazzy-performance-test-fixture +ros-jazzy-mimick-vendor +ros-jazzy-ament-cmake-ros +ros-jazzy-rosidl-typesupport-interface +ros-jazzy-fastrtps-cmake-module +ros-jazzy-fastrtps +ros-jazzy-rti-connext-dds-cmake-module +ros-jazzy-rmw-implementation-cmake +ros-jazzy-ament-index-cpp +ros-jazzy-spdlog-vendor +ros-jazzy-gz-utils-vendor +ros-jazzy-gz-tools-vendor +ros-jazzy-orocos-kdl-vendor +ros-jazzy-python-qt-binding +ros-jazzy-smclib +ros-jazzy-osqp-vendor +ros-jazzy-tango-icons-vendor +ros-jazzy-keyboard-handler +ros-jazzy-launch-testing-ament-cmake +ros-jazzy-rosidl-parser +ros-jazzy-tracetools +ros-jazzy-libyaml-vendor +ros-jazzy-console-bridge-vendor +ros-jazzy-urdf-parser-plugin +ros-jazzy-gz-math-vendor +ros-jazzy-resource-retriever +ros-jazzy-gz-plugin-vendor +ros-jazzy-qt-gui +ros-jazzy-qt-gui-py-common +ros-jazzy-tracetools-image-pipeline +ros-jazzy-qt-dotgraph +ros-jazzy-rcutils +ros-jazzy-rosidl-pycommon +ros-jazzy-rosidl-generator-type-description +ros-jazzy-sdformat-vendor +ros-jazzy-rviz-rendering +ros-jazzy-gz-msgs-vendor +ros-jazzy-gz-common-vendor +ros-jazzy-rosidl-runtime-c +ros-jazzy-rosidl-cmake +ros-jazzy-rcpputils +ros-jazzy-rviz-rendering-tests +ros-jazzy-gz-transport-vendor +ros-jazzy-gz-rendering-vendor +ros-jazzy-gz-physics-vendor +ros-jazzy-gz-fuel-tools-vendor +ros-jazzy-rosidl-runtime-cpp +ros-jazzy-rosidl-generator-c +ros-jazzy-rosidl-dynamic-typesupport +ros-jazzy-rcl-logging-interface +ros-jazzy-class-loader +ros-jazzy-gz-sensors-vendor +ros-jazzy-gz-gui-vendor +ros-jazzy-rosidl-generator-cpp +ros-jazzy-rmw +ros-jazzy-rosidl-typesupport-introspection-c +ros-jazzy-rosidl-dynamic-typesupport-fastrtps +ros-jazzy-rcl-logging-spdlog +ros-jazzy-pluginlib +ros-jazzy-gz-sim-vendor +ros-jazzy-rosidl-typesupport-fastrtps-cpp +ros-jazzy-rosidl-typesupport-introspection-cpp +ros-jazzy-rcl-yaml-param-parser +ros-jazzy-urdf +ros-jazzy-qt-gui-cpp +ros-jazzy-rosidl-typesupport-fastrtps-c +ros-jazzy-sdformat-urdf +ros-jazzy-kdl-parser +ros-jazzy-srdfdom +ros-jazzy-rosidl-typesupport-c +ros-jazzy-rosidl-typesupport-cpp +ros-jazzy-rosidl-generator-py +ros-jazzy-rosidl-core-runtime +ros-jazzy-rosidl-core-generators +ros-jazzy-builtin-interfaces +ros-jazzy-unique-identifier-msgs +ros-jazzy-service-msgs +ros-jazzy-action-msgs +ros-jazzy-type-description-interfaces +ros-jazzy-rosidl-default-runtime +ros-jazzy-rosidl-default-generators +ros-jazzy-rmw-dds-common +ros-jazzy-test-msgs +ros-jazzy-rcl-interfaces +ros-jazzy-std-msgs +ros-jazzy-statistics-msgs +ros-jazzy-rosgraph-msgs +ros-jazzy-lifecycle-msgs +ros-jazzy-std-srvs +ros-jazzy-example-interfaces +ros-jazzy-ros2cli-test-interfaces +ros-jazzy-topic-tools-interfaces +ros-jazzy-rosbag2-test-msgdefs +ros-jazzy-rosbag2-interfaces +ros-jazzy-action-tutorials-interfaces +ros-jazzy-pendulum-msgs +ros-jazzy-rmw-fastrtps-shared-cpp +ros-jazzy-rmw-connextdds-common +ros-jazzy-rmw-cyclonedds-cpp +ros-jazzy-composition-interfaces +ros-jazzy-geometry-msgs +ros-jazzy-rosidl-runtime-py +ros-jazzy-controller-manager-msgs +ros-jazzy-bond +ros-jazzy-actionlib-msgs +ros-jazzy-ackermann-msgs +ros-jazzy-gps-msgs +ros-jazzy-actuator-msgs +ros-jazzy-velodyne-msgs +ros-jazzy-rtcm-msgs +ros-jazzy-nmea-msgs +ros-jazzy-apriltag-msgs +ros-jazzy-rmw-fastrtps-dynamic-cpp +ros-jazzy-rmw-fastrtps-cpp +ros-jazzy-rmw-connextdds +ros-jazzy-sensor-msgs +ros-jazzy-trajectory-msgs +ros-jazzy-tf2-msgs +ros-jazzy-tf2 +ros-jazzy-diagnostic-msgs +ros-jazzy-shape-msgs +ros-jazzy-nav-msgs +ros-jazzy-geographic-msgs +ros-jazzy-octomap-msgs +ros-jazzy-nav-2d-msgs +ros-jazzy-vision-msgs +ros-jazzy-ros-gz-interfaces +ros-jazzy-rmw-implementation +ros-jazzy-control-msgs +ros-jazzy-object-recognition-msgs +ros-jazzy-visualization-msgs +ros-jazzy-stereo-msgs +ros-jazzy-sensor-msgs-py +ros-jazzy-map-msgs +ros-jazzy-tf2-eigen-kdl +ros-jazzy-dwb-msgs +ros-jazzy-image-geometry +ros-jazzy-pcl-msgs +ros-jazzy-rcl +ros-jazzy-moveit-msgs +ros-jazzy-common-interfaces +ros-jazzy-libstatistics-collector +ros-jazzy-rcl-lifecycle +ros-jazzy-rcl-action +ros-jazzy-rclcpp +ros-jazzy-rclpy +ros-jazzy-rsl +ros-jazzy-rclcpp-lifecycle +ros-jazzy-rclcpp-action +ros-jazzy-launch-ros +ros-jazzy-ros2cli +ros-jazzy-rclcpp-components +ros-jazzy-rosbag2-test-common +ros-jazzy-tf2-py +ros-jazzy-geometric-shapes +ros-jazzy-cv-bridge +ros-jazzy-launch-param-builder +ros-jazzy-filters +ros-jazzy-laser-geometry +ros-jazzy-behaviortree-cpp +ros-jazzy-rqt-gui +ros-jazzy-rqt-py-common +ros-jazzy-rqt-gui-cpp +ros-jazzy-camera-calibration-parsers +ros-jazzy-teleop-twist-keyboard +ros-jazzy-dummy-sensors +ros-jazzy-dummy-map-server +ros-jazzy-demo-nodes-py +ros-jazzy-quality-of-service-demo-py +ros-jazzy-intra-process-demo +ros-jazzy-examples-rclpy-minimal-subscriber +ros-jazzy-examples-rclpy-minimal-service +ros-jazzy-examples-rclpy-minimal-publisher +ros-jazzy-examples-rclpy-minimal-client +ros-jazzy-examples-rclpy-minimal-action-server +ros-jazzy-examples-rclpy-minimal-action-client +ros-jazzy-examples-rclpy-executors +ros-jazzy-examples-rclcpp-multithreaded-executor +ros-jazzy-examples-rclcpp-minimal-timer +ros-jazzy-examples-rclcpp-minimal-service +ros-jazzy-examples-rclcpp-minimal-publisher +ros-jazzy-examples-rclcpp-minimal-client +ros-jazzy-action-tutorials-py +ros-jazzy-plotjuggler +ros-jazzy-parameter-traits +ros-jazzy-realtime-tools +ros-jazzy-launch-testing-ros +ros-jazzy-message-filters +ros-jazzy-ros2lifecycle-test-fixtures +ros-jazzy-rosbag2-storage +ros-jazzy-ros2multicast +ros-jazzy-tf2-ros-py +ros-jazzy-nav2-common +ros-jazzy-topic-tools +ros-jazzy-bondcpp +ros-jazzy-moveit-configs-utils +ros-jazzy-ros-gz-bridge +ros-jazzy-rqt-gui-py +ros-jazzy-ros-gz-sim +ros-jazzy-camera-info-manager +ros-jazzy-joy +ros-jazzy-velodyne-laserscan +ros-jazzy-vision-opencv +ros-jazzy-turtlesim +ros-jazzy-topic-monitor +ros-jazzy-quality-of-service-demo-cpp +ros-jazzy-examples-rclcpp-minimal-subscriber +ros-jazzy-examples-rclcpp-minimal-composition +ros-jazzy-examples-rclcpp-minimal-action-server +ros-jazzy-examples-rclcpp-minimal-action-client +ros-jazzy-depthimage-to-laserscan +ros-jazzy-action-tutorials-cpp +ros-jazzy-generate-parameter-library +ros-jazzy-ros2pkg +ros-jazzy-ros2service +ros-jazzy-ros2node +ros-jazzy-tf2-ros +ros-jazzy-ros2test +ros-jazzy-diagnostic-updater +ros-jazzy-ros2topic +ros-jazzy-ros2interface +ros-jazzy-ros2doctor +ros-jazzy-ros2action +ros-jazzy-rosbag2-storage-sqlite3 +ros-jazzy-rosbag2-storage-mcap +ros-jazzy-nav2-msgs +ros-jazzy-nav2-voxel-grid +ros-jazzy-point-cloud-transport +ros-jazzy-image-transport +ros-jazzy-rqt-plot +ros-jazzy-pcl-conversions +ros-jazzy-rqt-console +ros-jazzy-camera-calibration +ros-jazzy-tf2-tools +ros-jazzy-diagnostic-aggregator +ros-jazzy-teleop-twist-joy +ros-jazzy-rqt-shell +ros-jazzy-rqt-service-caller +ros-jazzy-rqt-py-console +ros-jazzy-rqt-publisher +ros-jazzy-rqt-graph +ros-jazzy-logging-demo +ros-jazzy-image-tools +ros-jazzy-demo-nodes-cpp-native +ros-jazzy-demo-nodes-cpp +ros-jazzy-composition +ros-jazzy-joint-limits +ros-jazzy-ros2run +ros-jazzy-ros2param +ros-jazzy-robot-state-publisher +ros-jazzy-ros-testing +ros-jazzy-ros2lifecycle +ros-jazzy-ros2launch +ros-jazzy-joint-state-publisher +ros-jazzy-tf2-geometry-msgs +ros-jazzy-rosbag2-storage-default-plugins +ros-jazzy-tf2-kdl +ros-jazzy-tf2-eigen +ros-jazzy-tf2-sensor-msgs +ros-jazzy-rviz-common +ros-jazzy-zstd-image-transport +ros-jazzy-theora-image-transport +ros-jazzy-compressed-image-transport +ros-jazzy-compressed-depth-image-transport +ros-jazzy-ros-gz-image +ros-jazzy-nav2-simple-commander +ros-jazzy-rqt-topic +ros-jazzy-rqt-image-view +ros-jazzy-image-view +ros-jazzy-image-publisher +ros-jazzy-tf2-bullet +ros-jazzy-rqt-msg +ros-jazzy-velodyne-pointcloud +ros-jazzy-velodyne-driver +ros-jazzy-rqt-reconfigure +ros-jazzy-image-common +ros-jazzy-self-test +ros-jazzy-diagnostic-common-diagnostics +ros-jazzy-apriltag-ros +ros-jazzy-hardware-interface +ros-jazzy-sros2 +ros-jazzy-ros2component +ros-jazzy-joint-state-publisher-gui +ros-jazzy-nav2-util +ros-jazzy-rosbag2-cpp +ros-jazzy-rviz-visual-testing-framework +ros-jazzy-interactive-markers +ros-jazzy-warehouse-ros +ros-jazzy-robot-localization +ros-jazzy-image-transport-plugins +ros-jazzy-image-proc +ros-jazzy-image-rotate +ros-jazzy-pcl-ros +ros-jazzy-geometry2 +ros-jazzy-rqt-srv +ros-jazzy-rqt-action +ros-jazzy-velodyne +ros-jazzy-laser-filters +ros-jazzy-lifecycle +ros-jazzy-dummy-robot-bringup +ros-jazzy-sbg-driver +ros-jazzy-diagnostics +ros-jazzy-hardware-interface-testing +ros-jazzy-controller-interface +ros-jazzy-ros2cli-common-extensions +ros-jazzy-nav2-map-server +ros-jazzy-nav2-lifecycle-manager +ros-jazzy-rosbag2-compression +ros-jazzy-nav2-behavior-tree +ros-jazzy-nav-2d-utils +ros-jazzy-rviz-default-plugins +ros-jazzy-opennav-docking-core +ros-jazzy-nav2-velocity-smoother +ros-jazzy-nav2-amcl +ros-jazzy-stereo-image-proc +ros-jazzy-depth-image-proc +ros-jazzy-sros2-cmake +ros-jazzy-perception-pcl +ros-jazzy-controller-manager +ros-jazzy-nav2-costmap-2d +ros-jazzy-rosbag2-compression-zstd +ros-jazzy-rviz2 +ros-jazzy-nav2-rviz-plugins +ros-jazzy-slam-toolbox +ros-jazzy-image-pipeline +ros-jazzy-ros-core +ros-jazzy-forward-command-controller +ros-jazzy-nav2-core +ros-jazzy-rosbag2-transport +ros-jazzy-costmap-queue +ros-jazzy-nav2-collision-monitor +ros-jazzy-ros-gz-sim-demos +ros-jazzy-position-controllers +ros-jazzy-nav2-controller +ros-jazzy-dwb-core +ros-jazzy-rosbag2-py +ros-jazzy-nav2-regulated-pure-pursuit-controller +ros-jazzy-opennav-docking-bt +ros-jazzy-nav2-waypoint-follower +ros-jazzy-nav2-theta-star-planner +ros-jazzy-nav2-smoother +ros-jazzy-nav2-smac-planner +ros-jazzy-nav2-planner +ros-jazzy-nav2-navfn-planner +ros-jazzy-nav2-mppi-controller +ros-jazzy-nav2-constrained-smoother +ros-jazzy-nav2-bt-navigator +ros-jazzy-nav2-behaviors +ros-jazzy-ros-gz +ros-jazzy-moveit-resources-panda-moveit-config +ros-jazzy-moveit-resources-fanuc-moveit-config +ros-jazzy-nav2-graceful-controller +ros-jazzy-dwb-plugins +ros-jazzy-dwb-critics +ros-jazzy-ros2bag +ros-jazzy-nav2-rotation-shim-controller +ros-jazzy-rqt-bag +ros-jazzy-moveit-core +ros-jazzy-opennav-docking +ros-jazzy-nav2-dwb-controller +ros-jazzy-rosbag2-tests +ros-jazzy-moveit-ros-occupancy-map-monitor +ros-jazzy-moveit-resources-prbt-ikfast-manipulator-plugin +ros-jazzy-moveit-simple-controller-manager +ros-jazzy-pilz-industrial-motion-planner-testutils +ros-jazzy-navigation2 +ros-jazzy-rosbag2 +ros-jazzy-chomp-motion-planner +ros-jazzy-moveit-planners-stomp +ros-jazzy-moveit-ros-planning +ros-jazzy-rqt-bag-plugins +ros-jazzy-moveit-planners-chomp +ros-jazzy-ros-base +ros-jazzy-moveit-plugins +ros-jazzy-plotjuggler-ros +ros-jazzy-moveit-kinematics +ros-jazzy-moveit-ros-warehouse +ros-jazzy-moveit-ros-robot-interaction +ros-jazzy-moveit-planners-ompl +ros-jazzy-rqt-common-plugins +ros-jazzy-simulation +ros-jazzy-perception +ros-jazzy-moveit-ros-move-group +ros-jazzy-moveit-ros-benchmarks +ros-jazzy-desktop +ros-jazzy-moveit-resources-prbt-moveit-config +ros-jazzy-moveit-ros-planning-interface +ros-jazzy-desktop-full +ros-jazzy-moveit-resources-prbt-pg70-support +ros-jazzy-moveit-ros-visualization +ros-jazzy-pilz-industrial-motion-planner +ros-jazzy-moveit-setup-framework +ros-jazzy-moveit-ros +ros-jazzy-moveit-planners +ros-jazzy-moveit-setup-core-plugins +ros-jazzy-moveit-setup-controllers +ros-jazzy-moveit-setup-app-plugins +ros-jazzy-moveit-setup-srdf-plugins +ros-jazzy-moveit-setup-assistant +ros-jazzy-moveit \ No newline at end of file diff --git a/deactivate.bat b/deactivate.bat new file mode 100755 index 00000000..6de79cca --- /dev/null +++ b/deactivate.bat @@ -0,0 +1,18 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +@if not defined CONDA_PREFIX goto:eof + +@set ROS_OS_OVERRIDE= +@set ROS_DISTRO= +@set ROS_ETC_DIR= +@set ROS_PACKAGE_PATH= +@set ROS_PYTHON_VERSION= +@set ROS_VERSION= +@set PYTHONHOME= +@set PYTHONPATH= +@set CMAKE_PREFIX_PATH= +@set AMENT_PREFIX_PATH= +@set COLCON_PREFIX_PATH= +@set QT_PLUGIN_PATH= +@set ROS_LOCALHOST_ONLY= +@set ament_python_executable= diff --git a/deactivate.ps1 b/deactivate.ps1 new file mode 100755 index 00000000..9db51e1c --- /dev/null +++ b/deactivate.ps1 @@ -0,0 +1,18 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! +if ($null -eq ${env:CONDA_PREFIX}) { Exit } + +$Env:ROS_OS_OVERRIDE='' +$Env:ROS_DISTRO='' +$Env:ROS_ETC_DIR='' +$Env:ROS_PACKAGE_PATH='' +$Env:ROS_PYTHON_VERSION='' +$Env:ROS_VERSION='' +$Env:PYTHONHOME='' +$Env:PYTHONPATH='' +$Env:CMAKE_PREFIX_PATH='' +$Env:AMENT_PREFIX_PATH='' +$Env:COLCON_PREFIX_PATH='' +$Env:QT_PLUGIN_PATH='' +$Env:ROS_LOCALHOST_ONLY='' +$Env:ament_python_executable='' diff --git a/deactivate.sh b/deactivate.sh new file mode 100755 index 00000000..87d4d835 --- /dev/null +++ b/deactivate.sh @@ -0,0 +1,21 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! +if [ -z "${CONDA_PREFIX}" ]; then + exit 0 +fi + +unset ROS_DISTRO +unset ROS_ETC_DIR +unset ROS_PACKAGE_PATH +unset ROS_PYTHON_VERSION +unset CMAKE_PREFIX_PATH +unset AMENT_PREFIX_PATH +unset COLCON_PREFIX_PATH +unset ROS_VERSION +unset ROS_OS_OVERRIDE +# unset PYTHONPATH +# unset PYTHONHOME +# unset QT_PLUGIN_PATH +unset ROS_LOCALHOST_ONLY +unset ament_python_executable +unset RMW_IMPLEMENTATION diff --git a/recipes/ros-jazzy-ackermann-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-ackermann-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ackermann-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ackermann-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-ackermann-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ackermann-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ackermann-msgs/recipe.yaml b/recipes/ros-jazzy-ackermann-msgs/recipe.yaml new file mode 100644 index 00000000..16ecfc8e --- /dev/null +++ b/recipes/ros-jazzy-ackermann-msgs/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ackermann-msgs + version: 2.0.2 +source: + git: https://github.com/ros2-gbp/ackermann_msgs-release.git + tag: release/jazzy/ackermann_msgs/2.0.2-6 + target_directory: ros-jazzy-ackermann-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-action-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-action-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-action-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-action-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-action-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-action-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-action-msgs/recipe.yaml b/recipes/ros-jazzy-action-msgs/recipe.yaml new file mode 100644 index 00000000..f276843f --- /dev/null +++ b/recipes/ros-jazzy-action-msgs/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-action-msgs + version: 2.0.2 +source: + git: https://github.com/ros2-gbp/rcl_interfaces-release.git + tag: release/jazzy/action_msgs/2.0.2-2 + target_directory: ros-jazzy-action-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-core-generators + - ros-jazzy-service-msgs + - ros-jazzy-unique-identifier-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-core-runtime + - ros-jazzy-service-msgs + - ros-jazzy-unique-identifier-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-action-tutorials-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-action-tutorials-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-action-tutorials-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-action-tutorials-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-action-tutorials-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-action-tutorials-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-action-tutorials-cpp/recipe.yaml b/recipes/ros-jazzy-action-tutorials-cpp/recipe.yaml new file mode 100644 index 00000000..7397a334 --- /dev/null +++ b/recipes/ros-jazzy-action-tutorials-cpp/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-action-tutorials-cpp + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/action_tutorials_cpp/0.33.5-1 + target_directory: ros-jazzy-action-tutorials-cpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-action-tutorials-interfaces + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-action-tutorials-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-action-tutorials-interfaces/bld_ament_cmake.bat b/recipes/ros-jazzy-action-tutorials-interfaces/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-action-tutorials-interfaces/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-action-tutorials-interfaces/build_ament_cmake.sh b/recipes/ros-jazzy-action-tutorials-interfaces/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-action-tutorials-interfaces/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-action-tutorials-interfaces/recipe.yaml b/recipes/ros-jazzy-action-tutorials-interfaces/recipe.yaml new file mode 100644 index 00000000..b369f3d4 --- /dev/null +++ b/recipes/ros-jazzy-action-tutorials-interfaces/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-action-tutorials-interfaces + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/action_tutorials_interfaces/0.33.5-1 + target_directory: ros-jazzy-action-tutorials-interfaces/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-action-tutorials-py/bld_ament_python.bat b/recipes/ros-jazzy-action-tutorials-py/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-action-tutorials-py/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-action-tutorials-py/build_ament_python.sh b/recipes/ros-jazzy-action-tutorials-py/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-action-tutorials-py/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-action-tutorials-py/recipe.yaml b/recipes/ros-jazzy-action-tutorials-py/recipe.yaml new file mode 100644 index 00000000..491876f7 --- /dev/null +++ b/recipes/ros-jazzy-action-tutorials-py/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-action-tutorials-py + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/action_tutorials_py/0.33.5-1 + target_directory: ros-jazzy-action-tutorials-py/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-action-tutorials-interfaces + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-action-tutorials-interfaces + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-actionlib-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-actionlib-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-actionlib-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-actionlib-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-actionlib-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-actionlib-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-actionlib-msgs/recipe.yaml b/recipes/ros-jazzy-actionlib-msgs/recipe.yaml new file mode 100644 index 00000000..7d1aa3bf --- /dev/null +++ b/recipes/ros-jazzy-actionlib-msgs/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-actionlib-msgs + version: 5.3.5 +source: + git: https://github.com/ros2-gbp/common_interfaces-release.git + tag: release/jazzy/actionlib_msgs/5.3.5-1 + target_directory: ros-jazzy-actionlib-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-actuator-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-actuator-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-actuator-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-actuator-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-actuator-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-actuator-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-actuator-msgs/recipe.yaml b/recipes/ros-jazzy-actuator-msgs/recipe.yaml new file mode 100644 index 00000000..4b9f40c7 --- /dev/null +++ b/recipes/ros-jazzy-actuator-msgs/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-actuator-msgs + version: 0.0.1 +source: + git: https://github.com/ros2-gbp/actuator_msgs-release.git + tag: release/jazzy/actuator_msgs/0.0.1-4 + target_directory: ros-jazzy-actuator-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-clang-format/bld_ament_python.bat b/recipes/ros-jazzy-ament-clang-format/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ament-clang-format/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-clang-format/build_ament_python.sh b/recipes/ros-jazzy-ament-clang-format/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ament-clang-format/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ament-clang-format/recipe.yaml b/recipes/ros-jazzy-ament-clang-format/recipe.yaml new file mode 100644 index 00000000..a2934d78 --- /dev/null +++ b/recipes/ros-jazzy-ament-clang-format/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-clang-format + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_clang_format/0.17.1-1 + target_directory: ros-jazzy-ament-clang-format/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - clang-format + - python + - pyyaml + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-auto/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-auto/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-auto/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-auto/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-auto/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-auto/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-auto/recipe.yaml b/recipes/ros-jazzy-ament-cmake-auto/recipe.yaml new file mode 100644 index 00000000..c83a6ef7 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-auto/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-auto + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_auto/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-auto/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-catch2/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-catch2/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-catch2/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-catch2/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-catch2/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-catch2/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-catch2/recipe.yaml b/recipes/ros-jazzy-ament-cmake-catch2/recipe.yaml new file mode 100644 index 00000000..c8276a65 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-catch2/recipe.yaml @@ -0,0 +1,86 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-catch2 + version: 1.4.1 +source: + git: https://github.com/ros2-gbp/ament_cmake_catch2-release.git + tag: release/jazzy/ament_cmake_catch2/1.4.1-1 + target_directory: ros-jazzy-ament-cmake-catch2/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-test + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-test + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-clang-format/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-clang-format/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-clang-format/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-clang-format/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-clang-format/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-clang-format/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-clang-format/recipe.yaml b/recipes/ros-jazzy-ament-cmake-clang-format/recipe.yaml new file mode 100644 index 00000000..e2bc9f27 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-clang-format/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-clang-format + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_cmake_clang_format/0.17.1-1 + target_directory: ros-jazzy-ament-cmake-clang-format/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-clang-format + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-clang-format + - ros-jazzy-ament-cmake-test + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-copyright/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-copyright/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-copyright/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-copyright/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-copyright/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-copyright/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-copyright/recipe.yaml b/recipes/ros-jazzy-ament-cmake-copyright/recipe.yaml new file mode 100644 index 00000000..91c2c506 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-copyright/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-copyright + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_cmake_copyright/0.17.1-1 + target_directory: ros-jazzy-ament-cmake-copyright/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-copyright + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-copyright + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-core/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-core/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-core/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-core/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-core/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-core/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-core/recipe.yaml b/recipes/ros-jazzy-ament-cmake-core/recipe.yaml new file mode 100644 index 00000000..6d5a8e8f --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-core/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-core + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_core/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-core/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - catkin_pkg + - numpy + - pip + - python + - ros-jazzy-ament-package + - ros2-distro-mutex 0.6.* jazzy_* + run: + - catkin_pkg + - cmake + - python + - ros-jazzy-ament-package + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-cppcheck/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-cppcheck/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-cppcheck/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-cppcheck/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-cppcheck/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-cppcheck/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-cppcheck/recipe.yaml b/recipes/ros-jazzy-ament-cmake-cppcheck/recipe.yaml new file mode 100644 index 00000000..90f598e2 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-cppcheck/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-cppcheck + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_cmake_cppcheck/0.17.1-1 + target_directory: ros-jazzy-ament-cmake-cppcheck/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cppcheck + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cppcheck + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-cpplint/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-cpplint/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-cpplint/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-cpplint/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-cpplint/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-cpplint/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-cpplint/recipe.yaml b/recipes/ros-jazzy-ament-cmake-cpplint/recipe.yaml new file mode 100644 index 00000000..df6836ad --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-cpplint/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-cpplint + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_cmake_cpplint/0.17.1-1 + target_directory: ros-jazzy-ament-cmake-cpplint/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cpplint + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cpplint + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-export-definitions/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-export-definitions/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-definitions/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-export-definitions/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-export-definitions/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-definitions/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-export-definitions/recipe.yaml b/recipes/ros-jazzy-ament-cmake-export-definitions/recipe.yaml new file mode 100644 index 00000000..f7fc15db --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-definitions/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-export-definitions + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_export_definitions/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-export-definitions/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-export-dependencies/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-export-dependencies/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-dependencies/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-export-dependencies/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-export-dependencies/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-dependencies/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-export-dependencies/recipe.yaml b/recipes/ros-jazzy-ament-cmake-export-dependencies/recipe.yaml new file mode 100644 index 00000000..c2ae041c --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-dependencies/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-export-dependencies + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_export_dependencies/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-export-dependencies/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-libraries + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-libraries + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-export-include-directories/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-export-include-directories/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-include-directories/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-export-include-directories/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-export-include-directories/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-include-directories/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-export-include-directories/recipe.yaml b/recipes/ros-jazzy-ament-cmake-export-include-directories/recipe.yaml new file mode 100644 index 00000000..1e542242 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-include-directories/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-export-include-directories + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_export_include_directories/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-export-include-directories/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-export-interfaces/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-export-interfaces/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-interfaces/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-export-interfaces/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-export-interfaces/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-interfaces/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-export-interfaces/recipe.yaml b/recipes/ros-jazzy-ament-cmake-export-interfaces/recipe.yaml new file mode 100644 index 00000000..3f4466d9 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-interfaces/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-export-interfaces + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_export_interfaces/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-export-interfaces/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-export-libraries + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-export-libraries + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-export-libraries/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-export-libraries/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-libraries/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-export-libraries/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-export-libraries/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-libraries/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-export-libraries/recipe.yaml b/recipes/ros-jazzy-ament-cmake-export-libraries/recipe.yaml new file mode 100644 index 00000000..bb01a8d1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-libraries/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-export-libraries + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_export_libraries/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-export-libraries/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-export-link-flags/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-export-link-flags/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-link-flags/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-export-link-flags/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-export-link-flags/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-link-flags/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-export-link-flags/recipe.yaml b/recipes/ros-jazzy-ament-cmake-export-link-flags/recipe.yaml new file mode 100644 index 00000000..397ad0e0 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-link-flags/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-export-link-flags + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_export_link_flags/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-export-link-flags/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-export-targets/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-export-targets/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-targets/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-export-targets/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-export-targets/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-targets/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-export-targets/recipe.yaml b/recipes/ros-jazzy-ament-cmake-export-targets/recipe.yaml new file mode 100644 index 00000000..69c8f2f8 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-export-targets/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-export-targets + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_export_targets/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-export-targets/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-export-libraries + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-export-libraries + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-flake8/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-flake8/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-flake8/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-flake8/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-flake8/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-flake8/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-flake8/recipe.yaml b/recipes/ros-jazzy-ament-cmake-flake8/recipe.yaml new file mode 100644 index 00000000..9dbe9afd --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-flake8/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-flake8 + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_cmake_flake8/0.17.1-1 + target_directory: ros-jazzy-ament-cmake-flake8/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-flake8 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-flake8 + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-gen-version-h/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-gen-version-h/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-gen-version-h/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-gen-version-h/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-gen-version-h/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-gen-version-h/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-gen-version-h/recipe.yaml b/recipes/ros-jazzy-ament-cmake-gen-version-h/recipe.yaml new file mode 100644 index 00000000..9515c902 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-gen-version-h/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-gen-version-h + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_gen_version_h/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-gen-version-h/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-package + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-gmock/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-gmock/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-gmock/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-gmock/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-gmock/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-gmock/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-gmock/recipe.yaml b/recipes/ros-jazzy-ament-cmake-gmock/recipe.yaml new file mode 100644 index 00000000..a12b92e4 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-gmock/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-gmock + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_gmock/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-gmock/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - gmock + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-test + - ros-jazzy-gmock-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - gmock + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-test + - ros-jazzy-gmock-vendor + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-google-benchmark/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-google-benchmark/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-google-benchmark/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-google-benchmark/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-google-benchmark/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-google-benchmark/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-google-benchmark/recipe.yaml b/recipes/ros-jazzy-ament-cmake-google-benchmark/recipe.yaml new file mode 100644 index 00000000..977bbd40 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-google-benchmark/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-google-benchmark + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_google_benchmark/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-google-benchmark/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-export-dependencies + - ros-jazzy-ament-cmake-python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-test + - ros-jazzy-google-benchmark-vendor + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-gtest/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-gtest/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-gtest/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-gtest/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-gtest/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-gtest/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-gtest/recipe.yaml b/recipes/ros-jazzy-ament-cmake-gtest/recipe.yaml new file mode 100644 index 00000000..f64a1578 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-gtest/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-gtest + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_gtest/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-gtest/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - gtest + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-test + - ros-jazzy-gtest-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - gtest + - python + - ros-jazzy-ament-cmake-test + - ros-jazzy-gtest-vendor + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-include-directories/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-include-directories/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-include-directories/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-include-directories/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-include-directories/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-include-directories/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-include-directories/recipe.yaml b/recipes/ros-jazzy-ament-cmake-include-directories/recipe.yaml new file mode 100644 index 00000000..a6974126 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-include-directories/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-include-directories + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_include_directories/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-include-directories/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-libraries/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-libraries/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-libraries/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-libraries/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-libraries/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-libraries/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-libraries/recipe.yaml b/recipes/ros-jazzy-ament-cmake-libraries/recipe.yaml new file mode 100644 index 00000000..8f1c2ba7 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-libraries/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-libraries + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_libraries/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-libraries/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-lint-cmake/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-lint-cmake/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-lint-cmake/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-lint-cmake/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-lint-cmake/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-lint-cmake/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-lint-cmake/recipe.yaml b/recipes/ros-jazzy-ament-cmake-lint-cmake/recipe.yaml new file mode 100644 index 00000000..3c01c93d --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-lint-cmake/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-lint-cmake + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_cmake_lint_cmake/0.17.1-1 + target_directory: ros-jazzy-ament-cmake-lint-cmake/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-lint-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-lint-cmake + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-pep257/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-pep257/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-pep257/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-pep257/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-pep257/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-pep257/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-pep257/recipe.yaml b/recipes/ros-jazzy-ament-cmake-pep257/recipe.yaml new file mode 100644 index 00000000..9efdb123 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-pep257/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-pep257 + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_cmake_pep257/0.17.1-1 + target_directory: ros-jazzy-ament-cmake-pep257/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-pytest/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-pytest/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-pytest/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-pytest/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-pytest/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-pytest/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-pytest/recipe.yaml b/recipes/ros-jazzy-ament-cmake-pytest/recipe.yaml new file mode 100644 index 00000000..467c82a6 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-pytest/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-pytest + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_pytest/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-pytest/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-test + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - pytest + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-test + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-python/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-python/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-python/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-python/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-python/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-python/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-python/recipe.yaml b/recipes/ros-jazzy-ament-cmake-python/recipe.yaml new file mode 100644 index 00000000..4ff1ee4f --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-python/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-python + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_python/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-python/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-ros/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-ros/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-ros/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-ros/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-ros/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-ros/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-ros/recipe.yaml b/recipes/ros-jazzy-ament-cmake-ros/recipe.yaml new file mode 100644 index 00000000..42246313 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-ros/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-ros + version: 0.12.0 +source: + git: https://github.com/ros2-gbp/ament_cmake_ros-release.git + tag: release/jazzy/ament_cmake_ros/0.12.0-3 + target_directory: ros-jazzy-ament-cmake-ros/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-domain-coordinator + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-domain-coordinator + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-target-dependencies/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-target-dependencies/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-target-dependencies/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-target-dependencies/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-target-dependencies/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-target-dependencies/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-target-dependencies/recipe.yaml b/recipes/ros-jazzy-ament-cmake-target-dependencies/recipe.yaml new file mode 100644 index 00000000..26dc25a0 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-target-dependencies/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-target-dependencies + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_target_dependencies/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-target-dependencies/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-include-directories + - ros-jazzy-ament-cmake-libraries + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-include-directories + - ros-jazzy-ament-cmake-libraries + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-test/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-test/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-test/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-test/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-test/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-test/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-test/recipe.yaml b/recipes/ros-jazzy-ament-cmake-test/recipe.yaml new file mode 100644 index 00000000..05d9eadd --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-test/recipe.yaml @@ -0,0 +1,86 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-test + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_test/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-test/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-uncrustify/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-uncrustify/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-uncrustify/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-uncrustify/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-uncrustify/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-uncrustify/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-uncrustify/recipe.yaml b/recipes/ros-jazzy-ament-cmake-uncrustify/recipe.yaml new file mode 100644 index 00000000..b6acda71 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-uncrustify/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-uncrustify + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_cmake_uncrustify/0.17.1-1 + target_directory: ros-jazzy-ament-cmake-uncrustify/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-uncrustify + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-uncrustify + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-vendor-package/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-vendor-package/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-vendor-package/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-vendor-package/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-vendor-package/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-vendor-package/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-vendor-package/patch/ros-jazzy-ament-cmake-vendor-package.patch b/recipes/ros-jazzy-ament-cmake-vendor-package/patch/ros-jazzy-ament-cmake-vendor-package.patch new file mode 100644 index 00000000..4a02afd0 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-vendor-package/patch/ros-jazzy-ament-cmake-vendor-package.patch @@ -0,0 +1,64 @@ +diff --git a/cmake/ament_vendor.cmake b/cmake/ament_vendor.cmake +index c9b963cd0..d23ff2aa2 100644 +--- a/cmake/ament_vendor.cmake ++++ b/cmake/ament_vendor.cmake +@@ -49,6 +49,14 @@ + # projects. + # :type GLOBAL_HOOK: option + # ++# Beside CMake macro options, the macro is also influenced by the following two ++# CMake options, that can be set at the CMake invocation for the project that ++# uses ament_vendor() macro: ++# * `FORCE_BUILD_VENDOR_PKG`: If ON build vendor packages from source, even if ++# system-installed packages are available ++# * `AMENT_VENDOR_NEVER_VENDOR`: If ON, raise an error if SATISFIED argument is ++# not true instead of building the vendored package ++# + # @public + # + macro(ament_vendor TARGET_NAME) +@@ -97,6 +105,18 @@ macro(ament_vendor TARGET_NAME) + "Build vendor packages from source, even if system-installed packages are available" + OFF) + ++ option(AMENT_VENDOR_NEVER_VENDOR ++ "If ON, raise an error if SATISFIED argument is not true instead of building the vendored package" ++ OFF) ++ ++ if(FORCE_BUILD_VENDOR_PKG AND AMENT_VENDOR_NEVER_VENDOR) ++ message(FATAL_ERROR "ament_vendor() cannot have both FORCE_BUILD_VENDOR_PKG and AMENT_VENDOR_NEVER_VENDOR options enabled") ++ endif() ++ ++ if(NOT _ARG_SATISFIED AND AMENT_VENDOR_NEVER_VENDOR) ++ message(FATAL_ERROR "ament_vendor() SATISFIED option is OFF and AMENT_VENDOR_NEVER_VENDOR is ON") ++ endif() ++ + if(NOT _ARG_SATISFIED OR FORCE_BUILD_VENDOR_PKG) + if(_ARG_SATISFIED) + message(STATUS "Forcing vendor package build for '${TARGET_NAME}', which is already satisfied") +@@ -245,6 +245,10 @@ function(_ament_vendor TARGET_NAME VCS_TYPE VCS_URL VCS_VERSION PATCHES CMAKE_AR + set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_MODULE_PATH [=[${CMAKE_MODULE_PATH}]=] CACHE INTERNAL \"\")") + endif() + ++ if(DEFINED CMAKE_IGNORE_PREFIX_PATH) ++ set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_IGNORE_PREFIX_PATH [=[${CMAKE_IGNORE_PREFIX_PATH}]=] CACHE INTERNAL \"\")") ++ endif() ++ + list(PREPEND CMAKE_PREFIX_PATH ${_AMENT_CMAKE_VENDOR_PACKAGE_PREFIX_PATH}) + set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_PREFIX_PATH [=[${CMAKE_PREFIX_PATH}]=] CACHE INTERNAL \"\")") + +@@ -256,6 +260,14 @@ function(_ament_vendor TARGET_NAME VCS_TYPE VCS_URL VCS_VERSION PATCHES CMAKE_AR + set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(BUILD_SHARED_LIBS ON CACHE BOOL \"\")") + endif() + ++ if(DEFINED Python_EXECUTABLE) ++ set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(Python_EXECUTABLE [=[${Python_EXECUTABLE}]=] CACHE INTERNAL \"\")") ++ endif() ++ ++ if(DEFINED Python3_EXECUTABLE) ++ set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(Python3_EXECUTABLE [=[${Python3_EXECUTABLE}]=] CACHE INTERNAL \"\")") ++ endif() ++ + file(GENERATE OUTPUT "${CMAKE_ARGS_FILE}" CONTENT "${CMAKE_ARGS_CONTENT}") + list(PREPEND CMAKE_ARGS "-C${CMAKE_ARGS_FILE}") + diff --git a/recipes/ros-jazzy-ament-cmake-vendor-package/recipe.yaml b/recipes/ros-jazzy-ament-cmake-vendor-package/recipe.yaml new file mode 100644 index 00000000..717fb187 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-vendor-package/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-vendor-package + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_vendor_package/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-vendor-package/src/work + patches: + - patch/ros-jazzy-ament-cmake-vendor-package.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-export-dependencies + - ros-jazzy-ament-cmake-test + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - vcstool + run: + - git + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-export-dependencies + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - vcstool + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-version/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-version/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-version/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-version/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-version/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-version/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-version/recipe.yaml b/recipes/ros-jazzy-ament-cmake-version/recipe.yaml new file mode 100644 index 00000000..4c63c0d5 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-version/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-version + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake_version/2.5.3-1 + target_directory: ros-jazzy-ament-cmake-version/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake-xmllint/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake-xmllint/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-xmllint/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake-xmllint/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake-xmllint/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-xmllint/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake-xmllint/recipe.yaml b/recipes/ros-jazzy-ament-cmake-xmllint/recipe.yaml new file mode 100644 index 00000000..2af0e9f4 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake-xmllint/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake-xmllint + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_cmake_xmllint/0.17.1-1 + target_directory: ros-jazzy-ament-cmake-xmllint/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-xmllint + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-xmllint + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cmake/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-cmake/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cmake/build_ament_cmake.sh b/recipes/ros-jazzy-ament-cmake/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-cmake/recipe.yaml b/recipes/ros-jazzy-ament-cmake/recipe.yaml new file mode 100644 index 00000000..3cccc236 --- /dev/null +++ b/recipes/ros-jazzy-ament-cmake/recipe.yaml @@ -0,0 +1,112 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cmake + version: 2.5.3 +source: + git: https://github.com/ros2-gbp/ament_cmake-release.git + tag: release/jazzy/ament_cmake/2.5.3-1 + target_directory: ros-jazzy-ament-cmake/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-export-definitions + - ros-jazzy-ament-cmake-export-dependencies + - ros-jazzy-ament-cmake-export-include-directories + - ros-jazzy-ament-cmake-export-interfaces + - ros-jazzy-ament-cmake-export-libraries + - ros-jazzy-ament-cmake-export-link-flags + - ros-jazzy-ament-cmake-export-targets + - ros-jazzy-ament-cmake-gen-version-h + - ros-jazzy-ament-cmake-libraries + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-cmake-target-dependencies + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-version + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - cmake + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-export-definitions + - ros-jazzy-ament-cmake-export-dependencies + - ros-jazzy-ament-cmake-export-include-directories + - ros-jazzy-ament-cmake-export-interfaces + - ros-jazzy-ament-cmake-export-libraries + - ros-jazzy-ament-cmake-export-link-flags + - ros-jazzy-ament-cmake-export-targets + - ros-jazzy-ament-cmake-gen-version-h + - ros-jazzy-ament-cmake-libraries + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-cmake-target-dependencies + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-version + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-copyright/bld_ament_python.bat b/recipes/ros-jazzy-ament-copyright/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ament-copyright/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-copyright/build_ament_python.sh b/recipes/ros-jazzy-ament-copyright/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ament-copyright/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ament-copyright/recipe.yaml b/recipes/ros-jazzy-ament-copyright/recipe.yaml new file mode 100644 index 00000000..8ea033ea --- /dev/null +++ b/recipes/ros-jazzy-ament-copyright/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-copyright + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_copyright/0.17.1-1 + target_directory: ros-jazzy-ament-copyright/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - importlib-metadata + - python + - ros-jazzy-ament-lint + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cppcheck/bld_ament_python.bat b/recipes/ros-jazzy-ament-cppcheck/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ament-cppcheck/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cppcheck/build_ament_python.sh b/recipes/ros-jazzy-ament-cppcheck/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ament-cppcheck/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ament-cppcheck/recipe.yaml b/recipes/ros-jazzy-ament-cppcheck/recipe.yaml new file mode 100644 index 00000000..5312993f --- /dev/null +++ b/recipes/ros-jazzy-ament-cppcheck/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cppcheck + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_cppcheck/0.17.1-1 + target_directory: ros-jazzy-ament-cppcheck/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-pycodestyle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - cppcheck + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-cpplint/bld_ament_python.bat b/recipes/ros-jazzy-ament-cpplint/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ament-cpplint/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-cpplint/build_ament_python.sh b/recipes/ros-jazzy-ament-cpplint/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ament-cpplint/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ament-cpplint/recipe.yaml b/recipes/ros-jazzy-ament-cpplint/recipe.yaml new file mode 100644 index 00000000..2d3a2f94 --- /dev/null +++ b/recipes/ros-jazzy-ament-cpplint/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-cpplint + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_cpplint/0.17.1-1 + target_directory: ros-jazzy-ament-cpplint/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} +tests: + - script: + - ament_cpplint --help diff --git a/recipes/ros-jazzy-ament-flake8/bld_ament_python.bat b/recipes/ros-jazzy-ament-flake8/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ament-flake8/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-flake8/build_ament_python.sh b/recipes/ros-jazzy-ament-flake8/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ament-flake8/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ament-flake8/recipe.yaml b/recipes/ros-jazzy-ament-flake8/recipe.yaml new file mode 100644 index 00000000..cd7d37e1 --- /dev/null +++ b/recipes/ros-jazzy-ament-flake8/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-flake8 + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_flake8/0.17.1-1 + target_directory: ros-jazzy-ament-flake8/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - flake8 + - flake8-builtins + - flake8-comprehensions + - flake8-docstrings + - flake8-import-order + - flake8-quotes + - python + - ros-jazzy-ament-lint + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-index-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-index-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-index-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-index-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-ament-index-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-index-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-index-cpp/recipe.yaml b/recipes/ros-jazzy-ament-index-cpp/recipe.yaml new file mode 100644 index 00000000..095aaa7c --- /dev/null +++ b/recipes/ros-jazzy-ament-index-cpp/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-index-cpp + version: 1.8.1 +source: + git: https://github.com/ros2-gbp/ament_index-release.git + tag: release/jazzy/ament_index_cpp/1.8.1-1 + target_directory: ros-jazzy-ament-index-cpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-index-python/bld_ament_python.bat b/recipes/ros-jazzy-ament-index-python/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ament-index-python/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-index-python/build_ament_python.sh b/recipes/ros-jazzy-ament-index-python/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ament-index-python/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ament-index-python/recipe.yaml b/recipes/ros-jazzy-ament-index-python/recipe.yaml new file mode 100644 index 00000000..e7aa4970 --- /dev/null +++ b/recipes/ros-jazzy-ament-index-python/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-index-python + version: 1.8.1 +source: + git: https://github.com/ros2-gbp/ament_index-release.git + tag: release/jazzy/ament_index_python/1.8.1-1 + target_directory: ros-jazzy-ament-index-python/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-lint-auto/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-lint-auto/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-lint-auto/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-lint-auto/build_ament_cmake.sh b/recipes/ros-jazzy-ament-lint-auto/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-lint-auto/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-lint-auto/recipe.yaml b/recipes/ros-jazzy-ament-lint-auto/recipe.yaml new file mode 100644 index 00000000..ec81e1e0 --- /dev/null +++ b/recipes/ros-jazzy-ament-lint-auto/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-lint-auto + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_lint_auto/0.17.1-1 + target_directory: ros-jazzy-ament-lint-auto/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-test + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-test + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-lint-cmake/bld_ament_python.bat b/recipes/ros-jazzy-ament-lint-cmake/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ament-lint-cmake/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-lint-cmake/build_ament_python.sh b/recipes/ros-jazzy-ament-lint-cmake/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ament-lint-cmake/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ament-lint-cmake/recipe.yaml b/recipes/ros-jazzy-ament-lint-cmake/recipe.yaml new file mode 100644 index 00000000..bde2d49d --- /dev/null +++ b/recipes/ros-jazzy-ament-lint-cmake/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-lint-cmake + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_lint_cmake/0.17.1-1 + target_directory: ros-jazzy-ament-lint-cmake/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} +tests: + - script: + - ament_lint_cmake --help diff --git a/recipes/ros-jazzy-ament-lint-common/bld_ament_cmake.bat b/recipes/ros-jazzy-ament-lint-common/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ament-lint-common/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-lint-common/build_ament_cmake.sh b/recipes/ros-jazzy-ament-lint-common/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ament-lint-common/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ament-lint-common/recipe.yaml b/recipes/ros-jazzy-ament-lint-common/recipe.yaml new file mode 100644 index 00000000..76795fef --- /dev/null +++ b/recipes/ros-jazzy-ament-lint-common/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-lint-common + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_lint_common/0.17.1-1 + target_directory: ros-jazzy-ament-lint-common/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-export-dependencies + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-cppcheck + - ros-jazzy-ament-cmake-cpplint + - ros-jazzy-ament-cmake-flake8 + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-pep257 + - ros-jazzy-ament-cmake-uncrustify + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-lint/bld_ament_python.bat b/recipes/ros-jazzy-ament-lint/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ament-lint/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-lint/build_ament_python.sh b/recipes/ros-jazzy-ament-lint/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ament-lint/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ament-lint/recipe.yaml b/recipes/ros-jazzy-ament-lint/recipe.yaml new file mode 100644 index 00000000..95eafd77 --- /dev/null +++ b/recipes/ros-jazzy-ament-lint/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-lint + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_lint/0.17.1-1 + target_directory: ros-jazzy-ament-lint/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-mypy/bld_ament_python.bat b/recipes/ros-jazzy-ament-mypy/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ament-mypy/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-mypy/build_ament_python.sh b/recipes/ros-jazzy-ament-mypy/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ament-mypy/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ament-mypy/recipe.yaml b/recipes/ros-jazzy-ament-mypy/recipe.yaml new file mode 100644 index 00000000..f33c7bed --- /dev/null +++ b/recipes/ros-jazzy-ament-mypy/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-mypy + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_mypy/0.17.1-1 + target_directory: ros-jazzy-ament-mypy/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - pytest-mock + - python + - ros-jazzy-ament-flake8 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - mypy + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-package/bld_ament_python.bat b/recipes/ros-jazzy-ament-package/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ament-package/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-package/build_ament_python.sh b/recipes/ros-jazzy-ament-package/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ament-package/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ament-package/recipe.yaml b/recipes/ros-jazzy-ament-package/recipe.yaml new file mode 100644 index 00000000..706f44ac --- /dev/null +++ b/recipes/ros-jazzy-ament-package/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-package + version: 0.16.3 +source: + git: https://github.com/ros2-gbp/ament_package-release.git + tag: release/jazzy/ament_package/0.16.3-3 + target_directory: ros-jazzy-ament-package/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - flake8 + - importlib_resources + - numpy + - pip + - pytest + - python + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - importlib-metadata + - importlib_resources + - python + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-pep257/bld_ament_python.bat b/recipes/ros-jazzy-ament-pep257/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ament-pep257/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-pep257/build_ament_python.sh b/recipes/ros-jazzy-ament-pep257/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ament-pep257/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ament-pep257/recipe.yaml b/recipes/ros-jazzy-ament-pep257/recipe.yaml new file mode 100644 index 00000000..9ea36200 --- /dev/null +++ b/recipes/ros-jazzy-ament-pep257/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-pep257 + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_pep257/0.17.1-1 + target_directory: ros-jazzy-ament-pep257/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-flake8 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - pydocstyle + - python + - ros-jazzy-ament-lint + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-pycodestyle/bld_ament_python.bat b/recipes/ros-jazzy-ament-pycodestyle/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ament-pycodestyle/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-pycodestyle/build_ament_python.sh b/recipes/ros-jazzy-ament-pycodestyle/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ament-pycodestyle/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ament-pycodestyle/recipe.yaml b/recipes/ros-jazzy-ament-pycodestyle/recipe.yaml new file mode 100644 index 00000000..0f1d0296 --- /dev/null +++ b/recipes/ros-jazzy-ament-pycodestyle/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-pycodestyle + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_pycodestyle/0.17.1-1 + target_directory: ros-jazzy-ament-pycodestyle/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - pycodestyle + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-uncrustify/bld_ament_python.bat b/recipes/ros-jazzy-ament-uncrustify/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ament-uncrustify/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-uncrustify/build_ament_python.sh b/recipes/ros-jazzy-ament-uncrustify/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ament-uncrustify/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ament-uncrustify/recipe.yaml b/recipes/ros-jazzy-ament-uncrustify/recipe.yaml new file mode 100644 index 00000000..7f24c1ab --- /dev/null +++ b/recipes/ros-jazzy-ament-uncrustify/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-uncrustify + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_uncrustify/0.17.1-1 + target_directory: ros-jazzy-ament-uncrustify/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-pycodestyle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-uncrustify-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ament-xmllint/bld_ament_python.bat b/recipes/ros-jazzy-ament-xmllint/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ament-xmllint/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ament-xmllint/build_ament_python.sh b/recipes/ros-jazzy-ament-xmllint/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ament-xmllint/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ament-xmllint/recipe.yaml b/recipes/ros-jazzy-ament-xmllint/recipe.yaml new file mode 100644 index 00000000..b3d38318 --- /dev/null +++ b/recipes/ros-jazzy-ament-xmllint/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ament-xmllint + version: 0.17.1 +source: + git: https://github.com/ros2-gbp/ament_lint-release.git + tag: release/jazzy/ament_xmllint/0.17.1-1 + target_directory: ros-jazzy-ament-xmllint/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - libxml2 + - python + - ros-jazzy-ament-lint + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} +tests: + - script: + - ament_xmllint --help diff --git a/recipes/ros-jazzy-angles/bld_ament_cmake.bat b/recipes/ros-jazzy-angles/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-angles/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-angles/build_ament_cmake.sh b/recipes/ros-jazzy-angles/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-angles/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-angles/recipe.yaml b/recipes/ros-jazzy-angles/recipe.yaml new file mode 100644 index 00000000..d7f1c3ff --- /dev/null +++ b/recipes/ros-jazzy-angles/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-angles + version: 1.16.0 +source: + git: https://github.com/ros2-gbp/angles-release.git + tag: release/jazzy/angles/1.16.0-5 + target_directory: ros-jazzy-angles/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-apriltag-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-apriltag-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-apriltag-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-apriltag-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-apriltag-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-apriltag-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-apriltag-msgs/recipe.yaml b/recipes/ros-jazzy-apriltag-msgs/recipe.yaml new file mode 100644 index 00000000..9754f455 --- /dev/null +++ b/recipes/ros-jazzy-apriltag-msgs/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-apriltag-msgs + version: 2.0.1 +source: + git: https://github.com/ros2-gbp/apriltag_msgs-release.git + tag: release/jazzy/apriltag_msgs/2.0.1-5 + target_directory: ros-jazzy-apriltag-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-apriltag-ros/bld_ament_cmake.bat b/recipes/ros-jazzy-apriltag-ros/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-apriltag-ros/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-apriltag-ros/build_ament_cmake.sh b/recipes/ros-jazzy-apriltag-ros/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-apriltag-ros/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-apriltag-ros/patch/ros-jazzy-apriltag-ros.patch b/recipes/ros-jazzy-apriltag-ros/patch/ros-jazzy-apriltag-ros.patch new file mode 100644 index 00000000..35aac4ce --- /dev/null +++ b/recipes/ros-jazzy-apriltag-ros/patch/ros-jazzy-apriltag-ros.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c906851..b48600f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,8 +5,10 @@ project(apriltag_ros) + set(CMAKE_CXX_STANDARD 14) + + if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") +- add_compile_options(-Werror -Wall -Wextra -Wpedantic) +- add_link_options("-Wl,-z,relro,-z,now,-z,defs") ++ if(NOT APPLE) ++ add_compile_options(-Werror -Wall -Wextra -Wpedantic) ++ add_link_options("-Wl,-z,relro,-z,now,-z,defs") ++ endif() + endif() + + option(ASAN "use AddressSanitizer to detect memory issues" OFF) diff --git a/recipes/ros-jazzy-apriltag-ros/recipe.yaml b/recipes/ros-jazzy-apriltag-ros/recipe.yaml new file mode 100644 index 00000000..bfcaca6f --- /dev/null +++ b/recipes/ros-jazzy-apriltag-ros/recipe.yaml @@ -0,0 +1,106 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-apriltag-ros + version: 3.2.2 +source: + git: https://github.com/ros2-gbp/apriltag_ros-release.git + tag: release/jazzy/apriltag_ros/3.2.2-1 + target_directory: ros-jazzy-apriltag-ros/src/work + patches: + - patch/ros-jazzy-apriltag-ros.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-clang-format + - ros-jazzy-ament-cmake-cppcheck + - ros-jazzy-ament-lint-auto + - ros-jazzy-apriltag + - ros-jazzy-apriltag-msgs + - ros-jazzy-cv-bridge + - ros-jazzy-image-transport + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-apriltag + - ros-jazzy-apriltag-msgs + - ros-jazzy-cv-bridge + - ros-jazzy-image-transport + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-apriltag/bld_catkin.bat b/recipes/ros-jazzy-apriltag/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-apriltag/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-apriltag/build_catkin.sh b/recipes/ros-jazzy-apriltag/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-apriltag/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-apriltag/recipe.yaml b/recipes/ros-jazzy-apriltag/recipe.yaml new file mode 100644 index 00000000..5f18186c --- /dev/null +++ b/recipes/ros-jazzy-apriltag/recipe.yaml @@ -0,0 +1,96 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-apriltag + version: 3.4.2 +source: + git: https://github.com/ros2-gbp/apriltag-release.git + tag: release/jazzy/apriltag/3.4.2-1 + target_directory: ros-jazzy-apriltag/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libopencv + - numpy + - pip + - py-opencv + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-backward-ros/bld_catkin.bat b/recipes/ros-jazzy-backward-ros/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-backward-ros/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-backward-ros/build_catkin.sh b/recipes/ros-jazzy-backward-ros/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-backward-ros/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-backward-ros/patch/ros-jazzy-backward-ros.patch b/recipes/ros-jazzy-backward-ros/patch/ros-jazzy-backward-ros.patch new file mode 100644 index 00000000..91186cdd --- /dev/null +++ b/recipes/ros-jazzy-backward-ros/patch/ros-jazzy-backward-ros.patch @@ -0,0 +1,82 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 64af86c..9be355d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,6 +27,7 @@ include(cmake/BackwardConfig.cmake) + + set(CMAKE_CXX_STANDARD_REQUIRED True) + set(CMAKE_CXX_STANDARD 14) ++set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + + ############################################################################### + # COMPILER FLAGS +diff --git a/cmake/BackwardConfig.cmake b/cmake/BackwardConfig.cmake +index 77d22d2..8e95287 100644 +--- a/cmake/BackwardConfig.cmake ++++ b/cmake/BackwardConfig.cmake +@@ -125,11 +125,14 @@ endforeach() + + set(BACKWARD_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}") + ++set(FIND_PACKAGE_REQUIRED_VARS BACKWARD_INCLUDE_DIR) ++if(DEFINED BACKWARD_LIBRARIES) ++ list(APPEND FIND_PACKAGE_REQUIRED_VARS BACKWARD_LIBRARIES) ++endif() ++ + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Backward +- REQUIRED_VARS +- BACKWARD_INCLUDE_DIR +- BACKWARD_LIBRARIES ++ REQUIRED_VARS ${FIND_PACKAGE_REQUIRED_VARS} + ) + list(APPEND _BACKWARD_INCLUDE_DIRS ${BACKWARD_INCLUDE_DIR}) + +diff --git a/cmake/BackwardConfigAment.cmake b/cmake/BackwardConfigAment.cmake +index 273a51a..d981cbb 100644 +--- a/cmake/BackwardConfigAment.cmake ++++ b/cmake/BackwardConfigAment.cmake +@@ -24,5 +24,13 @@ foreach(lib ${backward_ros_forced_LIBRARIES}) + set(backward_ros_full_path_LIBRARIES "${backward_ros_full_path_LIBRARIES} ${lib}") + endif() + endforeach() +-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--no-as-needed ${backward_ros_full_path_LIBRARIES} -Wl,--as-needed ${CMAKE_EXE_LINKER_FLAGS}") ++set(no_as_needed) ++set(as_needed) + ++if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") ++ set(no_as_needed "-Wl,--no-as-needed") ++ set(as_needed "-Wl,--as-needed") ++endif() ++ ++SET(CMAKE_EXE_LINKER_FLAGS "${no_as_needed} ${backward_ros_full_path_LIBRARIES} ${as_needed} ${CMAKE_EXE_LINKER_FLAGS}") ++ +diff --git a/backward_rosConfig.cmake.in b/backward_rosConfig.cmake.in +index 6713e91..282e194 100644 +--- a/backward_rosConfig.cmake.in ++++ b/backward_rosConfig.cmake.in +@@ -2,8 +2,10 @@ + set_and_check(backward_ros_INCLUDE_DIRS "@BACKWARD_ROS_INSTALL_PREFIX@/include") + if(WIN32) + set_and_check(backward_ros_LIBRARIES "@BACKWARD_ROS_INSTALL_PREFIX@/lib/backward.lib") ++elseif(APPLE) ++set_and_check(backward_ros_LIBRARIES "@BACKWARD_ROS_INSTALL_PREFIX@/lib/libbackward.dylib") + else() + set_and_check(backward_ros_LIBRARIES "@BACKWARD_ROS_INSTALL_PREFIX@/lib/libbackward.so") + endif() + check_required_components(backward_ros) +-include(@BACKWARD_ROS_INSTALL_PREFIX@/share/@PROJECT_NAME@/cmake/BackwardConfigAment.cmake) +\ No newline at end of file ++include(@BACKWARD_ROS_INSTALL_PREFIX@/share/@PROJECT_NAME@/cmake/BackwardConfigAment.cmake) +diff --git a/package.xml b/package.xml +index e8bc10a..d39e613 100644 +--- a/package.xml ++++ b/package.xml +@@ -11,6 +11,7 @@ + https://github.com/pal-robotics/backward_ros + + cmake ++ ament_cmake_libraries + + libdw-dev + diff --git a/recipes/ros-jazzy-backward-ros/recipe.yaml b/recipes/ros-jazzy-backward-ros/recipe.yaml new file mode 100644 index 00000000..aa487e14 --- /dev/null +++ b/recipes/ros-jazzy-backward-ros/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-backward-ros + version: 1.0.6 +source: + git: https://github.com/ros2-gbp/backward_ros-release.git + tag: release/jazzy/backward_ros/1.0.6-1 + target_directory: ros-jazzy-backward-ros/src/work + patches: + - patch/ros-jazzy-backward-ros.patch + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - ${{ 'binutils' if linux or (osx and x86_64) }} + - ${{ 'elfutils' if linux }} + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-libraries + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-behaviortree-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-behaviortree-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-behaviortree-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-behaviortree-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-behaviortree-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-behaviortree-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-behaviortree-cpp/patch/ros-jazzy-behaviortree-cpp.patch b/recipes/ros-jazzy-behaviortree-cpp/patch/ros-jazzy-behaviortree-cpp.patch new file mode 100644 index 00000000..88c876b6 --- /dev/null +++ b/recipes/ros-jazzy-behaviortree-cpp/patch/ros-jazzy-behaviortree-cpp.patch @@ -0,0 +1,13 @@ +diff --git a/3rdparty/lexy/include/lexy/input_location.hpp b/3rdparty/lexy/include/lexy/input_location.hpp +index e6c14cf..654cdaa 100644 +--- a/3rdparty/lexy/include/lexy/input_location.hpp ++++ b/3rdparty/lexy/include/lexy/input_location.hpp +@@ -162,7 +162,7 @@ public: + { + if (lhs._line_nr != rhs._line_nr) + return lhs._line_nr < rhs._line_nr; +- return lhs._column_nr < rhs._colum_nr; ++ return lhs._column_nr < rhs._column_nr; + } + friend constexpr bool operator<=(const input_location& lhs, const input_location& rhs) + { diff --git a/recipes/ros-jazzy-behaviortree-cpp/recipe.yaml b/recipes/ros-jazzy-behaviortree-cpp/recipe.yaml new file mode 100644 index 00000000..3f389b49 --- /dev/null +++ b/recipes/ros-jazzy-behaviortree-cpp/recipe.yaml @@ -0,0 +1,97 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-behaviortree-cpp + version: 4.6.2 +source: + git: https://github.com/ros2-gbp/behaviortree_cpp_v4-release.git + tag: release/jazzy/behaviortree_cpp/4.6.2-1 + target_directory: ros-jazzy-behaviortree-cpp/src/work + patches: + - patch/ros-jazzy-behaviortree-cpp.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - cppzmq + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-index-cpp + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - sqlite 3.* + - zeromq + run: + - cppzmq + - python + - ros-jazzy-ament-index-cpp + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - sqlite + - zeromq + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-bond/bld_ament_cmake.bat b/recipes/ros-jazzy-bond/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-bond/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-bond/build_ament_cmake.sh b/recipes/ros-jazzy-bond/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-bond/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-bond/recipe.yaml b/recipes/ros-jazzy-bond/recipe.yaml new file mode 100644 index 00000000..9d3cf575 --- /dev/null +++ b/recipes/ros-jazzy-bond/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-bond + version: 4.1.0 +source: + git: https://github.com/ros2-gbp/bond_core-release.git + tag: release/jazzy/bond/4.1.0-1 + target_directory: ros-jazzy-bond/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-bondcpp/bld_ament_cmake.bat b/recipes/ros-jazzy-bondcpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-bondcpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-bondcpp/build_ament_cmake.sh b/recipes/ros-jazzy-bondcpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-bondcpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-bondcpp/recipe.yaml b/recipes/ros-jazzy-bondcpp/recipe.yaml new file mode 100644 index 00000000..5d0d1d45 --- /dev/null +++ b/recipes/ros-jazzy-bondcpp/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-bondcpp + version: 4.1.0 +source: + git: https://github.com/ros2-gbp/bond_core-release.git + tag: release/jazzy/bondcpp/4.1.0-1 + target_directory: ros-jazzy-bondcpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pkg-config + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-bond + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-smclib + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-bond + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-smclib + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-builtin-interfaces/bld_ament_cmake.bat b/recipes/ros-jazzy-builtin-interfaces/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-builtin-interfaces/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-builtin-interfaces/build_ament_cmake.sh b/recipes/ros-jazzy-builtin-interfaces/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-builtin-interfaces/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-builtin-interfaces/recipe.yaml b/recipes/ros-jazzy-builtin-interfaces/recipe.yaml new file mode 100644 index 00000000..f4861d9b --- /dev/null +++ b/recipes/ros-jazzy-builtin-interfaces/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-builtin-interfaces + version: 2.0.2 +source: + git: https://github.com/ros2-gbp/rcl_interfaces-release.git + tag: release/jazzy/builtin_interfaces/2.0.2-2 + target_directory: ros-jazzy-builtin-interfaces/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-core-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-core-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-camera-calibration-parsers/bld_ament_cmake.bat b/recipes/ros-jazzy-camera-calibration-parsers/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-camera-calibration-parsers/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-camera-calibration-parsers/build_ament_cmake.sh b/recipes/ros-jazzy-camera-calibration-parsers/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-camera-calibration-parsers/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-camera-calibration-parsers/recipe.yaml b/recipes/ros-jazzy-camera-calibration-parsers/recipe.yaml new file mode 100644 index 00000000..79005414 --- /dev/null +++ b/recipes/ros-jazzy-camera-calibration-parsers/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-camera-calibration-parsers + version: 5.1.5 +source: + git: https://github.com/ros2-gbp/image_common-release.git + tag: release/jazzy/camera_calibration_parsers/5.1.5-1 + target_directory: ros-jazzy-camera-calibration-parsers/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-camera-calibration/bld_ament_python.bat b/recipes/ros-jazzy-camera-calibration/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-camera-calibration/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-camera-calibration/build_ament_python.sh b/recipes/ros-jazzy-camera-calibration/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-camera-calibration/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-camera-calibration/recipe.yaml b/recipes/ros-jazzy-camera-calibration/recipe.yaml new file mode 100644 index 00000000..0afeb018 --- /dev/null +++ b/recipes/ros-jazzy-camera-calibration/recipe.yaml @@ -0,0 +1,105 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-camera-calibration + version: 5.0.6 +source: + git: https://github.com/ros2-gbp/image_pipeline-release.git + tag: release/jazzy/camera_calibration/5.0.6-1 + target_directory: ros-jazzy-camera-calibration/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libopencv + - numpy + - pip + - py-opencv + - pytest + - python + - requests + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-cv-bridge + - ros-jazzy-image-geometry + - ros-jazzy-message-filters + - ros-jazzy-rclpy + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-srvs + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - libopencv + - py-opencv + - python + - ros-jazzy-cv-bridge + - ros-jazzy-image-geometry + - ros-jazzy-message-filters + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-srvs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-camera-info-manager/bld_ament_cmake.bat b/recipes/ros-jazzy-camera-info-manager/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-camera-info-manager/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-camera-info-manager/build_ament_cmake.sh b/recipes/ros-jazzy-camera-info-manager/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-camera-info-manager/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-camera-info-manager/recipe.yaml b/recipes/ros-jazzy-camera-info-manager/recipe.yaml new file mode 100644 index 00000000..e33aeb8d --- /dev/null +++ b/recipes/ros-jazzy-camera-info-manager/recipe.yaml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-camera-info-manager + version: 5.1.5 +source: + git: https://github.com/ros2-gbp/image_common-release.git + tag: release/jazzy/camera_info_manager/5.1.5-1 + target_directory: ros-jazzy-camera-info-manager/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-index-cpp + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-camera-calibration-parsers + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-rcpputils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-index-cpp + - ros-jazzy-camera-calibration-parsers + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-rcpputils + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-chomp-motion-planner/bld_ament_cmake.bat b/recipes/ros-jazzy-chomp-motion-planner/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-chomp-motion-planner/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-chomp-motion-planner/build_ament_cmake.sh b/recipes/ros-jazzy-chomp-motion-planner/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-chomp-motion-planner/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-chomp-motion-planner/recipe.yaml b/recipes/ros-jazzy-chomp-motion-planner/recipe.yaml new file mode 100644 index 00000000..86047f33 --- /dev/null +++ b/recipes/ros-jazzy-chomp-motion-planner/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-chomp-motion-planner + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/chomp_motion_planner/2.12.1-1 + target_directory: ros-jazzy-chomp-motion-planner/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rsl + - ros-jazzy-trajectory-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-rsl + - ros-jazzy-trajectory-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-class-loader/bld_ament_cmake.bat b/recipes/ros-jazzy-class-loader/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-class-loader/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-class-loader/build_ament_cmake.sh b/recipes/ros-jazzy-class-loader/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-class-loader/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-class-loader/recipe.yaml b/recipes/ros-jazzy-class-loader/recipe.yaml new file mode 100644 index 00000000..423798a9 --- /dev/null +++ b/recipes/ros-jazzy-class-loader/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-class-loader + version: 2.7.0 +source: + git: https://github.com/ros2-gbp/class_loader-release.git + tag: release/jazzy/class_loader/2.7.0-3 + target_directory: ros-jazzy-class-loader/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - console_bridge + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-console-bridge-vendor + - ros-jazzy-rcpputils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - console_bridge + - python + - ros-jazzy-console-bridge-vendor + - ros-jazzy-rcpputils + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-common-interfaces/bld_ament_cmake.bat b/recipes/ros-jazzy-common-interfaces/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-common-interfaces/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-common-interfaces/build_ament_cmake.sh b/recipes/ros-jazzy-common-interfaces/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-common-interfaces/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-common-interfaces/recipe.yaml b/recipes/ros-jazzy-common-interfaces/recipe.yaml new file mode 100644 index 00000000..88abda2d --- /dev/null +++ b/recipes/ros-jazzy-common-interfaces/recipe.yaml @@ -0,0 +1,98 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-common-interfaces + version: 5.3.5 +source: + git: https://github.com/ros2-gbp/common_interfaces-release.git + tag: release/jazzy/common_interfaces/5.3.5-1 + target_directory: ros-jazzy-common-interfaces/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-actionlib-msgs + - ros-jazzy-builtin-interfaces + - ros-jazzy-diagnostic-msgs + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-shape-msgs + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-stereo-msgs + - ros-jazzy-trajectory-msgs + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-composition-interfaces/bld_ament_cmake.bat b/recipes/ros-jazzy-composition-interfaces/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-composition-interfaces/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-composition-interfaces/build_ament_cmake.sh b/recipes/ros-jazzy-composition-interfaces/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-composition-interfaces/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-composition-interfaces/recipe.yaml b/recipes/ros-jazzy-composition-interfaces/recipe.yaml new file mode 100644 index 00000000..abfad0ef --- /dev/null +++ b/recipes/ros-jazzy-composition-interfaces/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-composition-interfaces + version: 2.0.2 +source: + git: https://github.com/ros2-gbp/rcl_interfaces-release.git + tag: release/jazzy/composition_interfaces/2.0.2-2 + target_directory: ros-jazzy-composition-interfaces/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-rcl-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rcl-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-composition/bld_ament_cmake.bat b/recipes/ros-jazzy-composition/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-composition/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-composition/build_ament_cmake.sh b/recipes/ros-jazzy-composition/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-composition/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-composition/recipe.yaml b/recipes/ros-jazzy-composition/recipe.yaml new file mode 100644 index 00000000..a3acf211 --- /dev/null +++ b/recipes/ros-jazzy-composition/recipe.yaml @@ -0,0 +1,103 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-composition + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/composition/0.33.5-1 + target_directory: ros-jazzy-composition/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-example-interfaces + - ros-jazzy-launch + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-launch-testing-ros + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rcutils + - ros-jazzy-rmw-implementation-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-example-interfaces + - ros-jazzy-launch-ros + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-compressed-depth-image-transport/bld_ament_cmake.bat b/recipes/ros-jazzy-compressed-depth-image-transport/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-compressed-depth-image-transport/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-compressed-depth-image-transport/build_ament_cmake.sh b/recipes/ros-jazzy-compressed-depth-image-transport/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-compressed-depth-image-transport/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-compressed-depth-image-transport/recipe.yaml b/recipes/ros-jazzy-compressed-depth-image-transport/recipe.yaml new file mode 100644 index 00000000..626c4dc5 --- /dev/null +++ b/recipes/ros-jazzy-compressed-depth-image-transport/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-compressed-depth-image-transport + version: 4.0.3 +source: + git: https://github.com/ros2-gbp/image_transport_plugins-release.git + tag: release/jazzy/compressed_depth_image_transport/4.0.3-1 + target_directory: ros-jazzy-compressed-depth-image-transport/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-cv-bridge + - ros-jazzy-image-transport + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-cv-bridge + - ros-jazzy-image-transport + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-compressed-image-transport/bld_ament_cmake.bat b/recipes/ros-jazzy-compressed-image-transport/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-compressed-image-transport/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-compressed-image-transport/build_ament_cmake.sh b/recipes/ros-jazzy-compressed-image-transport/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-compressed-image-transport/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-compressed-image-transport/recipe.yaml b/recipes/ros-jazzy-compressed-image-transport/recipe.yaml new file mode 100644 index 00000000..bf2b282e --- /dev/null +++ b/recipes/ros-jazzy-compressed-image-transport/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-compressed-image-transport + version: 4.0.3 +source: + git: https://github.com/ros2-gbp/image_transport_plugins-release.git + tag: release/jazzy/compressed_image_transport/4.0.3-1 + target_directory: ros-jazzy-compressed-image-transport/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-cv-bridge + - ros-jazzy-image-transport + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-cv-bridge + - ros-jazzy-image-transport + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-console-bridge-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-console-bridge-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-console-bridge-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-console-bridge-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-console-bridge-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-console-bridge-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-console-bridge-vendor/recipe.yaml b/recipes/ros-jazzy-console-bridge-vendor/recipe.yaml new file mode 100644 index 00000000..b311f074 --- /dev/null +++ b/recipes/ros-jazzy-console-bridge-vendor/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-console-bridge-vendor + version: 1.7.1 +source: + git: https://github.com/ros2-gbp/console_bridge_vendor-release.git + tag: release/jazzy/console_bridge_vendor/1.7.1-3 + target_directory: ros-jazzy-console-bridge-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - console_bridge + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-performance-test-fixture + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - console_bridge + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-control-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-control-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-control-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-control-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-control-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-control-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-control-msgs/recipe.yaml b/recipes/ros-jazzy-control-msgs/recipe.yaml new file mode 100644 index 00000000..5e3c697a --- /dev/null +++ b/recipes/ros-jazzy-control-msgs/recipe.yaml @@ -0,0 +1,100 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-control-msgs + version: 5.3.0 +source: + git: https://github.com/ros2-gbp/control_msgs-release.git + tag: release/jazzy/control_msgs/5.3.0-1 + target_directory: ros-jazzy-control-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-action-msgs + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-trajectory-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-action-msgs + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-trajectory-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-controller-interface/bld_ament_cmake.bat b/recipes/ros-jazzy-controller-interface/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-controller-interface/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-controller-interface/build_ament_cmake.sh b/recipes/ros-jazzy-controller-interface/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-controller-interface/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-controller-interface/patch/ros-jazzy-controller-interface.patch b/recipes/ros-jazzy-controller-interface/patch/ros-jazzy-controller-interface.patch new file mode 100644 index 00000000..c03f977c --- /dev/null +++ b/recipes/ros-jazzy-controller-interface/patch/ros-jazzy-controller-interface.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 60b213cd5..3cb708ef9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,11 +1,6 @@ + cmake_minimum_required(VERSION 3.16) + project(controller_interface LANGUAGES CXX) + +-if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") +- add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow +- -Werror=missing-braces) +-endif() +- + # using this instead of visibility macros + # S1 from https://github.com/ros-controls/ros2_controllers/issues/1053 + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) diff --git a/recipes/ros-jazzy-controller-interface/recipe.yaml b/recipes/ros-jazzy-controller-interface/recipe.yaml new file mode 100644 index 00000000..096c1a02 --- /dev/null +++ b/recipes/ros-jazzy-controller-interface/recipe.yaml @@ -0,0 +1,96 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-controller-interface + version: 4.23.0 +source: + git: https://github.com/ros2-gbp/ros2_control-release.git + tag: release/jazzy/controller_interface/4.23.0-1 + target_directory: ros-jazzy-controller-interface/src/work + patches: + - patch/ros-jazzy-controller-interface.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gen-version-h + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-geometry-msgs + - ros-jazzy-hardware-interface + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-realtime-tools + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-hardware-interface + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-realtime-tools + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-controller-manager-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-controller-manager-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-controller-manager-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-controller-manager-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-controller-manager-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-controller-manager-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-controller-manager-msgs/recipe.yaml b/recipes/ros-jazzy-controller-manager-msgs/recipe.yaml new file mode 100644 index 00000000..06a68675 --- /dev/null +++ b/recipes/ros-jazzy-controller-manager-msgs/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-controller-manager-msgs + version: 4.23.0 +source: + git: https://github.com/ros2-gbp/ros2_control-release.git + tag: release/jazzy/controller_manager_msgs/4.23.0-1 + target_directory: ros-jazzy-controller-manager-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-lifecycle-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-lifecycle-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-controller-manager/bld_ament_cmake.bat b/recipes/ros-jazzy-controller-manager/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-controller-manager/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-controller-manager/build_ament_cmake.sh b/recipes/ros-jazzy-controller-manager/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-controller-manager/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-controller-manager/recipe.yaml b/recipes/ros-jazzy-controller-manager/recipe.yaml new file mode 100644 index 00000000..8f2e124c --- /dev/null +++ b/recipes/ros-jazzy-controller-manager/recipe.yaml @@ -0,0 +1,132 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-controller-manager + version: 4.23.0 +source: + git: https://github.com/ros2-gbp/ros2_control-release.git + tag: release/jazzy/controller_manager/4.23.0-1 + target_directory: ros-jazzy-controller-manager/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - coverage + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gen-version-h + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-index-cpp + - ros-jazzy-backward-ros + - ros-jazzy-controller-interface + - ros-jazzy-controller-manager-msgs + - ros-jazzy-diagnostic-updater + - ros-jazzy-example-interfaces + - ros-jazzy-generate-parameter-library + - ros-jazzy-hardware-interface + - ros-jazzy-hardware-interface-testing + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ros + - ros-jazzy-libstatistics-collector + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclpy + - ros-jazzy-rcpputils + - ros-jazzy-realtime-tools + - ros-jazzy-robot-state-publisher + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-ros2-control-test-assets + - ros-jazzy-ros2param + - ros-jazzy-ros2run + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-index-cpp + - ros-jazzy-backward-ros + - ros-jazzy-controller-interface + - ros-jazzy-controller-manager-msgs + - ros-jazzy-diagnostic-updater + - ros-jazzy-generate-parameter-library + - ros-jazzy-hardware-interface + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-libstatistics-collector + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rcpputils + - ros-jazzy-realtime-tools + - ros-jazzy-ros-workspace + - ros-jazzy-ros2-control-test-assets + - ros-jazzy-ros2param + - ros-jazzy-ros2run + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-costmap-queue/bld_ament_cmake.bat b/recipes/ros-jazzy-costmap-queue/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-costmap-queue/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-costmap-queue/build_ament_cmake.sh b/recipes/ros-jazzy-costmap-queue/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-costmap-queue/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-costmap-queue/recipe.yaml b/recipes/ros-jazzy-costmap-queue/recipe.yaml new file mode 100644 index 00000000..00318707 --- /dev/null +++ b/recipes/ros-jazzy-costmap-queue/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-costmap-queue + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/costmap_queue/1.3.4-1 + target_directory: ros-jazzy-costmap-queue/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-nav2-common + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-cv-bridge/bld_ament_cmake.bat b/recipes/ros-jazzy-cv-bridge/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-cv-bridge/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-cv-bridge/build_ament_cmake.sh b/recipes/ros-jazzy-cv-bridge/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-cv-bridge/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-cv-bridge/recipe.yaml b/recipes/ros-jazzy-cv-bridge/recipe.yaml new file mode 100644 index 00000000..d14e8ee3 --- /dev/null +++ b/recipes/ros-jazzy-cv-bridge/recipe.yaml @@ -0,0 +1,115 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-cv-bridge + version: 4.1.0 +source: + git: https://github.com/ros2-gbp/vision_opencv-release.git + tag: release/jazzy/cv_bridge/4.1.0-1 + target_directory: ros-jazzy-cv-bridge/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libboost-devel + - libboost-python-devel + - libopencv + - numpy + - pip + - py-opencv + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-python-cmake-module + - ros-jazzy-rclcpp + - ros-jazzy-rcpputils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - libboost-python + - libopencv + - numpy + - py-opencv + - python + - ros-jazzy-ament-index-python + - ros-jazzy-rclcpp + - ros-jazzy-rcpputils + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-cyclonedds/bld_catkin.bat b/recipes/ros-jazzy-cyclonedds/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-cyclonedds/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-cyclonedds/build_catkin.sh b/recipes/ros-jazzy-cyclonedds/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-cyclonedds/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-cyclonedds/recipe.yaml b/recipes/ros-jazzy-cyclonedds/recipe.yaml new file mode 100644 index 00000000..4b121cd9 --- /dev/null +++ b/recipes/ros-jazzy-cyclonedds/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-cyclonedds + version: 0.10.5 +source: + git: https://github.com/ros2-gbp/cyclonedds-release.git + tag: release/jazzy/cyclonedds/0.10.5-1 + target_directory: ros-jazzy-cyclonedds/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - if: build_platform != target_platform + then: + - ros-jazzy-cyclonedds + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - openssl + - pip + - python + - ros-jazzy-iceoryx-binding-c + - ros-jazzy-iceoryx-hoofs + - ros-jazzy-iceoryx-posh + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - openssl + - python + - ros-jazzy-iceoryx-binding-c + - ros-jazzy-iceoryx-hoofs + - ros-jazzy-iceoryx-posh + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-demo-nodes-cpp-native/bld_ament_cmake.bat b/recipes/ros-jazzy-demo-nodes-cpp-native/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-demo-nodes-cpp-native/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-demo-nodes-cpp-native/build_ament_cmake.sh b/recipes/ros-jazzy-demo-nodes-cpp-native/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-demo-nodes-cpp-native/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-demo-nodes-cpp-native/recipe.yaml b/recipes/ros-jazzy-demo-nodes-cpp-native/recipe.yaml new file mode 100644 index 00000000..93d9596d --- /dev/null +++ b/recipes/ros-jazzy-demo-nodes-cpp-native/recipe.yaml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-demo-nodes-cpp-native + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/demo_nodes_cpp_native/0.33.5-1 + target_directory: ros-jazzy-demo-nodes-cpp-native/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-launch + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-launch-testing-ros + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rmw-fastrtps-cpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rmw-fastrtps-cpp + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-demo-nodes-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-demo-nodes-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-demo-nodes-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-demo-nodes-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-demo-nodes-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-demo-nodes-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-demo-nodes-cpp/recipe.yaml b/recipes/ros-jazzy-demo-nodes-cpp/recipe.yaml new file mode 100644 index 00000000..83507ce4 --- /dev/null +++ b/recipes/ros-jazzy-demo-nodes-cpp/recipe.yaml @@ -0,0 +1,111 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-demo-nodes-cpp + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/demo_nodes_cpp/0.33.5-1 + target_directory: ros-jazzy-demo-nodes-cpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-example-interfaces + - ros-jazzy-launch + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-launch-testing-ros + - ros-jazzy-rcl + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-example-interfaces + - ros-jazzy-launch-ros + - ros-jazzy-launch-xml + - ros-jazzy-rcl + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-demo-nodes-py/bld_ament_python.bat b/recipes/ros-jazzy-demo-nodes-py/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-demo-nodes-py/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-demo-nodes-py/build_ament_python.sh b/recipes/ros-jazzy-demo-nodes-py/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-demo-nodes-py/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-demo-nodes-py/recipe.yaml b/recipes/ros-jazzy-demo-nodes-py/recipe.yaml new file mode 100644 index 00000000..5e7f91c1 --- /dev/null +++ b/recipes/ros-jazzy-demo-nodes-py/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-demo-nodes-py + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/demo_nodes_py/0.33.5-1 + target_directory: ros-jazzy-demo-nodes-py/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ament-index-python + - ros-jazzy-example-interfaces + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-depth-image-proc/bld_ament_cmake.bat b/recipes/ros-jazzy-depth-image-proc/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-depth-image-proc/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-depth-image-proc/build_ament_cmake.sh b/recipes/ros-jazzy-depth-image-proc/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-depth-image-proc/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-depth-image-proc/recipe.yaml b/recipes/ros-jazzy-depth-image-proc/recipe.yaml new file mode 100644 index 00000000..187d2f70 --- /dev/null +++ b/recipes/ros-jazzy-depth-image-proc/recipe.yaml @@ -0,0 +1,126 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-depth-image-proc + version: 5.0.6 +source: + git: https://github.com/ros2-gbp/image_pipeline-release.git + tag: release/jazzy/depth_image_proc/5.0.6-1 + target_directory: ros-jazzy-depth-image-proc/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libopencv + - numpy + - pip + - py-opencv + - python + - ros-jazzy-ament-cmake-auto + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-class-loader + - ros-jazzy-cv-bridge + - ros-jazzy-image-geometry + - ros-jazzy-image-proc + - ros-jazzy-image-transport + - ros-jazzy-message-filters + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-stereo-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - libopencv + - py-opencv + - python + - ros-jazzy-cv-bridge + - ros-jazzy-image-geometry + - ros-jazzy-image-proc + - ros-jazzy-image-transport + - ros-jazzy-message-filters + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-stereo-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-depthimage-to-laserscan/bld_ament_cmake.bat b/recipes/ros-jazzy-depthimage-to-laserscan/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-depthimage-to-laserscan/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-depthimage-to-laserscan/build_ament_cmake.sh b/recipes/ros-jazzy-depthimage-to-laserscan/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-depthimage-to-laserscan/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-depthimage-to-laserscan/recipe.yaml b/recipes/ros-jazzy-depthimage-to-laserscan/recipe.yaml new file mode 100644 index 00000000..51b0c435 --- /dev/null +++ b/recipes/ros-jazzy-depthimage-to-laserscan/recipe.yaml @@ -0,0 +1,110 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-depthimage-to-laserscan + version: 2.5.1 +source: + git: https://github.com/ros2-gbp/depthimage_to_laserscan-release.git + tag: release/jazzy/depthimage_to_laserscan/2.5.1-3 + target_directory: ros-jazzy-depthimage-to-laserscan/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libopencv + - numpy + - pip + - py-opencv + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-image-geometry + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - libopencv + - py-opencv + - python + - ros-jazzy-image-geometry + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-desktop-full/bld_ament_cmake.bat b/recipes/ros-jazzy-desktop-full/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-desktop-full/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-desktop-full/build_ament_cmake.sh b/recipes/ros-jazzy-desktop-full/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-desktop-full/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-desktop-full/recipe.yaml b/recipes/ros-jazzy-desktop-full/recipe.yaml new file mode 100644 index 00000000..d933a8e2 --- /dev/null +++ b/recipes/ros-jazzy-desktop-full/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-desktop-full + version: 0.11.0 +source: + git: https://github.com/ros2-gbp/variants-release.git + tag: release/jazzy/desktop_full/0.11.0-1 + target_directory: ros-jazzy-desktop-full/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-desktop + - ros-jazzy-perception + - ros-jazzy-ros-gz-sim-demos + - ros-jazzy-ros-workspace + - ros-jazzy-simulation + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-desktop/bld_ament_cmake.bat b/recipes/ros-jazzy-desktop/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-desktop/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-desktop/build_ament_cmake.sh b/recipes/ros-jazzy-desktop/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-desktop/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-desktop/recipe.yaml b/recipes/ros-jazzy-desktop/recipe.yaml new file mode 100644 index 00000000..a1228844 --- /dev/null +++ b/recipes/ros-jazzy-desktop/recipe.yaml @@ -0,0 +1,129 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-desktop + version: 0.11.0 +source: + git: https://github.com/ros2-gbp/variants-release.git + tag: release/jazzy/desktop/0.11.0-1 + target_directory: ros-jazzy-desktop/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-action-tutorials-cpp + - ros-jazzy-action-tutorials-interfaces + - ros-jazzy-action-tutorials-py + - ros-jazzy-angles + - ros-jazzy-composition + - ros-jazzy-demo-nodes-cpp + - ros-jazzy-demo-nodes-cpp-native + - ros-jazzy-demo-nodes-py + - ros-jazzy-depthimage-to-laserscan + - ros-jazzy-dummy-map-server + - ros-jazzy-dummy-robot-bringup + - ros-jazzy-dummy-sensors + - ros-jazzy-examples-rclcpp-minimal-action-client + - ros-jazzy-examples-rclcpp-minimal-action-server + - ros-jazzy-examples-rclcpp-minimal-client + - ros-jazzy-examples-rclcpp-minimal-composition + - ros-jazzy-examples-rclcpp-minimal-publisher + - ros-jazzy-examples-rclcpp-minimal-service + - ros-jazzy-examples-rclcpp-minimal-subscriber + - ros-jazzy-examples-rclcpp-minimal-timer + - ros-jazzy-examples-rclcpp-multithreaded-executor + - ros-jazzy-examples-rclpy-executors + - ros-jazzy-examples-rclpy-minimal-action-client + - ros-jazzy-examples-rclpy-minimal-action-server + - ros-jazzy-examples-rclpy-minimal-client + - ros-jazzy-examples-rclpy-minimal-publisher + - ros-jazzy-examples-rclpy-minimal-service + - ros-jazzy-examples-rclpy-minimal-subscriber + - ros-jazzy-image-tools + - ros-jazzy-intra-process-demo + - ros-jazzy-joy + - ros-jazzy-lifecycle + - ros-jazzy-logging-demo + - ros-jazzy-pcl-conversions + - ros-jazzy-pendulum-msgs + - ros-jazzy-quality-of-service-demo-cpp + - ros-jazzy-quality-of-service-demo-py + - ros-jazzy-ros-base + - ros-jazzy-ros-workspace + - ros-jazzy-rqt-common-plugins + - ros-jazzy-rviz-default-plugins + - ros-jazzy-rviz2 + - ros-jazzy-teleop-twist-joy + - ros-jazzy-teleop-twist-keyboard + - ros-jazzy-topic-monitor + - ros-jazzy-turtlesim + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-diagnostic-aggregator/bld_ament_cmake.bat b/recipes/ros-jazzy-diagnostic-aggregator/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-diagnostic-aggregator/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-diagnostic-aggregator/build_ament_cmake.sh b/recipes/ros-jazzy-diagnostic-aggregator/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-diagnostic-aggregator/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-diagnostic-aggregator/recipe.yaml b/recipes/ros-jazzy-diagnostic-aggregator/recipe.yaml new file mode 100644 index 00000000..b0e9c047 --- /dev/null +++ b/recipes/ros-jazzy-diagnostic-aggregator/recipe.yaml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-diagnostic-aggregator + version: 4.2.1 +source: + git: https://github.com/ros2-gbp/diagnostics-release.git + tag: release/jazzy/diagnostic_aggregator/4.2.1-1 + target_directory: ros-jazzy-diagnostic-aggregator/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-diagnostic-msgs + - ros-jazzy-launch-pytest + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-launch-testing-ros + - ros-jazzy-pluginlib + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclpy + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-diagnostic-common-diagnostics/bld_ament_cmake.bat b/recipes/ros-jazzy-diagnostic-common-diagnostics/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-diagnostic-common-diagnostics/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-diagnostic-common-diagnostics/build_ament_cmake.sh b/recipes/ros-jazzy-diagnostic-common-diagnostics/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-diagnostic-common-diagnostics/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-diagnostic-common-diagnostics/recipe.yaml b/recipes/ros-jazzy-diagnostic-common-diagnostics/recipe.yaml new file mode 100644 index 00000000..5daa4efe --- /dev/null +++ b/recipes/ros-jazzy-diagnostic-common-diagnostics/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-diagnostic-common-diagnostics + version: 4.2.1 +source: + git: https://github.com/ros2-gbp/diagnostics-release.git + tag: release/jazzy/diagnostic_common_diagnostics/4.2.1-1 + target_directory: ros-jazzy-diagnostic-common-diagnostics/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-ament-lint-auto + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - psutil + - python + - ros-jazzy-diagnostic-updater + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-diagnostic-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-diagnostic-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-diagnostic-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-diagnostic-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-diagnostic-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-diagnostic-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-diagnostic-msgs/recipe.yaml b/recipes/ros-jazzy-diagnostic-msgs/recipe.yaml new file mode 100644 index 00000000..2b2d6084 --- /dev/null +++ b/recipes/ros-jazzy-diagnostic-msgs/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-diagnostic-msgs + version: 5.3.5 +source: + git: https://github.com/ros2-gbp/common_interfaces-release.git + tag: release/jazzy/diagnostic_msgs/5.3.5-1 + target_directory: ros-jazzy-diagnostic-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-diagnostic-updater/bld_ament_cmake.bat b/recipes/ros-jazzy-diagnostic-updater/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-diagnostic-updater/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-diagnostic-updater/build_ament_cmake.sh b/recipes/ros-jazzy-diagnostic-updater/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-diagnostic-updater/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-diagnostic-updater/recipe.yaml b/recipes/ros-jazzy-diagnostic-updater/recipe.yaml new file mode 100644 index 00000000..23e6b399 --- /dev/null +++ b/recipes/ros-jazzy-diagnostic-updater/recipe.yaml @@ -0,0 +1,102 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-diagnostic-updater + version: 4.2.1 +source: + git: https://github.com/ros2-gbp/diagnostics-release.git + tag: release/jazzy/diagnostic_updater/4.2.1-1 + target_directory: ros-jazzy-diagnostic-updater/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-diagnostic-msgs + - ros-jazzy-launch + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ros + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-rclpy + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-diagnostic-msgs + - ros-jazzy-rclcpp + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-diagnostics/bld_ament_cmake.bat b/recipes/ros-jazzy-diagnostics/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-diagnostics/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-diagnostics/build_ament_cmake.sh b/recipes/ros-jazzy-diagnostics/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-diagnostics/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-diagnostics/recipe.yaml b/recipes/ros-jazzy-diagnostics/recipe.yaml new file mode 100644 index 00000000..1bba21f4 --- /dev/null +++ b/recipes/ros-jazzy-diagnostics/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-diagnostics + version: 4.2.1 +source: + git: https://github.com/ros2-gbp/diagnostics-release.git + tag: release/jazzy/diagnostics/4.2.1-1 + target_directory: ros-jazzy-diagnostics/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-diagnostic-aggregator + - ros-jazzy-diagnostic-common-diagnostics + - ros-jazzy-diagnostic-updater + - ros-jazzy-ros-workspace + - ros-jazzy-self-test + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-domain-coordinator/bld_ament_python.bat b/recipes/ros-jazzy-domain-coordinator/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-domain-coordinator/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-domain-coordinator/build_ament_python.sh b/recipes/ros-jazzy-domain-coordinator/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-domain-coordinator/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-domain-coordinator/recipe.yaml b/recipes/ros-jazzy-domain-coordinator/recipe.yaml new file mode 100644 index 00000000..d951f15a --- /dev/null +++ b/recipes/ros-jazzy-domain-coordinator/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-domain-coordinator + version: 0.12.0 +source: + git: https://github.com/ros2-gbp/ament_cmake_ros-release.git + tag: release/jazzy/domain_coordinator/0.12.0-3 + target_directory: ros-jazzy-domain-coordinator/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-dummy-map-server/bld_ament_cmake.bat b/recipes/ros-jazzy-dummy-map-server/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-dummy-map-server/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-dummy-map-server/build_ament_cmake.sh b/recipes/ros-jazzy-dummy-map-server/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-dummy-map-server/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-dummy-map-server/recipe.yaml b/recipes/ros-jazzy-dummy-map-server/recipe.yaml new file mode 100644 index 00000000..c034d2ce --- /dev/null +++ b/recipes/ros-jazzy-dummy-map-server/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-dummy-map-server + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/dummy_map_server/0.33.5-1 + target_directory: ros-jazzy-dummy-map-server/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-nav-msgs + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-nav-msgs + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-dummy-robot-bringup/bld_ament_cmake.bat b/recipes/ros-jazzy-dummy-robot-bringup/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-dummy-robot-bringup/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-dummy-robot-bringup/build_ament_cmake.sh b/recipes/ros-jazzy-dummy-robot-bringup/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-dummy-robot-bringup/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-dummy-robot-bringup/recipe.yaml b/recipes/ros-jazzy-dummy-robot-bringup/recipe.yaml new file mode 100644 index 00000000..7f6669a8 --- /dev/null +++ b/recipes/ros-jazzy-dummy-robot-bringup/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-dummy-robot-bringup + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/dummy_robot_bringup/0.33.5-1 + target_directory: ros-jazzy-dummy-robot-bringup/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-index-python + - ros-jazzy-dummy-map-server + - ros-jazzy-dummy-sensors + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-robot-state-publisher + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-dummy-sensors/bld_ament_cmake.bat b/recipes/ros-jazzy-dummy-sensors/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-dummy-sensors/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-dummy-sensors/build_ament_cmake.sh b/recipes/ros-jazzy-dummy-sensors/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-dummy-sensors/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-dummy-sensors/recipe.yaml b/recipes/ros-jazzy-dummy-sensors/recipe.yaml new file mode 100644 index 00000000..d649866e --- /dev/null +++ b/recipes/ros-jazzy-dummy-sensors/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-dummy-sensors + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/dummy_sensors/0.33.5-1 + target_directory: ros-jazzy-dummy-sensors/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-dwb-core/bld_ament_cmake.bat b/recipes/ros-jazzy-dwb-core/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-dwb-core/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-dwb-core/build_ament_cmake.sh b/recipes/ros-jazzy-dwb-core/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-dwb-core/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-dwb-core/recipe.yaml b/recipes/ros-jazzy-dwb-core/recipe.yaml new file mode 100644 index 00000000..d23d79a5 --- /dev/null +++ b/recipes/ros-jazzy-dwb-core/recipe.yaml @@ -0,0 +1,113 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-dwb-core + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/dwb_core/1.3.4-1 + target_directory: ros-jazzy-dwb-core/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-dwb-msgs + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-2d-msgs + - ros-jazzy-nav-2d-utils + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-dwb-msgs + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-2d-utils + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-dwb-critics/bld_ament_cmake.bat b/recipes/ros-jazzy-dwb-critics/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-dwb-critics/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-dwb-critics/build_ament_cmake.sh b/recipes/ros-jazzy-dwb-critics/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-dwb-critics/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-dwb-critics/recipe.yaml b/recipes/ros-jazzy-dwb-critics/recipe.yaml new file mode 100644 index 00000000..a3d86d88 --- /dev/null +++ b/recipes/ros-jazzy-dwb-critics/recipe.yaml @@ -0,0 +1,110 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-dwb-critics + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/dwb_critics/1.3.4-1 + target_directory: ros-jazzy-dwb-critics/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-angles + - ros-jazzy-costmap-queue + - ros-jazzy-dwb-core + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-2d-msgs + - ros-jazzy-nav-2d-utils + - ros-jazzy-nav2-common + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-angles + - ros-jazzy-costmap-queue + - ros-jazzy-dwb-core + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-2d-msgs + - ros-jazzy-nav-2d-utils + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-dwb-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-dwb-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-dwb-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-dwb-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-dwb-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-dwb-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-dwb-msgs/recipe.yaml b/recipes/ros-jazzy-dwb-msgs/recipe.yaml new file mode 100644 index 00000000..c96a69da --- /dev/null +++ b/recipes/ros-jazzy-dwb-msgs/recipe.yaml @@ -0,0 +1,96 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-dwb-msgs + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/dwb_msgs/1.3.4-1 + target_directory: ros-jazzy-dwb-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-2d-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-2d-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-dwb-plugins/bld_ament_cmake.bat b/recipes/ros-jazzy-dwb-plugins/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-dwb-plugins/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-dwb-plugins/build_ament_cmake.sh b/recipes/ros-jazzy-dwb-plugins/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-dwb-plugins/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-dwb-plugins/recipe.yaml b/recipes/ros-jazzy-dwb-plugins/recipe.yaml new file mode 100644 index 00000000..4b90650f --- /dev/null +++ b/recipes/ros-jazzy-dwb-plugins/recipe.yaml @@ -0,0 +1,102 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-dwb-plugins + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/dwb_plugins/1.3.4-1 + target_directory: ros-jazzy-dwb-plugins/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-angles + - ros-jazzy-dwb-core + - ros-jazzy-nav-2d-msgs + - ros-jazzy-nav-2d-utils + - ros-jazzy-nav2-common + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-angles + - ros-jazzy-dwb-core + - ros-jazzy-nav-2d-msgs + - ros-jazzy-nav-2d-utils + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-eigen-stl-containers/bld_ament_cmake.bat b/recipes/ros-jazzy-eigen-stl-containers/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-eigen-stl-containers/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-eigen-stl-containers/build_ament_cmake.sh b/recipes/ros-jazzy-eigen-stl-containers/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-eigen-stl-containers/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-eigen-stl-containers/recipe.yaml b/recipes/ros-jazzy-eigen-stl-containers/recipe.yaml new file mode 100644 index 00000000..6a666931 --- /dev/null +++ b/recipes/ros-jazzy-eigen-stl-containers/recipe.yaml @@ -0,0 +1,86 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-eigen-stl-containers + version: 1.0.0 +source: + git: https://github.com/ros2-gbp/eigen_stl_containers-release.git + tag: release/jazzy/eigen_stl_containers/1.0.0-7 + target_directory: ros-jazzy-eigen-stl-containers/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - eigen + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-eigen3-cmake-module/bld_ament_cmake.bat b/recipes/ros-jazzy-eigen3-cmake-module/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-eigen3-cmake-module/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-eigen3-cmake-module/build_ament_cmake.sh b/recipes/ros-jazzy-eigen3-cmake-module/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-eigen3-cmake-module/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-eigen3-cmake-module/recipe.yaml b/recipes/ros-jazzy-eigen3-cmake-module/recipe.yaml new file mode 100644 index 00000000..abc12b23 --- /dev/null +++ b/recipes/ros-jazzy-eigen3-cmake-module/recipe.yaml @@ -0,0 +1,86 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-eigen3-cmake-module + version: 0.3.0 +source: + git: https://github.com/ros2-gbp/eigen3_cmake_module-release.git + tag: release/jazzy/eigen3_cmake_module/0.3.0-3 + target_directory: ros-jazzy-eigen3-cmake-module/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-example-interfaces/bld_ament_cmake.bat b/recipes/ros-jazzy-example-interfaces/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-example-interfaces/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-example-interfaces/build_ament_cmake.sh b/recipes/ros-jazzy-example-interfaces/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-example-interfaces/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-example-interfaces/recipe.yaml b/recipes/ros-jazzy-example-interfaces/recipe.yaml new file mode 100644 index 00000000..427eda8f --- /dev/null +++ b/recipes/ros-jazzy-example-interfaces/recipe.yaml @@ -0,0 +1,86 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-example-interfaces + version: 0.12.0 +source: + git: https://github.com/ros2-gbp/example_interfaces-release.git + tag: release/jazzy/example_interfaces/0.12.0-3 + target_directory: ros-jazzy-example-interfaces/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-action-client/bld_ament_cmake.bat b/recipes/ros-jazzy-examples-rclcpp-minimal-action-client/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-action-client/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-action-client/build_ament_cmake.sh b/recipes/ros-jazzy-examples-rclcpp-minimal-action-client/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-action-client/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-action-client/recipe.yaml b/recipes/ros-jazzy-examples-rclcpp-minimal-action-client/recipe.yaml new file mode 100644 index 00000000..ff32ce1a --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-action-client/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-examples-rclcpp-minimal-action-client + version: 0.19.4 +source: + git: https://github.com/ros2-gbp/examples-release.git + tag: release/jazzy/examples_rclcpp_minimal_action_client/0.19.4-1 + target_directory: ros-jazzy-examples-rclcpp-minimal-action-client/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-example-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-example-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-action-server/bld_ament_cmake.bat b/recipes/ros-jazzy-examples-rclcpp-minimal-action-server/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-action-server/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-action-server/build_ament_cmake.sh b/recipes/ros-jazzy-examples-rclcpp-minimal-action-server/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-action-server/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-action-server/recipe.yaml b/recipes/ros-jazzy-examples-rclcpp-minimal-action-server/recipe.yaml new file mode 100644 index 00000000..4d2b6d8f --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-action-server/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-examples-rclcpp-minimal-action-server + version: 0.19.4 +source: + git: https://github.com/ros2-gbp/examples-release.git + tag: release/jazzy/examples_rclcpp_minimal_action_server/0.19.4-1 + target_directory: ros-jazzy-examples-rclcpp-minimal-action-server/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-example-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-example-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-client/bld_ament_cmake.bat b/recipes/ros-jazzy-examples-rclcpp-minimal-client/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-client/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-client/build_ament_cmake.sh b/recipes/ros-jazzy-examples-rclcpp-minimal-client/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-client/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-client/recipe.yaml b/recipes/ros-jazzy-examples-rclcpp-minimal-client/recipe.yaml new file mode 100644 index 00000000..db18b4e0 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-client/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-examples-rclcpp-minimal-client + version: 0.19.4 +source: + git: https://github.com/ros2-gbp/examples-release.git + tag: release/jazzy/examples_rclcpp_minimal_client/0.19.4-1 + target_directory: ros-jazzy-examples-rclcpp-minimal-client/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-example-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-example-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-composition/bld_ament_cmake.bat b/recipes/ros-jazzy-examples-rclcpp-minimal-composition/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-composition/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-composition/build_ament_cmake.sh b/recipes/ros-jazzy-examples-rclcpp-minimal-composition/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-composition/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-composition/recipe.yaml b/recipes/ros-jazzy-examples-rclcpp-minimal-composition/recipe.yaml new file mode 100644 index 00000000..c97b7c4d --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-composition/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-examples-rclcpp-minimal-composition + version: 0.19.4 +source: + git: https://github.com/ros2-gbp/examples-release.git + tag: release/jazzy/examples_rclcpp_minimal_composition/0.19.4-1 + target_directory: ros-jazzy-examples-rclcpp-minimal-composition/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-publisher/bld_ament_cmake.bat b/recipes/ros-jazzy-examples-rclcpp-minimal-publisher/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-publisher/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-publisher/build_ament_cmake.sh b/recipes/ros-jazzy-examples-rclcpp-minimal-publisher/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-publisher/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-publisher/recipe.yaml b/recipes/ros-jazzy-examples-rclcpp-minimal-publisher/recipe.yaml new file mode 100644 index 00000000..6f7f1ca6 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-publisher/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-examples-rclcpp-minimal-publisher + version: 0.19.4 +source: + git: https://github.com/ros2-gbp/examples-release.git + tag: release/jazzy/examples_rclcpp_minimal_publisher/0.19.4-1 + target_directory: ros-jazzy-examples-rclcpp-minimal-publisher/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-service/bld_ament_cmake.bat b/recipes/ros-jazzy-examples-rclcpp-minimal-service/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-service/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-service/build_ament_cmake.sh b/recipes/ros-jazzy-examples-rclcpp-minimal-service/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-service/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-service/recipe.yaml b/recipes/ros-jazzy-examples-rclcpp-minimal-service/recipe.yaml new file mode 100644 index 00000000..200d8e7e --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-service/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-examples-rclcpp-minimal-service + version: 0.19.4 +source: + git: https://github.com/ros2-gbp/examples-release.git + tag: release/jazzy/examples_rclcpp_minimal_service/0.19.4-1 + target_directory: ros-jazzy-examples-rclcpp-minimal-service/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-example-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-example-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-subscriber/bld_ament_cmake.bat b/recipes/ros-jazzy-examples-rclcpp-minimal-subscriber/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-subscriber/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-subscriber/build_ament_cmake.sh b/recipes/ros-jazzy-examples-rclcpp-minimal-subscriber/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-subscriber/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-subscriber/recipe.yaml b/recipes/ros-jazzy-examples-rclcpp-minimal-subscriber/recipe.yaml new file mode 100644 index 00000000..d5c062b3 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-subscriber/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-examples-rclcpp-minimal-subscriber + version: 0.19.4 +source: + git: https://github.com/ros2-gbp/examples-release.git + tag: release/jazzy/examples_rclcpp_minimal_subscriber/0.19.4-1 + target_directory: ros-jazzy-examples-rclcpp-minimal-subscriber/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-timer/bld_ament_cmake.bat b/recipes/ros-jazzy-examples-rclcpp-minimal-timer/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-timer/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-timer/build_ament_cmake.sh b/recipes/ros-jazzy-examples-rclcpp-minimal-timer/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-timer/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-examples-rclcpp-minimal-timer/recipe.yaml b/recipes/ros-jazzy-examples-rclcpp-minimal-timer/recipe.yaml new file mode 100644 index 00000000..c0440a3a --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-minimal-timer/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-examples-rclcpp-minimal-timer + version: 0.19.4 +source: + git: https://github.com/ros2-gbp/examples-release.git + tag: release/jazzy/examples_rclcpp_minimal_timer/0.19.4-1 + target_directory: ros-jazzy-examples-rclcpp-minimal-timer/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-examples-rclcpp-multithreaded-executor/bld_ament_cmake.bat b/recipes/ros-jazzy-examples-rclcpp-multithreaded-executor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-multithreaded-executor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-examples-rclcpp-multithreaded-executor/build_ament_cmake.sh b/recipes/ros-jazzy-examples-rclcpp-multithreaded-executor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-multithreaded-executor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-examples-rclcpp-multithreaded-executor/recipe.yaml b/recipes/ros-jazzy-examples-rclcpp-multithreaded-executor/recipe.yaml new file mode 100644 index 00000000..55c401c0 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclcpp-multithreaded-executor/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-examples-rclcpp-multithreaded-executor + version: 0.19.4 +source: + git: https://github.com/ros2-gbp/examples-release.git + tag: release/jazzy/examples_rclcpp_multithreaded_executor/0.19.4-1 + target_directory: ros-jazzy-examples-rclcpp-multithreaded-executor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-examples-rclpy-executors/bld_ament_python.bat b/recipes/ros-jazzy-examples-rclpy-executors/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-executors/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-examples-rclpy-executors/build_ament_python.sh b/recipes/ros-jazzy-examples-rclpy-executors/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-executors/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-examples-rclpy-executors/recipe.yaml b/recipes/ros-jazzy-examples-rclpy-executors/recipe.yaml new file mode 100644 index 00000000..cc563a68 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-executors/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-examples-rclpy-executors + version: 0.19.4 +source: + git: https://github.com/ros2-gbp/examples-release.git + tag: release/jazzy/examples_rclpy_executors/0.19.4-1 + target_directory: ros-jazzy-examples-rclpy-executors/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-action-client/bld_ament_python.bat b/recipes/ros-jazzy-examples-rclpy-minimal-action-client/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-action-client/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-action-client/build_ament_python.sh b/recipes/ros-jazzy-examples-rclpy-minimal-action-client/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-action-client/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-action-client/recipe.yaml b/recipes/ros-jazzy-examples-rclpy-minimal-action-client/recipe.yaml new file mode 100644 index 00000000..0e9dd898 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-action-client/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-examples-rclpy-minimal-action-client + version: 0.19.4 +source: + git: https://github.com/ros2-gbp/examples-release.git + tag: release/jazzy/examples_rclpy_minimal_action_client/0.19.4-1 + target_directory: ros-jazzy-examples-rclpy-minimal-action-client/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-action-msgs + - ros-jazzy-example-interfaces + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-action-server/bld_ament_python.bat b/recipes/ros-jazzy-examples-rclpy-minimal-action-server/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-action-server/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-action-server/build_ament_python.sh b/recipes/ros-jazzy-examples-rclpy-minimal-action-server/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-action-server/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-action-server/recipe.yaml b/recipes/ros-jazzy-examples-rclpy-minimal-action-server/recipe.yaml new file mode 100644 index 00000000..e2bb1c3e --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-action-server/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-examples-rclpy-minimal-action-server + version: 0.19.4 +source: + git: https://github.com/ros2-gbp/examples-release.git + tag: release/jazzy/examples_rclpy_minimal_action_server/0.19.4-1 + target_directory: ros-jazzy-examples-rclpy-minimal-action-server/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-example-interfaces + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-client/bld_ament_python.bat b/recipes/ros-jazzy-examples-rclpy-minimal-client/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-client/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-client/build_ament_python.sh b/recipes/ros-jazzy-examples-rclpy-minimal-client/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-client/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-client/recipe.yaml b/recipes/ros-jazzy-examples-rclpy-minimal-client/recipe.yaml new file mode 100644 index 00000000..b8db2edc --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-client/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-examples-rclpy-minimal-client + version: 0.19.4 +source: + git: https://github.com/ros2-gbp/examples-release.git + tag: release/jazzy/examples_rclpy_minimal_client/0.19.4-1 + target_directory: ros-jazzy-examples-rclpy-minimal-client/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-example-interfaces + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-publisher/bld_ament_python.bat b/recipes/ros-jazzy-examples-rclpy-minimal-publisher/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-publisher/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-publisher/build_ament_python.sh b/recipes/ros-jazzy-examples-rclpy-minimal-publisher/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-publisher/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-publisher/recipe.yaml b/recipes/ros-jazzy-examples-rclpy-minimal-publisher/recipe.yaml new file mode 100644 index 00000000..51a28197 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-publisher/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-examples-rclpy-minimal-publisher + version: 0.19.4 +source: + git: https://github.com/ros2-gbp/examples-release.git + tag: release/jazzy/examples_rclpy_minimal_publisher/0.19.4-1 + target_directory: ros-jazzy-examples-rclpy-minimal-publisher/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-service/bld_ament_python.bat b/recipes/ros-jazzy-examples-rclpy-minimal-service/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-service/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-service/build_ament_python.sh b/recipes/ros-jazzy-examples-rclpy-minimal-service/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-service/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-service/recipe.yaml b/recipes/ros-jazzy-examples-rclpy-minimal-service/recipe.yaml new file mode 100644 index 00000000..60eb3475 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-service/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-examples-rclpy-minimal-service + version: 0.19.4 +source: + git: https://github.com/ros2-gbp/examples-release.git + tag: release/jazzy/examples_rclpy_minimal_service/0.19.4-1 + target_directory: ros-jazzy-examples-rclpy-minimal-service/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-example-interfaces + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-subscriber/bld_ament_python.bat b/recipes/ros-jazzy-examples-rclpy-minimal-subscriber/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-subscriber/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-subscriber/build_ament_python.sh b/recipes/ros-jazzy-examples-rclpy-minimal-subscriber/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-subscriber/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-examples-rclpy-minimal-subscriber/recipe.yaml b/recipes/ros-jazzy-examples-rclpy-minimal-subscriber/recipe.yaml new file mode 100644 index 00000000..1f844cc1 --- /dev/null +++ b/recipes/ros-jazzy-examples-rclpy-minimal-subscriber/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-examples-rclpy-minimal-subscriber + version: 0.19.4 +source: + git: https://github.com/ros2-gbp/examples-release.git + tag: release/jazzy/examples_rclpy_minimal_subscriber/0.19.4-1 + target_directory: ros-jazzy-examples-rclpy-minimal-subscriber/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-fastcdr/bld_catkin.bat b/recipes/ros-jazzy-fastcdr/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-fastcdr/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-fastcdr/build_catkin.sh b/recipes/ros-jazzy-fastcdr/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-fastcdr/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-fastcdr/recipe.yaml b/recipes/ros-jazzy-fastcdr/recipe.yaml new file mode 100644 index 00000000..adcc7ad5 --- /dev/null +++ b/recipes/ros-jazzy-fastcdr/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-fastcdr + version: 2.2.5 +source: + git: https://github.com/ros2-gbp/fastcdr-release.git + tag: release/jazzy/fastcdr/2.2.5-1 + target_directory: ros-jazzy-fastcdr/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-fastrtps-cmake-module/bld_ament_cmake.bat b/recipes/ros-jazzy-fastrtps-cmake-module/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-fastrtps-cmake-module/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-fastrtps-cmake-module/build_ament_cmake.sh b/recipes/ros-jazzy-fastrtps-cmake-module/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-fastrtps-cmake-module/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-fastrtps-cmake-module/recipe.yaml b/recipes/ros-jazzy-fastrtps-cmake-module/recipe.yaml new file mode 100644 index 00000000..70c5625c --- /dev/null +++ b/recipes/ros-jazzy-fastrtps-cmake-module/recipe.yaml @@ -0,0 +1,86 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-fastrtps-cmake-module + version: 3.6.1 +source: + git: https://github.com/ros2-gbp/rosidl_typesupport_fastrtps-release.git + tag: release/jazzy/fastrtps_cmake_module/3.6.1-1 + target_directory: ros-jazzy-fastrtps-cmake-module/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-fastrtps/bld_catkin.bat b/recipes/ros-jazzy-fastrtps/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-fastrtps/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-fastrtps/build_catkin.sh b/recipes/ros-jazzy-fastrtps/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-fastrtps/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-fastrtps/patch/ros-jazzy-fastrtps.patch b/recipes/ros-jazzy-fastrtps/patch/ros-jazzy-fastrtps.patch new file mode 100644 index 00000000..329888be --- /dev/null +++ b/recipes/ros-jazzy-fastrtps/patch/ros-jazzy-fastrtps.patch @@ -0,0 +1,30 @@ +From 72ccfb186d93c3f7ba59c30fa2b05bddd31a3432 Mon Sep 17 00:00:00 2001 +From: Wade Hunkapiller +Date: Fri, 15 Mar 2024 11:11:09 -0500 +Subject: [PATCH] Add gettid() macro to address GLIBC version comptability + (#4225) + +Signed-off-by: Wade Hunkapiller +--- + src/cpp/utils/threading/threading_pthread.ipp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/cpp/utils/threading/threading_pthread.ipp b/src/cpp/utils/threading/threading_pthread.ipp +index 75ad33f2d64..252f60c775a 100644 +--- a/src/cpp/utils/threading/threading_pthread.ipp ++++ b/src/cpp/utils/threading/threading_pthread.ipp +@@ -25,6 +25,14 @@ + #include + #include + ++#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ <= 30))) ++ #include ++ #ifndef SYS_gettid ++ #error "SYS_gettid unavailable on this system" ++ #endif ++ #define gettid() ((pid_t)syscall(SYS_gettid)) ++#endif ++ + namespace eprosima { + + template \ No newline at end of file diff --git a/recipes/ros-jazzy-fastrtps/recipe.yaml b/recipes/ros-jazzy-fastrtps/recipe.yaml new file mode 100644 index 00000000..aaee1e86 --- /dev/null +++ b/recipes/ros-jazzy-fastrtps/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-fastrtps + version: 2.14.4 +source: + git: https://github.com/ros2-gbp/fastrtps-release.git + tag: release/jazzy/fastrtps/2.14.4-1 + target_directory: ros-jazzy-fastrtps/src/work + patches: + - patch/ros-jazzy-fastrtps.patch + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - asio + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - openssl + - pip + - python + - ros-jazzy-fastcdr + - ros-jazzy-foonathan-memory-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - tinyxml2 + run: + - openssl + - python + - ros-jazzy-fastcdr + - ros-jazzy-foonathan-memory-vendor + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - tinyxml2 + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-filters/bld_ament_cmake.bat b/recipes/ros-jazzy-filters/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-filters/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-filters/build_ament_cmake.sh b/recipes/ros-jazzy-filters/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-filters/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-filters/recipe.yaml b/recipes/ros-jazzy-filters/recipe.yaml new file mode 100644 index 00000000..4e0c21c6 --- /dev/null +++ b/recipes/ros-jazzy-filters/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-filters + version: 2.1.2 +source: + git: https://github.com/ros2-gbp/filters-release.git + tag: release/jazzy/filters/2.1.2-2 + target_directory: ros-jazzy-filters/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libboost-devel + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-cppcheck + - ros-jazzy-ament-cmake-cpplint + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-uncrustify + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - libboost-devel + - python + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-foonathan-memory-vendor/bld_catkin.bat b/recipes/ros-jazzy-foonathan-memory-vendor/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-foonathan-memory-vendor/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-foonathan-memory-vendor/build_catkin.sh b/recipes/ros-jazzy-foonathan-memory-vendor/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-foonathan-memory-vendor/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-foonathan-memory-vendor/recipe.yaml b/recipes/ros-jazzy-foonathan-memory-vendor/recipe.yaml new file mode 100644 index 00000000..08a7637d --- /dev/null +++ b/recipes/ros-jazzy-foonathan-memory-vendor/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-foonathan-memory-vendor + version: 1.3.1 +source: + git: https://github.com/ros2-gbp/foonathan_memory_vendor-release.git + tag: release/jazzy/foonathan_memory_vendor/1.3.1-3 + target_directory: ros-jazzy-foonathan-memory-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - foonathan-memory + - numpy + - pip + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - cmake + - foonathan-memory + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-forward-command-controller/bld_ament_cmake.bat b/recipes/ros-jazzy-forward-command-controller/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-forward-command-controller/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-forward-command-controller/build_ament_cmake.sh b/recipes/ros-jazzy-forward-command-controller/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-forward-command-controller/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-forward-command-controller/recipe.yaml b/recipes/ros-jazzy-forward-command-controller/recipe.yaml new file mode 100644 index 00000000..4dd790dd --- /dev/null +++ b/recipes/ros-jazzy-forward-command-controller/recipe.yaml @@ -0,0 +1,106 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-forward-command-controller + version: 4.18.0 +source: + git: https://github.com/ros2-gbp/ros2_controllers-release.git + tag: release/jazzy/forward_command_controller/4.18.0-1 + target_directory: ros-jazzy-forward-command-controller/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-backward-ros + - ros-jazzy-controller-interface + - ros-jazzy-controller-manager + - ros-jazzy-generate-parameter-library + - ros-jazzy-hardware-interface + - ros-jazzy-hardware-interface-testing + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-realtime-tools + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-ros2-control-test-assets + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-backward-ros + - ros-jazzy-controller-interface + - ros-jazzy-generate-parameter-library + - ros-jazzy-hardware-interface + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-realtime-tools + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-generate-parameter-library-py/bld_ament_python.bat b/recipes/ros-jazzy-generate-parameter-library-py/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-generate-parameter-library-py/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-generate-parameter-library-py/build_ament_python.sh b/recipes/ros-jazzy-generate-parameter-library-py/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-generate-parameter-library-py/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-generate-parameter-library-py/recipe.yaml b/recipes/ros-jazzy-generate-parameter-library-py/recipe.yaml new file mode 100644 index 00000000..c6d8ae97 --- /dev/null +++ b/recipes/ros-jazzy-generate-parameter-library-py/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-generate-parameter-library-py + version: 0.3.9 +source: + git: https://github.com/ros2-gbp/generate_parameter_library-release.git + tag: release/jazzy/generate_parameter_library_py/0.3.9-1 + target_directory: ros-jazzy-generate-parameter-library-py/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - jinja2 + - numpy + - pip + - pytest + - python + - pyyaml + - ros-jazzy-ament-copyright + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + - typeguard + run: + - jinja2 + - python + - pyyaml + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - typeguard + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-generate-parameter-library/bld_ament_cmake.bat b/recipes/ros-jazzy-generate-parameter-library/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-generate-parameter-library/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-generate-parameter-library/build_ament_cmake.sh b/recipes/ros-jazzy-generate-parameter-library/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-generate-parameter-library/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-generate-parameter-library/recipe.yaml b/recipes/ros-jazzy-generate-parameter-library/recipe.yaml new file mode 100644 index 00000000..4747bfbb --- /dev/null +++ b/recipes/ros-jazzy-generate-parameter-library/recipe.yaml @@ -0,0 +1,105 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-generate-parameter-library + version: 0.3.9 +source: + git: https://github.com/ros2-gbp/generate_parameter_library-release.git + tag: release/jazzy/generate_parameter_library/0.3.9-1 + target_directory: ros-jazzy-generate-parameter-library/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - fmt + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-generate-parameter-library-py + - ros-jazzy-parameter-traits + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-rclpy + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rsl + - ros-jazzy-tcb-span + - ros-jazzy-tl-expected + - ros2-distro-mutex 0.6.* jazzy_* + run: + - fmt + - python + - ros-jazzy-generate-parameter-library-py + - ros-jazzy-parameter-traits + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-rsl + - ros-jazzy-tcb-span + - ros-jazzy-tl-expected + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-geographic-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-geographic-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-geographic-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-geographic-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-geographic-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-geographic-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-geographic-msgs/recipe.yaml b/recipes/ros-jazzy-geographic-msgs/recipe.yaml new file mode 100644 index 00000000..7d9d728e --- /dev/null +++ b/recipes/ros-jazzy-geographic-msgs/recipe.yaml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-geographic-msgs + version: 1.0.6 +source: + git: https://github.com/ros2-gbp/geographic_info-release.git + tag: release/jazzy/geographic_msgs/1.0.6-2 + target_directory: ros-jazzy-geographic-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-cppcheck + - ros-jazzy-ament-cmake-cpplint + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-uncrustify + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-ament-lint-auto + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros-jazzy-unique-identifier-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros-jazzy-unique-identifier-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-geometric-shapes/bld_ament_cmake.bat b/recipes/ros-jazzy-geometric-shapes/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-geometric-shapes/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-geometric-shapes/build_ament_cmake.sh b/recipes/ros-jazzy-geometric-shapes/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-geometric-shapes/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-geometric-shapes/patch/ros-jazzy-geometric-shapes.patch b/recipes/ros-jazzy-geometric-shapes/patch/ros-jazzy-geometric-shapes.patch new file mode 100644 index 00000000..d9887372 --- /dev/null +++ b/recipes/ros-jazzy-geometric-shapes/patch/ros-jazzy-geometric-shapes.patch @@ -0,0 +1,22 @@ +From d236b8e9172705076e1c0aba34940307a925d3e2 Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Wed, 18 Dec 2024 13:50:38 +0100 +Subject: [PATCH] Drop apt-specific workaround on the octomap version + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8c46189..277356c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -45,7 +45,7 @@ find_package(eigen_stl_containers REQUIRED) + find_package(geometry_msgs REQUIRED) + # Enforce the system package version on Ubuntu jammy and noble which is also used by libfcl-dev + # The version is fixed to prevent ABI conflicts with ros-octomap +-find_package(octomap 1.9.7...<1.10.0 REQUIRED) ++find_package(octomap REQUIRED) + find_package(QHULL REQUIRED) + find_package(random_numbers REQUIRED) + find_package(rclcpp REQUIRED) diff --git a/recipes/ros-jazzy-geometric-shapes/recipe.yaml b/recipes/ros-jazzy-geometric-shapes/recipe.yaml new file mode 100644 index 00000000..bfdc2f65 --- /dev/null +++ b/recipes/ros-jazzy-geometric-shapes/recipe.yaml @@ -0,0 +1,122 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-geometric-shapes + version: 2.3.1 +source: + git: https://github.com/ros2-gbp/geometric_shapes-release.git + tag: release/jazzy/geometric_shapes/2.3.1-1 + target_directory: ros-jazzy-geometric-shapes/src/work + patches: + - patch/ros-jazzy-geometric-shapes.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - assimp + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - fcl + - libboost-devel + - numpy + - octomap + - pip + - pkg-config + - python + - qhull + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-cmake + - ros-jazzy-console-bridge-vendor + - ros-jazzy-eigen-stl-containers + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-geometry-msgs + - ros-jazzy-random-numbers + - ros-jazzy-rclcpp + - ros-jazzy-resource-retriever + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-shape-msgs + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - assimp + - eigen + - libboost + - libboost-devel + - python + - qhull + - ros-jazzy-console-bridge-vendor + - ros-jazzy-eigen-stl-containers + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-geometry-msgs + - ros-jazzy-random-numbers + - ros-jazzy-rclcpp + - ros-jazzy-resource-retriever + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-shape-msgs + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-geometry-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-geometry-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-geometry-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-geometry-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-geometry-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-geometry-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-geometry-msgs/recipe.yaml b/recipes/ros-jazzy-geometry-msgs/recipe.yaml new file mode 100644 index 00000000..1027f489 --- /dev/null +++ b/recipes/ros-jazzy-geometry-msgs/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-geometry-msgs + version: 5.3.5 +source: + git: https://github.com/ros2-gbp/common_interfaces-release.git + tag: release/jazzy/geometry_msgs/5.3.5-1 + target_directory: ros-jazzy-geometry-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-geometry2/bld_ament_cmake.bat b/recipes/ros-jazzy-geometry2/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-geometry2/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-geometry2/build_ament_cmake.sh b/recipes/ros-jazzy-geometry2/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-geometry2/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-geometry2/recipe.yaml b/recipes/ros-jazzy-geometry2/recipe.yaml new file mode 100644 index 00000000..438ddef1 --- /dev/null +++ b/recipes/ros-jazzy-geometry2/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-geometry2 + version: 0.36.7 +source: + git: https://github.com/ros2-gbp/geometry2-release.git + tag: release/jazzy/geometry2/0.36.7-1 + target_directory: ros-jazzy-geometry2/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-bullet + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-eigen-kdl + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-kdl + - ros-jazzy-tf2-msgs + - ros-jazzy-tf2-py + - ros-jazzy-tf2-ros + - ros-jazzy-tf2-sensor-msgs + - ros-jazzy-tf2-tools + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gmock-vendor/bld_catkin.bat b/recipes/ros-jazzy-gmock-vendor/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-gmock-vendor/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-gmock-vendor/build_catkin.sh b/recipes/ros-jazzy-gmock-vendor/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-gmock-vendor/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-gmock-vendor/recipe.yaml b/recipes/ros-jazzy-gmock-vendor/recipe.yaml new file mode 100644 index 00000000..bc38d0b9 --- /dev/null +++ b/recipes/ros-jazzy-gmock-vendor/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gmock-vendor + version: 1.14.9000 +source: + git: https://github.com/ros2-gbp/googletest-release.git + tag: release/jazzy/gmock_vendor/1.14.9000-2 + target_directory: ros-jazzy-gmock-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-gtest-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-gtest-vendor + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-google-benchmark-vendor/bld_catkin.bat b/recipes/ros-jazzy-google-benchmark-vendor/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-google-benchmark-vendor/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-google-benchmark-vendor/build_catkin.sh b/recipes/ros-jazzy-google-benchmark-vendor/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-google-benchmark-vendor/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-google-benchmark-vendor/recipe.yaml b/recipes/ros-jazzy-google-benchmark-vendor/recipe.yaml new file mode 100644 index 00000000..e8d3b3ff --- /dev/null +++ b/recipes/ros-jazzy-google-benchmark-vendor/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-google-benchmark-vendor + version: 0.5.0 +source: + git: https://github.com/ros2-gbp/google_benchmark_vendor-release.git + tag: release/jazzy/google_benchmark_vendor/0.5.0-2 + target_directory: ros-jazzy-google-benchmark-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - benchmark + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - benchmark + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gps-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-gps-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gps-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gps-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-gps-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gps-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gps-msgs/recipe.yaml b/recipes/ros-jazzy-gps-msgs/recipe.yaml new file mode 100644 index 00000000..9eed7c1b --- /dev/null +++ b/recipes/ros-jazzy-gps-msgs/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gps-msgs + version: 2.0.4 +source: + git: https://github.com/ros2-gbp/gps_umd-release.git + tag: release/jazzy/gps_msgs/2.0.4-1 + target_directory: ros-jazzy-gps-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gtest-vendor/bld_catkin.bat b/recipes/ros-jazzy-gtest-vendor/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-gtest-vendor/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-gtest-vendor/build_catkin.sh b/recipes/ros-jazzy-gtest-vendor/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-gtest-vendor/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-gtest-vendor/recipe.yaml b/recipes/ros-jazzy-gtest-vendor/recipe.yaml new file mode 100644 index 00000000..eadb6fb6 --- /dev/null +++ b/recipes/ros-jazzy-gtest-vendor/recipe.yaml @@ -0,0 +1,83 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gtest-vendor + version: 1.14.9000 +source: + git: https://github.com/ros2-gbp/googletest-release.git + tag: release/jazzy/gtest_vendor/1.14.9000-2 + target_directory: ros-jazzy-gtest-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gtsam/bld_catkin.bat b/recipes/ros-jazzy-gtsam/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-gtsam/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-gtsam/build_catkin.sh b/recipes/ros-jazzy-gtsam/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-gtsam/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-gtsam/recipe.yaml b/recipes/ros-jazzy-gtsam/recipe.yaml new file mode 100644 index 00000000..0d677ac2 --- /dev/null +++ b/recipes/ros-jazzy-gtsam/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gtsam + version: 4.2.0 +source: + git: https://github.com/ros2-gbp/gtsam-release.git + tag: release/jazzy/gtsam/4.2.0-4 + target_directory: ros-jazzy-gtsam/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - libboost-devel + - libboost-python-devel + - numpy + - pip + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - tbb + - tbb-devel + run: + - eigen + - libboost-devel + - libboost-python-devel + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - tbb + - tbb-devel + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gz-cmake-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-gz-cmake-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gz-cmake-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gz-cmake-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-gz-cmake-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gz-cmake-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gz-cmake-vendor/patch/ros-jazzy-gz-cmake-vendor.patch b/recipes/ros-jazzy-gz-cmake-vendor/patch/ros-jazzy-gz-cmake-vendor.patch new file mode 100644 index 00000000..30b3d86b --- /dev/null +++ b/recipes/ros-jazzy-gz-cmake-vendor/patch/ros-jazzy-gz-cmake-vendor.patch @@ -0,0 +1,8 @@ +diff --git a/gz_cmake_vendor-extras.cmake.in b/gz_cmake_vendor-extras.cmake.in +index d490202..7dc00ea 100644 +--- a/gz_cmake_vendor-extras.cmake.in ++++ b/gz_cmake_vendor-extras.cmake.in +@@ -1 +1,3 @@ ++set(ENV{GZ_RELAX_VERSION_MATCH} "True") ++set(AMENT_VENDOR_NEVER_VENDOR ON) + list(PREPEND CMAKE_PREFIX_PATH "@CMAKE_INSTALL_PREFIX@/opt/@PROJECT_NAME@/extra_cmake") diff --git a/recipes/ros-jazzy-gz-cmake-vendor/recipe.yaml b/recipes/ros-jazzy-gz-cmake-vendor/recipe.yaml new file mode 100644 index 00000000..04aef09c --- /dev/null +++ b/recipes/ros-jazzy-gz-cmake-vendor/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gz-cmake-vendor + version: 0.0.8 +source: + git: https://github.com/ros2-gbp/gz_cmake_vendor-release.git + tag: release/jazzy/gz_cmake_vendor/0.0.8-1 + target_directory: ros-jazzy-gz-cmake-vendor/src/work + patches: + - patch/ros-jazzy-gz-cmake-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - cmake + - gz-cmake3 + - numpy + - pip + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - gz-cmake3 + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gz-common-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-gz-common-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gz-common-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gz-common-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-gz-common-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gz-common-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gz-common-vendor/patch/ros-jazzy-gz-common-vendor.patch b/recipes/ros-jazzy-gz-common-vendor/patch/ros-jazzy-gz-common-vendor.patch new file mode 100644 index 00000000..27ebba91 --- /dev/null +++ b/recipes/ros-jazzy-gz-common-vendor/patch/ros-jazzy-gz-common-vendor.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 34a9d3c..b9af25c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -37,7 +37,7 @@ if(NOT $ENV{GZ_RELAX_VERSION_MATCH} STREQUAL "") + set(VERSION_MATCH "") + endif() + +-find_package(${LIB_NAME_FULL} ${VERSION_MATCH} ${LIB_VER} COMPONENTS all QUIET) ++find_package(${LIB_NAME_FULL} COMPONENTS all QUIET) + + ament_vendor(${LIB_NAME_UNDERSCORE}_vendor + SATISFIED ${${LIB_NAME_FULL}_FOUND} diff --git a/recipes/ros-jazzy-gz-common-vendor/recipe.yaml b/recipes/ros-jazzy-gz-common-vendor/recipe.yaml new file mode 100644 index 00000000..f895b859 --- /dev/null +++ b/recipes/ros-jazzy-gz-common-vendor/recipe.yaml @@ -0,0 +1,112 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gz-common-vendor + version: 0.0.7 +source: + git: https://github.com/ros2-gbp/gz_common_vendor-release.git + tag: release/jazzy/gz_common_vendor/0.0.7-1 + target_directory: ros-jazzy-gz-common-vendor/src/work + patches: + - patch/ros-jazzy-gz-common-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - assimp + - if: build_platform == target_platform + then: + - pkg-config + - ffmpeg + - freeimage + - gts + - gz-common5 + - libgdal + - numpy + - pip + - pkg-config + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - tinyxml2 + run: + - assimp + - ffmpeg + - freeimage + - gts + - gz-common5 + - libgdal + - python + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - tinyxml2 + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gz-dartsim-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-gz-dartsim-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gz-dartsim-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gz-dartsim-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-gz-dartsim-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gz-dartsim-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gz-dartsim-vendor/patch/ros-jazzy-gz-dartsim-vendor.patch b/recipes/ros-jazzy-gz-dartsim-vendor/patch/ros-jazzy-gz-dartsim-vendor.patch new file mode 100644 index 00000000..7e1f8c69 --- /dev/null +++ b/recipes/ros-jazzy-gz-dartsim-vendor/patch/ros-jazzy-gz-dartsim-vendor.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 77ca936..5decd53 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,7 +25,7 @@ if(NOT $ENV{GZ_RELAX_VERSION_MATCH} STREQUAL "") + set(VERSION_MATCH "") + endif() + +-find_package(DART ${VERSION_MATCH} ${LIB_VER_MAJOR}.${LIB_VER_MINOR} ++find_package(DART + CONFIG + COMPONENTS + collision-bullet +@@ -35,6 +35,9 @@ find_package(DART ${VERSION_MATCH} ${LIB_VER_MAJOR}.${LIB_VER_MINOR} + QUIET + ) + ++# Hack ++set(DART_FOUND TRUE) ++ + ament_vendor(${PROJECT_NAME} + SATISFIED ${DART_FOUND} + VCS_URL https://github.com/dartsim/dart.git diff --git a/recipes/ros-jazzy-gz-dartsim-vendor/recipe.yaml b/recipes/ros-jazzy-gz-dartsim-vendor/recipe.yaml new file mode 100644 index 00000000..e42cd767 --- /dev/null +++ b/recipes/ros-jazzy-gz-dartsim-vendor/recipe.yaml @@ -0,0 +1,111 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gz-dartsim-vendor + version: 0.0.3 +source: + git: https://github.com/ros2-gbp/gz_dartsim_vendor-release.git + tag: release/jazzy/gz_dartsim_vendor/0.0.3-1 + target_directory: ros-jazzy-gz-dartsim-vendor/src/work + patches: + - patch/ros-jazzy-gz-dartsim-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - assimp + - if: build_platform == target_platform + then: + - pkg-config + - bullet + - dartsim-cpp + - eigen + - fcl + - fmt + - libboost-devel + - libccd-double + - lz4 + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-ament-lint-auto + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - tinyxml2 + - urdfdom + run: + - assimp + - bullet + - dartsim-cpp + - eigen + - fcl + - fmt + - libboost-devel + - libccd-double + - lz4 + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - tinyxml2 + - urdfdom + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gz-fuel-tools-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-gz-fuel-tools-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gz-fuel-tools-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gz-fuel-tools-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-gz-fuel-tools-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gz-fuel-tools-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gz-fuel-tools-vendor/patch/ros-jazzy-gz-fuel-tools-vendor.patch b/recipes/ros-jazzy-gz-fuel-tools-vendor/patch/ros-jazzy-gz-fuel-tools-vendor.patch new file mode 100644 index 00000000..ed6266f1 --- /dev/null +++ b/recipes/ros-jazzy-gz-fuel-tools-vendor/patch/ros-jazzy-gz-fuel-tools-vendor.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b084b2c..b2fc80d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,8 +4,8 @@ project(gz_fuel_tools_vendor) + + # Project-specific settings + set(LIB_VER_MAJOR 9) +-set(LIB_VER_MINOR 1) +-set(LIB_VER_PATCH 0) ++set(LIB_VER_MINOR 0) ++set(LIB_VER_PATCH 3) + + # Derived variables + set(LIB_NAME gz-fuel_tools) diff --git a/recipes/ros-jazzy-gz-fuel-tools-vendor/recipe.yaml b/recipes/ros-jazzy-gz-fuel-tools-vendor/recipe.yaml new file mode 100644 index 00000000..ff71498c --- /dev/null +++ b/recipes/ros-jazzy-gz-fuel-tools-vendor/recipe.yaml @@ -0,0 +1,117 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gz-fuel-tools-vendor + version: 0.0.5 +source: + git: https://github.com/ros2-gbp/gz_fuel_tools_vendor-release.git + tag: release/jazzy/gz_fuel_tools_vendor/0.0.5-1 + target_directory: ros-jazzy-gz-fuel-tools-vendor/src/work + patches: + - patch/ros-jazzy-gz-fuel-tools-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - gflags + - gz-fuel-tools9 + - jsoncpp + - libcurl + - libzip + - numpy + - pip + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-common-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-msgs-vendor + - ros-jazzy-gz-tools-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - tinyxml2 + - yaml + run: + - gflags + - gz-fuel-tools9 + - jsoncpp + - libcurl + - libzip + - python + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-common-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-msgs-vendor + - ros-jazzy-gz-tools-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - tinyxml2 + - yaml + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gz-gui-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-gz-gui-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gz-gui-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gz-gui-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-gz-gui-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gz-gui-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gz-gui-vendor/patch/ros-jazzy-gz-gui-vendor.patch b/recipes/ros-jazzy-gz-gui-vendor/patch/ros-jazzy-gz-gui-vendor.patch new file mode 100644 index 00000000..d9ebdd68 --- /dev/null +++ b/recipes/ros-jazzy-gz-gui-vendor/patch/ros-jazzy-gz-gui-vendor.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a58d9a4..e6ea27e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,8 +4,8 @@ project(gz_gui_vendor) + + # Project-specific settings + set(LIB_VER_MAJOR 8) +-set(LIB_VER_MINOR 3) +-set(LIB_VER_PATCH 0) ++set(LIB_VER_MINOR 1) ++set(LIB_VER_PATCH 1) + + # Derived variables + set(LIB_NAME gz-gui) diff --git a/recipes/ros-jazzy-gz-gui-vendor/recipe.yaml b/recipes/ros-jazzy-gz-gui-vendor/recipe.yaml new file mode 100644 index 00000000..e03542c8 --- /dev/null +++ b/recipes/ros-jazzy-gz-gui-vendor/recipe.yaml @@ -0,0 +1,130 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gz-gui-vendor + version: 0.0.4 +source: + git: https://github.com/ros2-gbp/gz_gui_vendor-release.git + tag: release/jazzy/gz_gui_vendor/0.0.4-1 + target_directory: ros-jazzy-gz-gui-vendor/src/work + patches: + - patch/ros-jazzy-gz-gui-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - gz-gui8 + - libprotobuf + - numpy + - pip + - protobuf + - python + - qt-main + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-common-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-msgs-vendor + - ros-jazzy-gz-plugin-vendor + - ros-jazzy-gz-rendering-vendor + - ros-jazzy-gz-tools-vendor + - ros-jazzy-gz-transport-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - tinyxml2 + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - gz-gui8 + - libprotobuf + - protobuf + - python + - qt-main + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-common-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-msgs-vendor + - ros-jazzy-gz-plugin-vendor + - ros-jazzy-gz-rendering-vendor + - ros-jazzy-gz-tools-vendor + - ros-jazzy-gz-transport-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - tinyxml2 + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-gz-math-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-gz-math-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gz-math-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gz-math-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-gz-math-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gz-math-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gz-math-vendor/patch/ros-jazzy-gz-math-vendor.patch b/recipes/ros-jazzy-gz-math-vendor/patch/ros-jazzy-gz-math-vendor.patch new file mode 100644 index 00000000..e5a1c5d6 --- /dev/null +++ b/recipes/ros-jazzy-gz-math-vendor/patch/ros-jazzy-gz-math-vendor.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bacf717..69ead8b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -36,7 +36,7 @@ if(NOT $ENV{GZ_RELAX_VERSION_MATCH} STREQUAL "") + set(VERSION_MATCH "") + endif() + +-find_package(${LIB_NAME_FULL} ${VERSION_MATCH} ${LIB_VER} COMPONENTS all QUIET) ++find_package(${LIB_NAME_FULL} COMPONENTS all QUIET) + + ament_vendor(${LIB_NAME_UNDERSCORE}_vendor + SATISFIED ${${LIB_NAME_FULL}_FOUND} diff --git a/recipes/ros-jazzy-gz-math-vendor/recipe.yaml b/recipes/ros-jazzy-gz-math-vendor/recipe.yaml new file mode 100644 index 00000000..a7255612 --- /dev/null +++ b/recipes/ros-jazzy-gz-math-vendor/recipe.yaml @@ -0,0 +1,104 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gz-math-vendor + version: 0.0.7 +source: + git: https://github.com/ros2-gbp/gz_math_vendor-release.git + tag: release/jazzy/gz_math_vendor/0.0.7-1 + target_directory: ros-jazzy-gz-math-vendor/src/work + patches: + - patch/ros-jazzy-gz-math-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - if: build_platform != target_platform + then: + - pybind11 + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - gz-math7 + - numpy + - pip + - pybind11 + - pytest + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - eigen + - gz-math7 + - python + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gz-msgs-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-gz-msgs-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gz-msgs-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gz-msgs-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-gz-msgs-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gz-msgs-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gz-msgs-vendor/patch/ros-jazzy-gz-msgs-vendor.patch b/recipes/ros-jazzy-gz-msgs-vendor/patch/ros-jazzy-gz-msgs-vendor.patch new file mode 100644 index 00000000..7b6340ff --- /dev/null +++ b/recipes/ros-jazzy-gz-msgs-vendor/patch/ros-jazzy-gz-msgs-vendor.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a234d6c..1bc36ea 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -37,7 +37,7 @@ if(NOT $ENV{GZ_RELAX_VERSION_MATCH} STREQUAL "") + set(VERSION_MATCH "") + endif() + +-find_package(${LIB_NAME_FULL} ${VERSION_MATCH} ${LIB_VER} COMPONENTS all QUIET) ++find_package(${LIB_NAME_FULL} COMPONENTS all QUIET) + + ament_vendor(${LIB_NAME_UNDERSCORE}_vendor + SATISFIED ${${LIB_NAME_FULL}_FOUND} diff --git a/recipes/ros-jazzy-gz-msgs-vendor/recipe.yaml b/recipes/ros-jazzy-gz-msgs-vendor/recipe.yaml new file mode 100644 index 00000000..133a317b --- /dev/null +++ b/recipes/ros-jazzy-gz-msgs-vendor/recipe.yaml @@ -0,0 +1,106 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gz-msgs-vendor + version: 0.0.5 +source: + git: https://github.com/ros2-gbp/gz_msgs_vendor-release.git + tag: release/jazzy/gz_msgs_vendor/0.0.5-1 + target_directory: ros-jazzy-gz-msgs-vendor/src/work + patches: + - patch/ros-jazzy-gz-msgs-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - gz-msgs10 + - libprotobuf + - numpy + - pip + - protobuf + - pytest + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-tools-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - tinyxml2 + run: + - gz-msgs10 + - libprotobuf + - protobuf + - python + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-tools-vendor + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - tinyxml2 + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gz-ogre-next-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-gz-ogre-next-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gz-ogre-next-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gz-ogre-next-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-gz-ogre-next-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gz-ogre-next-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gz-ogre-next-vendor/patch/ros-jazzy-gz-ogre-next-vendor.patch b/recipes/ros-jazzy-gz-ogre-next-vendor/patch/ros-jazzy-gz-ogre-next-vendor.patch new file mode 100644 index 00000000..124d088f --- /dev/null +++ b/recipes/ros-jazzy-gz-ogre-next-vendor/patch/ros-jazzy-gz-ogre-next-vendor.patch @@ -0,0 +1,233 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a904707..e6b84cd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,9 +1,21 @@ + cmake_minimum_required(VERSION 3.10) + project(gz_ogre_next_vendor) + ++# Project-specific settings ++set(LIB_VER_MAJOR 2) ++set(LIB_VER_MINOR 3) ++set(LIB_VER_PATCH 3) ++set(LIB_VER ${LIB_VER_MAJOR}.${LIB_VER_MINOR}.${LIB_VER_PATCH}) ++ + find_package(ament_cmake REQUIRED) + find_package(ament_cmake_vendor_package REQUIRED) + ++find_package(OGRE ${LIB_VER}) ++message(NOTICE "OGRE_FOUND" = ${OGRE}) ++ ++# Hack ++set(OGRE_FOUND TRUE) ++ + set(EXTRA_CMAKE_FLAGS) + if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*|arm64.*|ARM64.*|arm.*|ARM.*)") + # Flags for non SIMD architectures +@@ -12,6 +24,7 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*|arm64.*|ARM64.*|arm.*|A + endif() + + ament_vendor(${PROJECT_NAME} ++ SATISFIED ${OGRE_FOUND} + VCS_URL https://github.com/OGRECave/ogre-next.git + VCS_VERSION v2.3.3 + CMAKE_ARGS +@@ -33,8 +46,7 @@ ament_vendor(${PROJECT_NAME} + -DOGRE_VULKAN_WINDOW_XCB:BOOL=ON + ${EXTRA_CMAKE_FLAGS} + GLOBAL_HOOK +- PATCHES +- patches/0001-Fix-incomplete-vulkan-linkage.patch ++ PATCHES patches + ) + + if(BUILD_TESTING) +diff --git a/patches/0002-correct-cmake-vars.patch b/patches/0002-correct-cmake-vars.patch +new file mode 100644 +index 0000000..357ee82 +--- /dev/null ++++ b/patches/0002-correct-cmake-vars.patch +@@ -0,0 +1,160 @@ ++diff --git a/CMake/Utils/AndroidMacros.cmake b/CMake/Utils/AndroidMacros.cmake ++index d1a3880..e3616fc 100644 ++--- a/CMake/Utils/AndroidMacros.cmake +++++ b/CMake/Utils/AndroidMacros.cmake ++@@ -10,7 +10,7 @@ ++ ++ macro(add_static_libs LIB_DIR) ++ foreach(LIB_NAME ${ARGN}) ++- SET(HEADERS "${HEADERS}# ${LIB_NAME}\n\tinclude $(CLEAR_VARS)\n\tLOCAL_MODULE := ${LIB_NAME}\n\tLOCAL_SRC_FILES := ${LIB_DIR}/lib${LIB_NAME}.a\n\tinclude $(PREBUILT_STATIC_LIBRARY)\n\n") +++ SET(HEADERS "${HEADERS}# ${LIB_NAME}\n\tinclude ${CLEAR_VARS}\n\tLOCAL_MODULE := ${LIB_NAME}\n\tLOCAL_SRC_FILES := ${LIB_DIR}/lib${LIB_NAME}.a\n\tinclude ${PREBUILT_STATIC_LIBRARY}\n\n") ++ SET(SAMPLE_LDLIBS "${SAMPLE_LDLIBS} ${LIB_NAME}") ++ endforeach(LIB_NAME ${ARGN}) ++ SET(SAMPLE_LDLIBS "${SAMPLE_LDLIBS}\n LOCAL_STATIC_LIBRARIES\t+= ") ++@@ -21,7 +21,7 @@ macro(add_static_libs_from_paths) ++ get_filename_component(LIB_NAME ${LIB} NAME_WE) ++ string(SUBSTRING ${LIB_NAME} 3 -1 LIB_NAME) # strip lib prefix ++ ++- set(HEADERS "${HEADERS}# ${LIB_NAME}\n\tinclude $(CLEAR_VARS)\n\tLOCAL_MODULE := ${LIB_NAME}\n\tLOCAL_SRC_FILES := ${LIB}\n\tinclude $(PREBUILT_STATIC_LIBRARY)\n\n") +++ set(HEADERS "${HEADERS}# ${LIB_NAME}\n\tinclude ${CLEAR_VARS}\n\tLOCAL_MODULE := ${LIB_NAME}\n\tLOCAL_SRC_FILES := ${LIB}\n\tinclude ${PREBUILT_STATIC_LIBRARY}\n\n") ++ set(SAMPLE_LDLIBS "${SAMPLE_LDLIBS} ${LIB_NAME}") ++ endforeach() ++ set(SAMPLE_LDLIBS "${SAMPLE_LDLIBS}\n LOCAL_STATIC_LIBRARIES\t+= ") ++@@ -135,4 +135,3 @@ macro(create_android_proj ANDROID_PROJECT_TARGET) ++ WORKING_DIRECTORY ${NDKOUT} ++ ) ++ endmacro(create_android_proj) ++- ++diff --git a/CMake/Utils/OgreConfigTargets.cmake b/CMake/Utils/OgreConfigTargets.cmake ++index d8e0208..28acb8c 100644 ++--- a/CMake/Utils/OgreConfigTargets.cmake +++++ b/CMake/Utils/OgreConfigTargets.cmake ++@@ -18,7 +18,7 @@ if(APPLE) ++ if(NOT OGRE_BUILD_PLATFORM_ANDROID AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS) ++ set(PLATFORM_NAME "macosx") ++ elseif(OGRE_BUILD_PLATFORM_APPLE_IOS) ++- set(PLATFORM_NAME "$(PLATFORM_NAME)") +++ set(PLATFORM_NAME "${PLATFORM_NAME}") ++ endif() ++ endif() ++ ++diff --git a/CMakeLists.txt b/CMakeLists.txt ++index 2786e35..9c6de22 100755 ++--- a/CMakeLists.txt +++++ b/CMakeLists.txt ++@@ -316,7 +316,7 @@ if (OGRE_BUILD_PLATFORM_APPLE_IOS) ++ set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.yourcompany.\${PRODUCT_NAME:rfc1034identifier}") ++ set( CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2" ) ++ ++- set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_INCLUDING_64_BIT)") +++ set(CMAKE_OSX_ARCHITECTURES "${ARCHS_STANDARD_INCLUDING_64_BIT}") ++ string (REPLACE "-msse2" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") ++ string (REPLACE "-msse" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") ++ elseif (ANDROID) ++@@ -363,8 +363,6 @@ elseif (APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS) ++ if(CMAKE_GENERATOR STREQUAL "Unix Makefiles") ++ execute_process(COMMAND xcodebuild -version -sdk "${XCODE_ATTRIBUTE_SDKROOT}" Path | head -n 1 OUTPUT_VARIABLE CMAKE_OSX_SYSROOT) ++ string(REGEX REPLACE "(\r?\n)+$" "" CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}") ++- else() ++- set(CMAKE_OSX_SYSROOT macosx) ++ endif() ++ ++ set( CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES ) ++@@ -697,4 +695,3 @@ include(Packaging) ++ ++ # Show feature summary ++ include(FeatureSummary) ++- ++diff --git a/OgreMain/CMakeLists.txt b/OgreMain/CMakeLists.txt ++index b698b84..bd3b21e 100644 ++--- a/OgreMain/CMakeLists.txt +++++ b/OgreMain/CMakeLists.txt ++@@ -439,7 +439,7 @@ if (APPLE) ++ LINK_FLAGS "-framework IOKit -framework Cocoa -framework Carbon -framework OpenGL -framework CoreVideo" ++ ) ++ ++- set(OGRE_OSX_BUILD_CONFIGURATION "$(PLATFORM_NAME)/$(CONFIGURATION)") +++ set(OGRE_OSX_BUILD_CONFIGURATION "${PLATFORM_NAME}/${CONFIGURATION}") ++ ++ add_custom_command(TARGET ${OGRE_NEXT}Main POST_BUILD ++ COMMAND mkdir ARGS -p ${OGRE_BINARY_DIR}/lib/${OGRE_OSX_BUILD_CONFIGURATION}/Ogre.framework/Headers/Threading ++diff --git a/Samples/2.0/Tutorials/EmptyProject/CMake/Dependencies/OGRE.cmake b/Samples/2.0/Tutorials/EmptyProject/CMake/Dependencies/OGRE.cmake ++index 23596b5..b57c2a9 100644 ++--- a/Samples/2.0/Tutorials/EmptyProject/CMake/Dependencies/OGRE.cmake +++++ b/Samples/2.0/Tutorials/EmptyProject/CMake/Dependencies/OGRE.cmake ++@@ -222,10 +222,10 @@ set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/Ogre/CMake/Pack ++ set( OGRE_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/Ogre" CACHE STRING "Path to OGRE source code (see http://www.ogre3d.org/tikiwiki/tiki-index.php?page=CMake+Quick+Start+Guide)" ) ++ if( WIN32 ) ++ set( OGRE_BINARIES "${OGRE_SOURCE}/build" CACHE STRING "Path to OGRE's build folder generated by CMake" ) ++- link_directories( "${OGRE_BINARIES}/lib/$(ConfigurationName)" ) +++ link_directories( "${OGRE_BINARIES}/lib/${ConfigurationName}" ) ++ elseif( APPLE ) ++ set( OGRE_BINARIES "${OGRE_SOURCE}/build" CACHE STRING "Path to OGRE's build folder generated by CMake" ) ++- link_directories( "${OGRE_BINARIES}/lib/$(PLATFORM_NAME)/$(CONFIGURATION)" ) +++ link_directories( "${OGRE_BINARIES}/lib/${PLATFORM_NAME}/${CONFIGURATION}" ) ++ elseif( ANDROID ) ++ set( OGRE_BINARIES "${OGRE_SOURCE}/build/Android/${CMAKE_BUILD_TYPE}" CACHE STRING "Path to OGRE's build folder generated by CMake" ) ++ link_directories( "${OGRE_BINARIES}/lib" ) ++@@ -406,10 +406,10 @@ macro( addStaticDependencies OGRE_SOURCE, OGRE_BINARIES, OGRE_BUILD_SETTINGS_STR ++ endif() ++ ++ if( WIN32 ) ++- set( OGRE_DEPENDENCIES "${OGRE_SOURCE}/Dependencies/lib/$(ConfigurationName)" CACHE STRING +++ set( OGRE_DEPENDENCIES "${OGRE_SOURCE}/Dependencies/lib/${ConfigurationName}" CACHE STRING ++ "Path to OGRE's dependencies folder. Only used in Static Builds" ) ++ elseif( IOS ) ++- set( OGRE_DEPENDENCIES "${OGRE_SOURCE}/iOSDependencies/lib/$(CONFIGURATION)" CACHE STRING +++ set( OGRE_DEPENDENCIES "${OGRE_SOURCE}/iOSDependencies/lib/${CONFIGURATION}" CACHE STRING ++ "Path to OGRE's dependencies folder. Only used in Static Builds" ) ++ elseif( ANDROID ) ++ set( OGRE_DEPENDENCIES "${OGRE_SOURCE}/DependenciesAndroid/lib" CACHE STRING ++diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt ++index 5167104..bf8fe80 100644 ++--- a/Tests/CMakeLists.txt +++++ b/Tests/CMakeLists.txt ++@@ -151,8 +151,8 @@ if (OGRE_BUILD_TESTS) ++ ogre_config_sample_exe(Test_Ogre) ++ target_link_libraries(Test_Ogre ${OGRE_LIBRARIES} ${CppUnit_LIBRARIES}) ++ if(APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS) ++- set(OGRE_BUILT_FRAMEWORK "$(PLATFORM_NAME)/$(CONFIGURATION)") ++- set(OGRE_TEST_CONTENTS_PATH ${OGRE_BINARY_DIR}/bin/$(CONFIGURATION)/Test_Ogre.app/Contents) +++ set(OGRE_BUILT_FRAMEWORK "${PLATFORM_NAME}/${CONFIGURATION}") +++ set(OGRE_TEST_CONTENTS_PATH ${OGRE_BINARY_DIR}/bin/${CONFIGURATION}/Test_Ogre.app/Contents) ++ set_target_properties(Test_Ogre PROPERTIES ++ LINK_FLAGS "-framework Carbon -framework Cocoa") ++ add_custom_command(TARGET Test_Ogre POST_BUILD ++diff --git a/Tests/VisualTests/Context/CMakeLists.txt b/Tests/VisualTests/Context/CMakeLists.txt ++index 551a8e7..6e0e49b 100644 ++--- a/Tests/VisualTests/Context/CMakeLists.txt +++++ b/Tests/VisualTests/Context/CMakeLists.txt ++@@ -86,18 +86,18 @@ if (APPLE) ++ set_target_properties(TestContext PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "NO") ++ set_target_properties(TestContext PROPERTIES XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2") ++ set (OGRE_TESTCONTEXT_CONTENTS_PATH ++- ${OGRE_BINARY_DIR}/bin/$(CONFIGURATION)/TestContext.app) +++ ${OGRE_BINARY_DIR}/bin/${CONFIGURATION}/TestContext.app) ++ add_custom_command(TARGET TestContext POST_BUILD ++ COMMAND ditto ${OGRE_SOURCE_DIR}/Samples/Common/misc/*.png ${OGRE_TESTCONTEXT_CONTENTS_PATH}/ ++ COMMAND ditto ${OGRE_BINARY_DIR}/bin/*.cfg ${OGRE_TESTCONTEXT_CONTENTS_PATH}/ ++ ) ++ add_custom_command(TARGET TestContext POST_BUILD ++- COMMAND mkdir ARGS -p ${OGRE_BINARY_DIR}/lib/$(CONFIGURATION)/ +++ COMMAND mkdir ARGS -p ${OGRE_BINARY_DIR}/lib/${CONFIGURATION}/ ++ COMMAND ditto ${OGRE_SOURCE_DIR}/Samples/Media ${OGRE_TESTCONTEXT_CONTENTS_PATH}/Media ++ COMMAND ditto ${OGRE_SOURCE_DIR}/Tests/Media ${OGRE_TESTCONTEXT_CONTENTS_PATH}/Media ++ ) ++ else() ++- set(OGRE_OSX_BUILD_CONFIGURATION "$(PLATFORM_NAME)/$(CONFIGURATION)") +++ set(OGRE_OSX_BUILD_CONFIGURATION "${PLATFORM_NAME}/${CONFIGURATION}") ++ set_property(TARGET TestContext PROPERTY MACOSX_BUNDLE TRUE) ++ set_property(TARGET TestContext PROPERTY MACOSX_BUNDLE_ICON_FILE SampleBrowser_OSX.icns) ++ set_property(TARGET TestContext PROPERTY MACOSX_BUNDLE_INFO_PLIST ${OGRE_SOURCE_DIR}/Tests/VisualTests/Context/misc/Info.plist) ++@@ -106,7 +106,7 @@ if (APPLE) ++ set_target_properties(TestContext PROPERTIES ++ LINK_FLAGS "-framework IOKit -framework Cocoa -framework Carbon -framework OpenGL -framework CoreVideo") ++ set (OGRE_TESTCONTEXT_CONTENTS_PATH ++- ${OGRE_BINARY_DIR}/bin/$(CONFIGURATION)/TestContext.app/Contents) +++ ${OGRE_BINARY_DIR}/bin/${CONFIGURATION}/TestContext.app/Contents) ++ add_custom_command(TARGET TestContext POST_BUILD ++ COMMAND mkdir ARGS -p ${OGRE_TESTCONTEXT_CONTENTS_PATH}/Frameworks ++ COMMAND ln ARGS -s -f ${OGRE_BINARY_DIR}/lib/${OGRE_OSX_BUILD_CONFIGURATION}/Ogre.framework +diff --git a/patches/0003-fix-string.patch b/patches/0003-fix-string.patch +new file mode 100644 +index 0000000..82f5dbf +--- /dev/null ++++ b/patches/0003-fix-string.patch +@@ -0,0 +1,17 @@ ++diff --git a/OgreMain/include/OgreUTFString.h b/OgreMain/include/OgreUTFString.h ++index 0aeab6a..a3be244 100644 ++--- a/OgreMain/include/OgreUTFString.h +++++ b/OgreMain/include/OgreUTFString.h ++@@ -189,10 +189,10 @@ namespace Ogre { ++ static const size_type npos = static_cast(~0); ++ ++ //! a single 32-bit Unicode character ++- typedef uint32 unicode_char; +++ typedef char32_t unicode_char; ++ ++ //! a single UTF-16 code point ++- typedef uint16 code_point; +++ typedef char16_t code_point; ++ ++ //! value type typedef for use in iterators ++ typedef code_point value_type; diff --git a/recipes/ros-jazzy-gz-ogre-next-vendor/recipe.yaml b/recipes/ros-jazzy-gz-ogre-next-vendor/recipe.yaml new file mode 100644 index 00000000..bae35216 --- /dev/null +++ b/recipes/ros-jazzy-gz-ogre-next-vendor/recipe.yaml @@ -0,0 +1,134 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gz-ogre-next-vendor + version: 0.0.5 +source: + git: https://github.com/ros2-gbp/gz_ogre_next_vendor-release.git + tag: release/jazzy/gz_ogre_next_vendor/0.0.5-1 + target_directory: ros-jazzy-gz-ogre-next-vendor/src/work + patches: + - patch/ros-jazzy-gz-ogre-next-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - freeimage + - freetype + - glslang + - libboost-devel + - numpy + - ogre-next + - pip + - poco + - python + - rapidjson + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-ament-lint-auto + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - sdl2 + - shaderc + - tbb + - tbb-devel + - tinyxml2 + - xorg-libx11 + - xorg-libxaw + - xorg-libxrandr + - xorg-xorgproto + - zziplib + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - freeimage + - freetype + - glslang + - libboost-devel + - ogre-next + - poco + - python + - rapidjson + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - sdl2 + - shaderc + - tbb + - tbb-devel + - tinyxml2 + - xorg-libx11 + - xorg-libxaw + - xorg-libxrandr + - xorg-xorgproto + - zziplib + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-gz-physics-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-gz-physics-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gz-physics-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gz-physics-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-gz-physics-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gz-physics-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gz-physics-vendor/patch/ros-jazzy-gz-physics-vendor.patch b/recipes/ros-jazzy-gz-physics-vendor/patch/ros-jazzy-gz-physics-vendor.patch new file mode 100644 index 00000000..d6352aa3 --- /dev/null +++ b/recipes/ros-jazzy-gz-physics-vendor/patch/ros-jazzy-gz-physics-vendor.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3b0b5e4..fa007d8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,7 +41,7 @@ if(NOT $ENV{GZ_RELAX_VERSION_MATCH} STREQUAL "") + set(VERSION_MATCH "") + endif() + +-find_package(${LIB_NAME_FULL} ${VERSION_MATCH} ${LIB_VER} COMPONENTS all QUIET) ++find_package(${LIB_NAME_FULL} COMPONENTS all QUIET) + + ament_vendor(${LIB_NAME_UNDERSCORE}_vendor + SATISFIED ${${LIB_NAME_FULL}_FOUND} diff --git a/recipes/ros-jazzy-gz-physics-vendor/recipe.yaml b/recipes/ros-jazzy-gz-physics-vendor/recipe.yaml new file mode 100644 index 00000000..cdc1039b --- /dev/null +++ b/recipes/ros-jazzy-gz-physics-vendor/recipe.yaml @@ -0,0 +1,113 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gz-physics-vendor + version: 0.0.5 +source: + git: https://github.com/ros2-gbp/gz_physics_vendor-release.git + tag: release/jazzy/gz_physics_vendor/0.0.5-1 + target_directory: ros-jazzy-gz-physics-vendor/src/work + patches: + - patch/ros-jazzy-gz-physics-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - benchmark + - if: build_platform == target_platform + then: + - pkg-config + - bullet + - eigen + - gz-physics7 + - numpy + - pip + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-common-vendor + - ros-jazzy-gz-dartsim-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-plugin-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sdformat-vendor + - ros2-distro-mutex 0.6.* jazzy_* + run: + - benchmark + - bullet + - eigen + - gz-physics7 + - python + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-common-vendor + - ros-jazzy-gz-dartsim-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-plugin-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-workspace + - ros-jazzy-sdformat-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gz-plugin-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-gz-plugin-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gz-plugin-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gz-plugin-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-gz-plugin-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gz-plugin-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gz-plugin-vendor/patch/ros-jazzy-gz-plugin-vendor.patch b/recipes/ros-jazzy-gz-plugin-vendor/patch/ros-jazzy-gz-plugin-vendor.patch new file mode 100644 index 00000000..bd4b6df7 --- /dev/null +++ b/recipes/ros-jazzy-gz-plugin-vendor/patch/ros-jazzy-gz-plugin-vendor.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ed2578e..cb5c72a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -36,7 +36,7 @@ if(NOT $ENV{GZ_RELAX_VERSION_MATCH} STREQUAL "") + set(VERSION_MATCH "") + endif() + +-find_package(${LIB_NAME_FULL} ${VERSION_MATCH} ${LIB_VER} COMPONENTS all QUIET) ++find_package(${LIB_NAME_FULL} COMPONENTS all QUIET) + + ament_vendor(${LIB_NAME_UNDERSCORE}_vendor + SATISFIED ${${LIB_NAME_FULL}_FOUND} diff --git a/recipes/ros-jazzy-gz-plugin-vendor/recipe.yaml b/recipes/ros-jazzy-gz-plugin-vendor/recipe.yaml new file mode 100644 index 00000000..36d321d4 --- /dev/null +++ b/recipes/ros-jazzy-gz-plugin-vendor/recipe.yaml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gz-plugin-vendor + version: 0.0.4 +source: + git: https://github.com/ros2-gbp/gz_plugin_vendor-release.git + tag: release/jazzy/gz_plugin_vendor/0.0.4-1 + target_directory: ros-jazzy-gz-plugin-vendor/src/work + patches: + - patch/ros-jazzy-gz-plugin-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - gz-plugin2 + - numpy + - pip + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-tools-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - gz-plugin2 + - python + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-tools-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gz-rendering-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-gz-rendering-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gz-rendering-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gz-rendering-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-gz-rendering-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gz-rendering-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gz-rendering-vendor/patch/ros-jazzy-gz-rendering-vendor.patch b/recipes/ros-jazzy-gz-rendering-vendor/patch/ros-jazzy-gz-rendering-vendor.patch new file mode 100644 index 00000000..881281a2 --- /dev/null +++ b/recipes/ros-jazzy-gz-rendering-vendor/patch/ros-jazzy-gz-rendering-vendor.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f7decac..c7c068e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,7 +40,7 @@ if(NOT $ENV{GZ_RELAX_VERSION_MATCH} STREQUAL "") + set(VERSION_MATCH "") + endif() + +-find_package(${LIB_NAME_FULL} ${VERSION_MATCH} ${LIB_VER} COMPONENTS all QUIET) ++find_package(${LIB_NAME_FULL} COMPONENTS all QUIET) + + ament_vendor(${LIB_NAME_UNDERSCORE}_vendor + SATISFIED ${${LIB_NAME_FULL}_FOUND} diff --git a/recipes/ros-jazzy-gz-rendering-vendor/recipe.yaml b/recipes/ros-jazzy-gz-rendering-vendor/recipe.yaml new file mode 100644 index 00000000..c57a8fc1 --- /dev/null +++ b/recipes/ros-jazzy-gz-rendering-vendor/recipe.yaml @@ -0,0 +1,117 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gz-rendering-vendor + version: 0.0.5 +source: + git: https://github.com/ros2-gbp/gz_rendering_vendor-release.git + tag: release/jazzy/gz_rendering_vendor/0.0.5-1 + target_directory: ros-jazzy-gz-rendering-vendor/src/work + patches: + - patch/ros-jazzy-gz-rendering-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - freeimage + - glew + - gz-rendering8 + - numpy + - ogre + - pip + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-common-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-ogre-next-vendor + - ros-jazzy-gz-plugin-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - swig + - xorg-libxi + - xorg-libxmu + run: + - freeimage + - glew + - gz-rendering8 + - ogre + - python + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-common-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-ogre-next-vendor + - ros-jazzy-gz-plugin-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - swig + - xorg-libxi + - xorg-libxmu + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gz-sensors-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-gz-sensors-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gz-sensors-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gz-sensors-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-gz-sensors-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gz-sensors-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gz-sensors-vendor/patch/ros-jazzy-gz-sensors-vendor.patch b/recipes/ros-jazzy-gz-sensors-vendor/patch/ros-jazzy-gz-sensors-vendor.patch new file mode 100644 index 00000000..9aa287b6 --- /dev/null +++ b/recipes/ros-jazzy-gz-sensors-vendor/patch/ros-jazzy-gz-sensors-vendor.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1fba7c8..c82aaa5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,7 +42,7 @@ if(NOT $ENV{GZ_RELAX_VERSION_MATCH} STREQUAL "") + set(VERSION_MATCH "") + endif() + +-find_package(${LIB_NAME_FULL} ${VERSION_MATCH} ${LIB_VER} COMPONENTS all QUIET) ++find_package(${LIB_NAME_FULL} COMPONENTS all QUIET) + + ament_vendor(${LIB_NAME_UNDERSCORE}_vendor + SATISFIED ${${LIB_NAME_FULL}_FOUND} diff --git a/recipes/ros-jazzy-gz-sensors-vendor/recipe.yaml b/recipes/ros-jazzy-gz-sensors-vendor/recipe.yaml new file mode 100644 index 00000000..a5c7e3e6 --- /dev/null +++ b/recipes/ros-jazzy-gz-sensors-vendor/recipe.yaml @@ -0,0 +1,109 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gz-sensors-vendor + version: 0.0.5 +source: + git: https://github.com/ros2-gbp/gz_sensors_vendor-release.git + tag: release/jazzy/gz_sensors_vendor/0.0.5-1 + target_directory: ros-jazzy-gz-sensors-vendor/src/work + patches: + - patch/ros-jazzy-gz-sensors-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - gz-sensors8 + - numpy + - pip + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-common-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-msgs-vendor + - ros-jazzy-gz-rendering-vendor + - ros-jazzy-gz-tools-vendor + - ros-jazzy-gz-transport-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sdformat-vendor + - ros2-distro-mutex 0.6.* jazzy_* + run: + - gz-sensors8 + - python + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-common-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-msgs-vendor + - ros-jazzy-gz-rendering-vendor + - ros-jazzy-gz-tools-vendor + - ros-jazzy-gz-transport-vendor + - ros-jazzy-ros-workspace + - ros-jazzy-sdformat-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gz-sim-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-gz-sim-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gz-sim-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gz-sim-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-gz-sim-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gz-sim-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gz-sim-vendor/patch/ros-jazzy-gz-sim-vendor.patch b/recipes/ros-jazzy-gz-sim-vendor/patch/ros-jazzy-gz-sim-vendor.patch new file mode 100644 index 00000000..482109fd --- /dev/null +++ b/recipes/ros-jazzy-gz-sim-vendor/patch/ros-jazzy-gz-sim-vendor.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index db289b6..e1f3327 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -48,7 +48,7 @@ if(NOT $ENV{GZ_RELAX_VERSION_MATCH} STREQUAL "") + set(VERSION_MATCH "") + endif() + +-find_package(${LIB_NAME_FULL} ${VERSION_MATCH} ${LIB_VER} COMPONENTS all QUIET) ++find_package(${LIB_NAME_FULL} COMPONENTS all QUIET) + + ament_vendor(${LIB_NAME_UNDERSCORE}_vendor + SATISFIED ${${LIB_NAME_FULL}_FOUND} diff --git a/recipes/ros-jazzy-gz-sim-vendor/recipe.yaml b/recipes/ros-jazzy-gz-sim-vendor/recipe.yaml new file mode 100644 index 00000000..4f31f0a7 --- /dev/null +++ b/recipes/ros-jazzy-gz-sim-vendor/recipe.yaml @@ -0,0 +1,156 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gz-sim-vendor + version: 0.0.6 +source: + git: https://github.com/ros2-gbp/gz_sim_vendor-release.git + tag: release/jazzy/gz_sim_vendor/0.0.6-1 + target_directory: ros-jazzy-gz-sim-vendor/src/work + patches: + - patch/ros-jazzy-gz-sim-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - if: build_platform != target_platform + then: + - pybind11 + host: + - benchmark + - if: build_platform == target_platform + then: + - pkg-config + - freeimage + - glew + - gz-sim8 + - libprotobuf + - numpy + - pip + - protobuf + - pybind11 + - pytest + - python + - qt-main + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-common-vendor + - ros-jazzy-gz-fuel-tools-vendor + - ros-jazzy-gz-gui-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-msgs-vendor + - ros-jazzy-gz-physics-vendor + - ros-jazzy-gz-plugin-vendor + - ros-jazzy-gz-rendering-vendor + - ros-jazzy-gz-sensors-vendor + - ros-jazzy-gz-tools-vendor + - ros-jazzy-gz-transport-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sdformat-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - tinyxml2 + - xorg-libxi + - xorg-libxmu + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - benchmark + - freeimage + - glew + - gz-sim8 + - libprotobuf + - protobuf + - pybind11 + - python + - qt-main + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-common-vendor + - ros-jazzy-gz-fuel-tools-vendor + - ros-jazzy-gz-gui-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-msgs-vendor + - ros-jazzy-gz-physics-vendor + - ros-jazzy-gz-plugin-vendor + - ros-jazzy-gz-rendering-vendor + - ros-jazzy-gz-sensors-vendor + - ros-jazzy-gz-tools-vendor + - ros-jazzy-gz-transport-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-workspace + - ros-jazzy-sdformat-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - tinyxml2 + - xorg-libxi + - xorg-libxmu + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-gz-tools-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-gz-tools-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gz-tools-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gz-tools-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-gz-tools-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gz-tools-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gz-tools-vendor/recipe.yaml b/recipes/ros-jazzy-gz-tools-vendor/recipe.yaml new file mode 100644 index 00000000..74dd17c1 --- /dev/null +++ b/recipes/ros-jazzy-gz-tools-vendor/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gz-tools-vendor + version: 0.0.5 +source: + git: https://github.com/ros2-gbp/gz_tools_vendor-release.git + tag: release/jazzy/gz_tools_vendor/0.0.5-1 + target_directory: ros-jazzy-gz-tools-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - gz-tools2 + - numpy + - pip + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - gz-tools2 + - python + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - ruby + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gz-transport-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-gz-transport-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gz-transport-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gz-transport-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-gz-transport-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gz-transport-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gz-transport-vendor/patch/ros-jazzy-gz-transport-vendor.patch b/recipes/ros-jazzy-gz-transport-vendor/patch/ros-jazzy-gz-transport-vendor.patch new file mode 100644 index 00000000..01ccc875 --- /dev/null +++ b/recipes/ros-jazzy-gz-transport-vendor/patch/ros-jazzy-gz-transport-vendor.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d0d7a23..77f334f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -38,7 +38,7 @@ if(NOT $ENV{GZ_RELAX_VERSION_MATCH} STREQUAL "") + set(VERSION_MATCH "") + endif() + +-find_package(${LIB_NAME_FULL} ${VERSION_MATCH} ${LIB_VER} COMPONENTS all QUIET) ++find_package(${LIB_NAME_FULL} COMPONENTS all QUIET) + + ament_vendor(${LIB_NAME_UNDERSCORE}_vendor + SATISFIED ${${LIB_NAME_FULL}_FOUND} diff --git a/recipes/ros-jazzy-gz-transport-vendor/recipe.yaml b/recipes/ros-jazzy-gz-transport-vendor/recipe.yaml new file mode 100644 index 00000000..6eca53e6 --- /dev/null +++ b/recipes/ros-jazzy-gz-transport-vendor/recipe.yaml @@ -0,0 +1,124 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gz-transport-vendor + version: 0.0.5 +source: + git: https://github.com/ros2-gbp/gz_transport_vendor-release.git + tag: release/jazzy/gz_transport_vendor/0.0.5-1 + target_directory: ros-jazzy-gz-transport-vendor/src/work + patches: + - patch/ros-jazzy-gz-transport-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - if: build_platform != target_platform + then: + - pybind11 + host: + - if: build_platform == target_platform + then: + - pkg-config + - cppzmq + - gz-transport13 + - libprotobuf + - numpy + - pip + - pkg-config + - protobuf + - psutil + - pybind11 + - pytest + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-msgs-vendor + - ros-jazzy-gz-tools-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - sqlite 3.* + - zeromq + run: + - cppzmq + - gz-transport13 + - libprotobuf + - pkg-config + - protobuf + - psutil + - pybind11 + - pytest + - python + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-msgs-vendor + - ros-jazzy-gz-tools-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - sqlite + - zeromq + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-gz-utils-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-gz-utils-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-gz-utils-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-gz-utils-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-gz-utils-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-gz-utils-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-gz-utils-vendor/patch/ros-jazzy-gz-utils-vendor.patch b/recipes/ros-jazzy-gz-utils-vendor/patch/ros-jazzy-gz-utils-vendor.patch new file mode 100644 index 00000000..fdaa4012 --- /dev/null +++ b/recipes/ros-jazzy-gz-utils-vendor/patch/ros-jazzy-gz-utils-vendor.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 264ab97..acc88cd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -34,7 +34,7 @@ if(NOT $ENV{GZ_RELAX_VERSION_MATCH} STREQUAL "") + set(VERSION_MATCH "") + endif() + +-find_package(${LIB_NAME_FULL} ${VERSION_MATCH} ${LIB_VER} COMPONENTS all QUIET) ++find_package(${LIB_NAME_FULL} COMPONENTS all QUIET) + + ament_vendor(${LIB_NAME_UNDERSCORE}_vendor + SATISFIED ${${LIB_NAME_FULL}_FOUND} diff --git a/recipes/ros-jazzy-gz-utils-vendor/recipe.yaml b/recipes/ros-jazzy-gz-utils-vendor/recipe.yaml new file mode 100644 index 00000000..36a0fdfe --- /dev/null +++ b/recipes/ros-jazzy-gz-utils-vendor/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-gz-utils-vendor + version: 0.0.4 +source: + git: https://github.com/ros2-gbp/gz_utils_vendor-release.git + tag: release/jazzy/gz_utils_vendor/0.0.4-1 + target_directory: ros-jazzy-gz-utils-vendor/src/work + patches: + - patch/ros-jazzy-gz-utils-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - gz-utils2 + - numpy + - pip + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - gz-utils2 + - python + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-hardware-interface-testing/bld_ament_cmake.bat b/recipes/ros-jazzy-hardware-interface-testing/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-hardware-interface-testing/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-hardware-interface-testing/build_ament_cmake.sh b/recipes/ros-jazzy-hardware-interface-testing/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-hardware-interface-testing/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-hardware-interface-testing/recipe.yaml b/recipes/ros-jazzy-hardware-interface-testing/recipe.yaml new file mode 100644 index 00000000..ac61bf4e --- /dev/null +++ b/recipes/ros-jazzy-hardware-interface-testing/recipe.yaml @@ -0,0 +1,97 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-hardware-interface-testing + version: 4.23.0 +source: + git: https://github.com/ros2-gbp/ros2_control-release.git + tag: release/jazzy/hardware_interface_testing/4.23.0-1 + target_directory: ros-jazzy-hardware-interface-testing/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-control-msgs + - ros-jazzy-hardware-interface + - ros-jazzy-lifecycle-msgs + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-ros2-control-test-assets + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-control-msgs + - ros-jazzy-hardware-interface + - ros-jazzy-lifecycle-msgs + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-ros2-control-test-assets + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-hardware-interface/bld_ament_cmake.bat b/recipes/ros-jazzy-hardware-interface/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-hardware-interface/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-hardware-interface/build_ament_cmake.sh b/recipes/ros-jazzy-hardware-interface/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-hardware-interface/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-hardware-interface/patch/ros-jazzy-hardware-interface.patch b/recipes/ros-jazzy-hardware-interface/patch/ros-jazzy-hardware-interface.patch new file mode 100644 index 00000000..aa88149f --- /dev/null +++ b/recipes/ros-jazzy-hardware-interface/patch/ros-jazzy-hardware-interface.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b4e0f6cab..896175fad 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,11 +1,6 @@ + cmake_minimum_required(VERSION 3.16) + project(hardware_interface LANGUAGES CXX) + +-if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") +- add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow +- -Werror=missing-braces) +-endif() +- + # using this instead of visibility macros + # S1 from https://github.com/ros-controls/ros2_controllers/issues/1053 + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +@@ -54,6 +49,7 @@ target_include_directories(mock_components PUBLIC + $ + $ + ) ++target_link_libraries(mock_components PUBLIC hardware_interface) + ament_target_dependencies(mock_components PUBLIC ${THIS_PACKAGE_INCLUDE_DEPENDS}) + + pluginlib_export_plugin_description_file( +diff --git a/include/hardware_interface/async_components.hpp b/include/hardware_interface/async_components.hpp +index 052c4ba92..85efed01f 100644 +--- a/include/hardware_interface/async_components.hpp ++++ b/include/hardware_interface/async_components.hpp +@@ -82,7 +82,11 @@ public: + { + auto const period = std::chrono::nanoseconds(1'000'000'000 / cm_update_rate_); + TimePoint next_iteration_time = +- TimePoint(std::chrono::nanoseconds(clock_interface_->get_clock()->now().nanoseconds())); ++ TimePoint(std::chrono::system_clock::time_point( ++ std::chrono::duration_cast( ++ std::chrono::nanoseconds(clock_interface_->get_clock()->now().nanoseconds()) ++ ) ++ )); + + if ( + component->get_lifecycle_state().id() == +@@ -99,7 +103,7 @@ public: + component->read(clock_interface_->get_clock()->now(), measured_period); + first_iteration = false; + } +- next_iteration_time += period; ++ next_iteration_time += std::chrono::duration_cast(period); + std::this_thread::sleep_until(next_iteration_time); + } + }, diff --git a/recipes/ros-jazzy-hardware-interface/recipe.yaml b/recipes/ros-jazzy-hardware-interface/recipe.yaml new file mode 100644 index 00000000..d6dc76fb --- /dev/null +++ b/recipes/ros-jazzy-hardware-interface/recipe.yaml @@ -0,0 +1,113 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-hardware-interface + version: 4.23.0 +source: + git: https://github.com/ros2-gbp/ros2_control-release.git + tag: release/jazzy/hardware_interface/4.23.0-1 + target_directory: ros-jazzy-hardware-interface/src/work + patches: + - patch/ros-jazzy-hardware-interface.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gen-version-h + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-backward-ros + - ros-jazzy-control-msgs + - ros-jazzy-joint-limits + - ros-jazzy-lifecycle-msgs + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-realtime-tools + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-ros2-control-test-assets + - ros-jazzy-sdformat-urdf + - ros-jazzy-tinyxml2-vendor + - ros-jazzy-urdf + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-backward-ros + - ros-jazzy-control-msgs + - ros-jazzy-joint-limits + - ros-jazzy-lifecycle-msgs + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-realtime-tools + - ros-jazzy-ros-workspace + - ros-jazzy-sdformat-urdf + - ros-jazzy-tinyxml2-vendor + - ros-jazzy-urdf + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-iceoryx-binding-c/bld_catkin.bat b/recipes/ros-jazzy-iceoryx-binding-c/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-iceoryx-binding-c/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-iceoryx-binding-c/build_catkin.sh b/recipes/ros-jazzy-iceoryx-binding-c/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-iceoryx-binding-c/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-iceoryx-binding-c/recipe.yaml b/recipes/ros-jazzy-iceoryx-binding-c/recipe.yaml new file mode 100644 index 00000000..c9c4787c --- /dev/null +++ b/recipes/ros-jazzy-iceoryx-binding-c/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-iceoryx-binding-c + version: 2.0.6 +source: + git: https://github.com/ros2-gbp/iceoryx-release.git + tag: release/jazzy/iceoryx_binding_c/2.0.6-1 + target_directory: ros-jazzy-iceoryx-binding-c/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-iceoryx-hoofs + - ros-jazzy-iceoryx-posh + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-iceoryx-hoofs/bld_catkin.bat b/recipes/ros-jazzy-iceoryx-hoofs/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-iceoryx-hoofs/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-iceoryx-hoofs/build_catkin.sh b/recipes/ros-jazzy-iceoryx-hoofs/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-iceoryx-hoofs/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-iceoryx-hoofs/recipe.yaml b/recipes/ros-jazzy-iceoryx-hoofs/recipe.yaml new file mode 100644 index 00000000..77b55106 --- /dev/null +++ b/recipes/ros-jazzy-iceoryx-hoofs/recipe.yaml @@ -0,0 +1,83 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-iceoryx-hoofs + version: 2.0.6 +source: + git: https://github.com/ros2-gbp/iceoryx-release.git + tag: release/jazzy/iceoryx_hoofs/2.0.6-1 + target_directory: ros-jazzy-iceoryx-hoofs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-iceoryx-posh/bld_catkin.bat b/recipes/ros-jazzy-iceoryx-posh/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-iceoryx-posh/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-iceoryx-posh/build_catkin.sh b/recipes/ros-jazzy-iceoryx-posh/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-iceoryx-posh/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-iceoryx-posh/recipe.yaml b/recipes/ros-jazzy-iceoryx-posh/recipe.yaml new file mode 100644 index 00000000..f444dfbf --- /dev/null +++ b/recipes/ros-jazzy-iceoryx-posh/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-iceoryx-posh + version: 2.0.6 +source: + git: https://github.com/ros2-gbp/iceoryx-release.git + tag: release/jazzy/iceoryx_posh/2.0.6-1 + target_directory: ros-jazzy-iceoryx-posh/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-iceoryx-hoofs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-iceoryx-hoofs + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-image-common/bld_ament_cmake.bat b/recipes/ros-jazzy-image-common/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-image-common/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-image-common/build_ament_cmake.sh b/recipes/ros-jazzy-image-common/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-image-common/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-image-common/recipe.yaml b/recipes/ros-jazzy-image-common/recipe.yaml new file mode 100644 index 00000000..5e0f70e8 --- /dev/null +++ b/recipes/ros-jazzy-image-common/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-image-common + version: 5.1.5 +source: + git: https://github.com/ros2-gbp/image_common-release.git + tag: release/jazzy/image_common/5.1.5-1 + target_directory: ros-jazzy-image-common/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-camera-calibration-parsers + - ros-jazzy-camera-info-manager + - ros-jazzy-image-transport + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-image-geometry/bld_ament_cmake.bat b/recipes/ros-jazzy-image-geometry/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-image-geometry/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-image-geometry/build_ament_cmake.sh b/recipes/ros-jazzy-image-geometry/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-image-geometry/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-image-geometry/recipe.yaml b/recipes/ros-jazzy-image-geometry/recipe.yaml new file mode 100644 index 00000000..b25c3ceb --- /dev/null +++ b/recipes/ros-jazzy-image-geometry/recipe.yaml @@ -0,0 +1,106 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-image-geometry + version: 4.1.0 +source: + git: https://github.com/ros2-gbp/vision_opencv-release.git + tag: release/jazzy/image_geometry/4.1.0-1 + target_directory: ros-jazzy-image-geometry/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - deprecated + - libopencv + - numpy + - pip + - py-opencv + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - deprecated + - libopencv + - py-opencv + - python + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-image-pipeline/bld_ament_cmake.bat b/recipes/ros-jazzy-image-pipeline/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-image-pipeline/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-image-pipeline/build_ament_cmake.sh b/recipes/ros-jazzy-image-pipeline/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-image-pipeline/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-image-pipeline/recipe.yaml b/recipes/ros-jazzy-image-pipeline/recipe.yaml new file mode 100644 index 00000000..8dfe71f4 --- /dev/null +++ b/recipes/ros-jazzy-image-pipeline/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-image-pipeline + version: 5.0.6 +source: + git: https://github.com/ros2-gbp/image_pipeline-release.git + tag: release/jazzy/image_pipeline/5.0.6-1 + target_directory: ros-jazzy-image-pipeline/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-ament-lint-auto + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-camera-calibration + - ros-jazzy-depth-image-proc + - ros-jazzy-image-proc + - ros-jazzy-image-publisher + - ros-jazzy-image-rotate + - ros-jazzy-image-view + - ros-jazzy-ros-workspace + - ros-jazzy-stereo-image-proc + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-image-proc/bld_ament_cmake.bat b/recipes/ros-jazzy-image-proc/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-image-proc/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-image-proc/build_ament_cmake.sh b/recipes/ros-jazzy-image-proc/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-image-proc/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-image-proc/patch/ros-jazzy-image-proc.patch b/recipes/ros-jazzy-image-proc/patch/ros-jazzy-image-proc.patch new file mode 100644 index 00000000..1e0f6721 --- /dev/null +++ b/recipes/ros-jazzy-image-proc/patch/ros-jazzy-image-proc.patch @@ -0,0 +1,37 @@ +diff --git a/include/image_proc/track_marker.hpp b/include/image_proc/track_marker.hpp +index 6c212913..f6366c35 100644 +--- a/include/image_proc/track_marker.hpp ++++ b/include/image_proc/track_marker.hpp +@@ -61,8 +61,7 @@ private: + std::string image_topic_; + rclcpp::Publisher::SharedPtr pub_; + +- cv::Ptr detector_params_; +- cv::Ptr dictionary_; ++ cv::aruco::Dictionary dictionary_; + + void imageCb( + const sensor_msgs::msg::Image::ConstSharedPtr & image_msg, +diff --git a/src/track_marker.cpp b/src/track_marker.cpp +index 86177438..8fee7a36 100644 +--- a/src/track_marker.cpp ++++ b/src/track_marker.cpp +@@ -66,7 +66,6 @@ TrackMarkerNode::TrackMarkerNode(const rclcpp::NodeOptions & options) + // Default dictionary is cv::aruco::DICT_6X6_250 + int dict_id = this->declare_parameter("dictionary", 10); + +- detector_params_ = cv::aruco::DetectorParameters::create(); + dictionary_ = cv::aruco::getPredefinedDictionary(dict_id); + + // Setup lazy subscriber using publisher connection callback +@@ -108,7 +107,9 @@ void TrackMarkerNode::imageCb( + + std::vector marker_ids; + std::vector> marker_corners; +- cv::aruco::detectMarkers(cv_ptr->image, dictionary_, marker_corners, marker_ids); ++ cv::Ptr dictionaryPtr = cv::makePtr(dictionary_); ++ const cv::Ptr constDictionaryPtr = dictionaryPtr; ++ cv::aruco::detectMarkers(cv_ptr->image, constDictionaryPtr, marker_corners, marker_ids); + + for (size_t i = 0; i < marker_ids.size(); ++i) { + if (marker_ids[i] == marker_id_) { diff --git a/recipes/ros-jazzy-image-proc/recipe.yaml b/recipes/ros-jazzy-image-proc/recipe.yaml new file mode 100644 index 00000000..d3d18592 --- /dev/null +++ b/recipes/ros-jazzy-image-proc/recipe.yaml @@ -0,0 +1,127 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-image-proc + version: 5.0.6 +source: + git: https://github.com/ros2-gbp/image_pipeline-release.git + tag: release/jazzy/image_proc/5.0.6-1 + target_directory: ros-jazzy-image-proc/src/work + patches: + - patch/ros-jazzy-image-proc.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libopencv + - numpy + - pip + - py-opencv + - python + - ros-jazzy-ament-cmake-auto + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-camera-calibration-parsers + - ros-jazzy-cv-bridge + - ros-jazzy-geometry-msgs + - ros-jazzy-image-geometry + - ros-jazzy-image-transport + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tracetools-image-pipeline + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - libopencv + - py-opencv + - python + - ros-jazzy-camera-calibration-parsers + - ros-jazzy-cv-bridge + - ros-jazzy-geometry-msgs + - ros-jazzy-image-geometry + - ros-jazzy-image-transport + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tracetools-image-pipeline + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-image-publisher/bld_ament_cmake.bat b/recipes/ros-jazzy-image-publisher/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-image-publisher/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-image-publisher/build_ament_cmake.sh b/recipes/ros-jazzy-image-publisher/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-image-publisher/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-image-publisher/recipe.yaml b/recipes/ros-jazzy-image-publisher/recipe.yaml new file mode 100644 index 00000000..aa3dc571 --- /dev/null +++ b/recipes/ros-jazzy-image-publisher/recipe.yaml @@ -0,0 +1,98 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-image-publisher + version: 5.0.6 +source: + git: https://github.com/ros2-gbp/image_pipeline-release.git + tag: release/jazzy/image_publisher/5.0.6-1 + target_directory: ros-jazzy-image-publisher/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-auto + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-camera-info-manager + - ros-jazzy-cv-bridge + - ros-jazzy-image-transport + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-camera-info-manager + - ros-jazzy-cv-bridge + - ros-jazzy-image-transport + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-image-rotate/bld_ament_cmake.bat b/recipes/ros-jazzy-image-rotate/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-image-rotate/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-image-rotate/build_ament_cmake.sh b/recipes/ros-jazzy-image-rotate/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-image-rotate/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-image-rotate/recipe.yaml b/recipes/ros-jazzy-image-rotate/recipe.yaml new file mode 100644 index 00000000..2f0addea --- /dev/null +++ b/recipes/ros-jazzy-image-rotate/recipe.yaml @@ -0,0 +1,122 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-image-rotate + version: 5.0.6 +source: + git: https://github.com/ros2-gbp/image_pipeline-release.git + tag: release/jazzy/image_rotate/5.0.6-1 + target_directory: ros-jazzy-image-rotate/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libopencv + - numpy + - pip + - py-opencv + - python + - ros-jazzy-ament-cmake-auto + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-class-loader + - ros-jazzy-cv-bridge + - ros-jazzy-geometry-msgs + - ros-jazzy-image-transport + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - libopencv + - py-opencv + - python + - ros-jazzy-cv-bridge + - ros-jazzy-geometry-msgs + - ros-jazzy-image-transport + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-image-tools/bld_ament_cmake.bat b/recipes/ros-jazzy-image-tools/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-image-tools/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-image-tools/build_ament_cmake.sh b/recipes/ros-jazzy-image-tools/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-image-tools/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-image-tools/recipe.yaml b/recipes/ros-jazzy-image-tools/recipe.yaml new file mode 100644 index 00000000..94af2eaf --- /dev/null +++ b/recipes/ros-jazzy-image-tools/recipe.yaml @@ -0,0 +1,116 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-image-tools + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/image_tools/0.33.5-1 + target_directory: ros-jazzy-image-tools/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libopencv + - numpy + - pip + - py-opencv + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-launch-testing-ros + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rmw-implementation-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - libopencv + - py-opencv + - python + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-image-transport-plugins/bld_ament_cmake.bat b/recipes/ros-jazzy-image-transport-plugins/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-image-transport-plugins/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-image-transport-plugins/build_ament_cmake.sh b/recipes/ros-jazzy-image-transport-plugins/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-image-transport-plugins/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-image-transport-plugins/recipe.yaml b/recipes/ros-jazzy-image-transport-plugins/recipe.yaml new file mode 100644 index 00000000..ba0f1eb9 --- /dev/null +++ b/recipes/ros-jazzy-image-transport-plugins/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-image-transport-plugins + version: 4.0.3 +source: + git: https://github.com/ros2-gbp/image_transport_plugins-release.git + tag: release/jazzy/image_transport_plugins/4.0.3-1 + target_directory: ros-jazzy-image-transport-plugins/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-compressed-depth-image-transport + - ros-jazzy-compressed-image-transport + - ros-jazzy-ros-workspace + - ros-jazzy-theora-image-transport + - ros-jazzy-zstd-image-transport + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-image-transport/bld_ament_cmake.bat b/recipes/ros-jazzy-image-transport/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-image-transport/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-image-transport/build_ament_cmake.sh b/recipes/ros-jazzy-image-transport/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-image-transport/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-image-transport/recipe.yaml b/recipes/ros-jazzy-image-transport/recipe.yaml new file mode 100644 index 00000000..c2ce461f --- /dev/null +++ b/recipes/ros-jazzy-image-transport/recipe.yaml @@ -0,0 +1,97 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-image-transport + version: 5.1.5 +source: + git: https://github.com/ros2-gbp/image_common-release.git + tag: release/jazzy/image_transport/5.1.5-1 + target_directory: ros-jazzy-image-transport/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-message-filters + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-message-filters + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-image-view/bld_ament_cmake.bat b/recipes/ros-jazzy-image-view/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-image-view/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-image-view/build_ament_cmake.sh b/recipes/ros-jazzy-image-view/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-image-view/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-image-view/recipe.yaml b/recipes/ros-jazzy-image-view/recipe.yaml new file mode 100644 index 00000000..7fb82620 --- /dev/null +++ b/recipes/ros-jazzy-image-view/recipe.yaml @@ -0,0 +1,116 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-image-view + version: 5.0.6 +source: + git: https://github.com/ros2-gbp/image_pipeline-release.git + tag: release/jazzy/image_view/5.0.6-1 + target_directory: ros-jazzy-image-view/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-auto + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-camera-calibration-parsers + - ros-jazzy-cv-bridge + - ros-jazzy-image-transport + - ros-jazzy-message-filters + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-srvs + - ros-jazzy-stereo-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - ros-jazzy-camera-calibration-parsers + - ros-jazzy-cv-bridge + - ros-jazzy-image-transport + - ros-jazzy-message-filters + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-srvs + - ros-jazzy-stereo-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-interactive-markers/bld_ament_cmake.bat b/recipes/ros-jazzy-interactive-markers/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-interactive-markers/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-interactive-markers/build_ament_cmake.sh b/recipes/ros-jazzy-interactive-markers/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-interactive-markers/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-interactive-markers/recipe.yaml b/recipes/ros-jazzy-interactive-markers/recipe.yaml new file mode 100644 index 00000000..07253da0 --- /dev/null +++ b/recipes/ros-jazzy-interactive-markers/recipe.yaml @@ -0,0 +1,107 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-interactive-markers + version: 2.5.4 +source: + git: https://github.com/ros2-gbp/interactive_markers-release.git + tag: release/jazzy/interactive_markers/2.5.4-2 + target_directory: ros-jazzy-interactive-markers/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-rclcpp + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-rclcpp + - ros-jazzy-rclpy + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-intra-process-demo/bld_ament_cmake.bat b/recipes/ros-jazzy-intra-process-demo/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-intra-process-demo/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-intra-process-demo/build_ament_cmake.sh b/recipes/ros-jazzy-intra-process-demo/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-intra-process-demo/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-intra-process-demo/recipe.yaml b/recipes/ros-jazzy-intra-process-demo/recipe.yaml new file mode 100644 index 00000000..439967d1 --- /dev/null +++ b/recipes/ros-jazzy-intra-process-demo/recipe.yaml @@ -0,0 +1,111 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-intra-process-demo + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/intra_process_demo/0.33.5-1 + target_directory: ros-jazzy-intra-process-demo/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libopencv + - numpy + - pip + - py-opencv + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-launch + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-rclcpp + - ros-jazzy-rmw-implementation-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - libopencv + - py-opencv + - python + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-joint-limits/bld_ament_cmake.bat b/recipes/ros-jazzy-joint-limits/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-joint-limits/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-joint-limits/build_ament_cmake.sh b/recipes/ros-jazzy-joint-limits/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-joint-limits/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-joint-limits/recipe.yaml b/recipes/ros-jazzy-joint-limits/recipe.yaml new file mode 100644 index 00000000..4c36c918 --- /dev/null +++ b/recipes/ros-jazzy-joint-limits/recipe.yaml @@ -0,0 +1,104 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-joint-limits + version: 4.23.0 +source: + git: https://github.com/ros2-gbp/ros2_control-release.git + tag: release/jazzy/joint_limits/4.23.0-1 + target_directory: ros-jazzy-joint-limits/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gen-version-h + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-backward-ros + - ros-jazzy-generate-parameter-library + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-realtime-tools + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-trajectory-msgs + - ros-jazzy-urdf + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-backward-ros + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-realtime-tools + - ros-jazzy-ros-workspace + - ros-jazzy-trajectory-msgs + - ros-jazzy-urdf + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-joint-state-publisher-gui/bld_ament_python.bat b/recipes/ros-jazzy-joint-state-publisher-gui/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-joint-state-publisher-gui/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-joint-state-publisher-gui/build_ament_python.sh b/recipes/ros-jazzy-joint-state-publisher-gui/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-joint-state-publisher-gui/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-joint-state-publisher-gui/recipe.yaml b/recipes/ros-jazzy-joint-state-publisher-gui/recipe.yaml new file mode 100644 index 00000000..b669ac37 --- /dev/null +++ b/recipes/ros-jazzy-joint-state-publisher-gui/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-joint-state-publisher-gui + version: 2.4.0 +source: + git: https://github.com/ros2-gbp/joint_state_publisher-release.git + tag: release/jazzy/joint_state_publisher_gui/2.4.0-3 + target_directory: ros-jazzy-joint-state-publisher-gui/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-joint-state-publisher + - ros-jazzy-python-qt-binding + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-joint-state-publisher/bld_ament_python.bat b/recipes/ros-jazzy-joint-state-publisher/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-joint-state-publisher/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-joint-state-publisher/build_ament_python.sh b/recipes/ros-jazzy-joint-state-publisher/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-joint-state-publisher/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-joint-state-publisher/recipe.yaml b/recipes/ros-jazzy-joint-state-publisher/recipe.yaml new file mode 100644 index 00000000..9320dd4a --- /dev/null +++ b/recipes/ros-jazzy-joint-state-publisher/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-joint-state-publisher + version: 2.4.0 +source: + git: https://github.com/ros2-gbp/joint_state_publisher-release.git + tag: release/jazzy/joint_state_publisher/2.4.0-3 + target_directory: ros-jazzy-joint-state-publisher/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-xmllint + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ros + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-ros2topic + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-joy/bld_ament_cmake.bat b/recipes/ros-jazzy-joy/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-joy/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-joy/build_ament_cmake.sh b/recipes/ros-jazzy-joy/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-joy/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-joy/recipe.yaml b/recipes/ros-jazzy-joy/recipe.yaml new file mode 100644 index 00000000..226f94f4 --- /dev/null +++ b/recipes/ros-jazzy-joy/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-joy + version: 3.3.0 +source: + git: https://github.com/ros2-gbp/joystick_drivers-release.git + tag: release/jazzy/joy/3.3.0-3 + target_directory: ros-jazzy-joy/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sdl2-vendor + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-sdl2-vendor + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-kdl-parser/bld_ament_cmake.bat b/recipes/ros-jazzy-kdl-parser/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-kdl-parser/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-kdl-parser/build_ament_cmake.sh b/recipes/ros-jazzy-kdl-parser/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-kdl-parser/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-kdl-parser/recipe.yaml b/recipes/ros-jazzy-kdl-parser/recipe.yaml new file mode 100644 index 00000000..6d1a8010 --- /dev/null +++ b/recipes/ros-jazzy-kdl-parser/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-kdl-parser + version: 2.11.0 +source: + git: https://github.com/ros2-gbp/kdl_parser-release.git + tag: release/jazzy/kdl_parser/2.11.0-3 + target_directory: ros-jazzy-kdl-parser/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-orocos-kdl-vendor + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-urdf + - ros-jazzy-urdfdom-headers + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-orocos-kdl-vendor + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-urdf + - ros-jazzy-urdfdom-headers + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-keyboard-handler/bld_ament_cmake.bat b/recipes/ros-jazzy-keyboard-handler/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-keyboard-handler/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-keyboard-handler/build_ament_cmake.sh b/recipes/ros-jazzy-keyboard-handler/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-keyboard-handler/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-keyboard-handler/recipe.yaml b/recipes/ros-jazzy-keyboard-handler/recipe.yaml new file mode 100644 index 00000000..492f62ae --- /dev/null +++ b/recipes/ros-jazzy-keyboard-handler/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-keyboard-handler + version: 0.3.1 +source: + git: https://github.com/ros2-gbp/keyboard_handler-release.git + tag: release/jazzy/keyboard_handler/0.3.1-2 + target_directory: ros-jazzy-keyboard-handler/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-laser-filters/bld_ament_cmake.bat b/recipes/ros-jazzy-laser-filters/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-laser-filters/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-laser-filters/build_ament_cmake.sh b/recipes/ros-jazzy-laser-filters/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-laser-filters/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-laser-filters/recipe.yaml b/recipes/ros-jazzy-laser-filters/recipe.yaml new file mode 100644 index 00000000..5172c566 --- /dev/null +++ b/recipes/ros-jazzy-laser-filters/recipe.yaml @@ -0,0 +1,112 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-laser-filters + version: 2.0.8 +source: + git: https://github.com/ros2-gbp/laser_filters-release.git + tag: release/jazzy/laser_filters/2.0.8-1 + target_directory: ros-jazzy-laser-filters/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-auto + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-angles + - ros-jazzy-filters + - ros-jazzy-laser-geometry + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-message-filters + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-kdl + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-angles + - ros-jazzy-filters + - ros-jazzy-laser-geometry + - ros-jazzy-message-filters + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-kdl + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-laser-geometry/bld_ament_cmake.bat b/recipes/ros-jazzy-laser-geometry/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-laser-geometry/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-laser-geometry/build_ament_cmake.sh b/recipes/ros-jazzy-laser-geometry/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-laser-geometry/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-laser-geometry/recipe.yaml b/recipes/ros-jazzy-laser-geometry/recipe.yaml new file mode 100644 index 00000000..eea24fe9 --- /dev/null +++ b/recipes/ros-jazzy-laser-geometry/recipe.yaml @@ -0,0 +1,104 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-laser-geometry + version: 2.7.0 +source: + git: https://github.com/ros2-gbp/laser_geometry-release.git + tag: release/jazzy/laser_geometry/2.7.0-3 + target_directory: ros-jazzy-laser-geometry/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-cppcheck + - ros-jazzy-ament-cmake-cpplint + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-cmake-uncrustify + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-python-cmake-module + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-tf2 + - ros2-distro-mutex 0.6.* jazzy_* + run: + - eigen + - numpy + - python + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-rclcpp + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-sensor-msgs-py + - ros-jazzy-tf2 + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-launch-param-builder/bld_ament_python.bat b/recipes/ros-jazzy-launch-param-builder/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-launch-param-builder/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-launch-param-builder/build_ament_python.sh b/recipes/ros-jazzy-launch-param-builder/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-launch-param-builder/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-launch-param-builder/recipe.yaml b/recipes/ros-jazzy-launch-param-builder/recipe.yaml new file mode 100644 index 00000000..c4281258 --- /dev/null +++ b/recipes/ros-jazzy-launch-param-builder/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-launch-param-builder + version: 0.1.1 +source: + git: https://github.com/ros2-gbp/launch_param_builder-release.git + tag: release/jazzy/launch_param_builder/0.1.1-4 + target_directory: ros-jazzy-launch-param-builder/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - pyyaml + - ros-jazzy-ament-index-python + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-xacro + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-launch-pytest/bld_ament_python.bat b/recipes/ros-jazzy-launch-pytest/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-launch-pytest/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-launch-pytest/build_ament_python.sh b/recipes/ros-jazzy-launch-pytest/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-launch-pytest/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-launch-pytest/recipe.yaml b/recipes/ros-jazzy-launch-pytest/recipe.yaml new file mode 100644 index 00000000..43e90731 --- /dev/null +++ b/recipes/ros-jazzy-launch-pytest/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-launch-pytest + version: 3.4.3 +source: + git: https://github.com/ros2-gbp/launch-release.git + tag: release/jazzy/launch_pytest/3.4.3-1 + target_directory: ros-jazzy-launch-pytest/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-launch + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - pytest + - python + - ros-jazzy-ament-index-python + - ros-jazzy-launch + - ros-jazzy-launch-testing + - ros-jazzy-osrf-pycommon + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-launch-ros/bld_ament_python.bat b/recipes/ros-jazzy-launch-ros/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-launch-ros/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-launch-ros/build_ament_python.sh b/recipes/ros-jazzy-launch-ros/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-launch-ros/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-launch-ros/recipe.yaml b/recipes/ros-jazzy-launch-ros/recipe.yaml new file mode 100644 index 00000000..292dd194 --- /dev/null +++ b/recipes/ros-jazzy-launch-ros/recipe.yaml @@ -0,0 +1,104 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-launch-ros + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/launch_ros-release.git + tag: release/jazzy/launch_ros/0.26.6-1 + target_directory: ros-jazzy-launch-ros/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - importlib-metadata + - numpy + - pip + - pytest + - python + - pyyaml + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-index-python + - ros-jazzy-ament-pep257 + - ros-jazzy-composition-interfaces + - ros-jazzy-launch + - ros-jazzy-lifecycle-msgs + - ros-jazzy-osrf-pycommon + - ros-jazzy-rclpy + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - importlib-metadata + - python + - pyyaml + - ros-jazzy-ament-index-python + - ros-jazzy-composition-interfaces + - ros-jazzy-launch + - ros-jazzy-lifecycle-msgs + - ros-jazzy-osrf-pycommon + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-launch-testing-ament-cmake/bld_ament_cmake.bat b/recipes/ros-jazzy-launch-testing-ament-cmake/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-launch-testing-ament-cmake/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-launch-testing-ament-cmake/build_ament_cmake.sh b/recipes/ros-jazzy-launch-testing-ament-cmake/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-launch-testing-ament-cmake/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-launch-testing-ament-cmake/recipe.yaml b/recipes/ros-jazzy-launch-testing-ament-cmake/recipe.yaml new file mode 100644 index 00000000..f7580e34 --- /dev/null +++ b/recipes/ros-jazzy-launch-testing-ament-cmake/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-launch-testing-ament-cmake + version: 3.4.3 +source: + git: https://github.com/ros2-gbp/launch-release.git + tag: release/jazzy/launch_testing_ament_cmake/3.4.3-1 + target_directory: ros-jazzy-launch-testing-ament-cmake/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-test + - ros-jazzy-launch-testing + - ros-jazzy-python-cmake-module + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-test + - ros-jazzy-launch-testing + - ros-jazzy-python-cmake-module + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-launch-testing-ros/bld_ament_python.bat b/recipes/ros-jazzy-launch-testing-ros/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-launch-testing-ros/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-launch-testing-ros/build_ament_python.sh b/recipes/ros-jazzy-launch-testing-ros/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-launch-testing-ros/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-launch-testing-ros/recipe.yaml b/recipes/ros-jazzy-launch-testing-ros/recipe.yaml new file mode 100644 index 00000000..4cfd4565 --- /dev/null +++ b/recipes/ros-jazzy-launch-testing-ros/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-launch-testing-ros + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/launch_ros-release.git + tag: release/jazzy/launch_testing_ros/0.26.6-1 + target_directory: ros-jazzy-launch-testing-ros/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ament-index-python + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-launch-testing/bld_ament_python.bat b/recipes/ros-jazzy-launch-testing/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-launch-testing/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-launch-testing/build_ament_python.sh b/recipes/ros-jazzy-launch-testing/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-launch-testing/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-launch-testing/recipe.yaml b/recipes/ros-jazzy-launch-testing/recipe.yaml new file mode 100644 index 00000000..bdda5324 --- /dev/null +++ b/recipes/ros-jazzy-launch-testing/recipe.yaml @@ -0,0 +1,96 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-launch-testing + version: 3.4.3 +source: + git: https://github.com/ros2-gbp/launch-release.git + tag: release/jazzy/launch_testing/3.4.3-1 + target_directory: ros-jazzy-launch-testing/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-launch + - ros-jazzy-launch-xml + - ros-jazzy-launch-yaml + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - pytest + - python + - ros-jazzy-ament-index-python + - ros-jazzy-launch + - ros-jazzy-launch-xml + - ros-jazzy-launch-yaml + - ros-jazzy-osrf-pycommon + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-launch-xml/bld_ament_python.bat b/recipes/ros-jazzy-launch-xml/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-launch-xml/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-launch-xml/build_ament_python.sh b/recipes/ros-jazzy-launch-xml/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-launch-xml/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-launch-xml/recipe.yaml b/recipes/ros-jazzy-launch-xml/recipe.yaml new file mode 100644 index 00000000..d973bfe4 --- /dev/null +++ b/recipes/ros-jazzy-launch-xml/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-launch-xml + version: 3.4.3 +source: + git: https://github.com/ros2-gbp/launch-release.git + tag: release/jazzy/launch_xml/3.4.3-1 + target_directory: ros-jazzy-launch-xml/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-launch + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-launch + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-launch-yaml/bld_ament_python.bat b/recipes/ros-jazzy-launch-yaml/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-launch-yaml/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-launch-yaml/build_ament_python.sh b/recipes/ros-jazzy-launch-yaml/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-launch-yaml/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-launch-yaml/recipe.yaml b/recipes/ros-jazzy-launch-yaml/recipe.yaml new file mode 100644 index 00000000..d1fc655a --- /dev/null +++ b/recipes/ros-jazzy-launch-yaml/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-launch-yaml + version: 3.4.3 +source: + git: https://github.com/ros2-gbp/launch-release.git + tag: release/jazzy/launch_yaml/3.4.3-1 + target_directory: ros-jazzy-launch-yaml/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-launch + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-launch + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-launch/bld_ament_python.bat b/recipes/ros-jazzy-launch/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-launch/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-launch/build_ament_python.sh b/recipes/ros-jazzy-launch/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-launch/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-launch/recipe.yaml b/recipes/ros-jazzy-launch/recipe.yaml new file mode 100644 index 00000000..d0760385 --- /dev/null +++ b/recipes/ros-jazzy-launch/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-launch + version: 3.4.3 +source: + git: https://github.com/ros2-gbp/launch-release.git + tag: release/jazzy/launch/3.4.3-1 + target_directory: ros-jazzy-launch/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-mypy + - ros-jazzy-ament-pep257 + - ros-jazzy-osrf-pycommon + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - importlib-metadata + - lark-parser + - python + - pyyaml + - ros-jazzy-ament-index-python + - ros-jazzy-osrf-pycommon + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-libcurl-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-libcurl-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-libcurl-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-libcurl-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-libcurl-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-libcurl-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-libcurl-vendor/recipe.yaml b/recipes/ros-jazzy-libcurl-vendor/recipe.yaml new file mode 100644 index 00000000..28be731a --- /dev/null +++ b/recipes/ros-jazzy-libcurl-vendor/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-libcurl-vendor + version: 3.4.3 +source: + git: https://github.com/ros2-gbp/resource_retriever-release.git + tag: release/jazzy/libcurl_vendor/3.4.3-1 + target_directory: ros-jazzy-libcurl-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - file + - libcurl + - numpy + - pip + - pkg-config + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - libcurl + - pkg-config + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-liblz4-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-liblz4-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-liblz4-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-liblz4-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-liblz4-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-liblz4-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-liblz4-vendor/recipe.yaml b/recipes/ros-jazzy-liblz4-vendor/recipe.yaml new file mode 100644 index 00000000..44e45863 --- /dev/null +++ b/recipes/ros-jazzy-liblz4-vendor/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-liblz4-vendor + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/liblz4_vendor/0.26.6-1 + target_directory: ros-jazzy-liblz4-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - lz4 + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - lz4 + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-libstatistics-collector/bld_ament_cmake.bat b/recipes/ros-jazzy-libstatistics-collector/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-libstatistics-collector/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-libstatistics-collector/build_ament_cmake.sh b/recipes/ros-jazzy-libstatistics-collector/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-libstatistics-collector/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-libstatistics-collector/recipe.yaml b/recipes/ros-jazzy-libstatistics-collector/recipe.yaml new file mode 100644 index 00000000..2e56f3d8 --- /dev/null +++ b/recipes/ros-jazzy-libstatistics-collector/recipe.yaml @@ -0,0 +1,102 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-libstatistics-collector + version: 1.7.4 +source: + git: https://github.com/ros2-gbp/libstatistics_collector-release.git + tag: release/jazzy/libstatistics_collector/1.7.4-1 + target_directory: ros-jazzy-libstatistics-collector/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-performance-test-fixture + - ros-jazzy-rcl + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-statistics-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-rcl + - ros-jazzy-rcpputils + - ros-jazzy-rmw + - ros-jazzy-ros-workspace + - ros-jazzy-statistics-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-libyaml-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-libyaml-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-libyaml-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-libyaml-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-libyaml-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-libyaml-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-libyaml-vendor/recipe.yaml b/recipes/ros-jazzy-libyaml-vendor/recipe.yaml new file mode 100644 index 00000000..35ccd290 --- /dev/null +++ b/recipes/ros-jazzy-libyaml-vendor/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-libyaml-vendor + version: 1.6.3 +source: + git: https://github.com/ros2-gbp/libyaml_vendor-release.git + tag: release/jazzy/libyaml_vendor/1.6.3-2 + target_directory: ros-jazzy-libyaml-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pkg-config + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-performance-test-fixture + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - yaml + - yaml-cpp + run: + - pkg-config + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - yaml + - yaml-cpp + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-lifecycle-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-lifecycle-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-lifecycle-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-lifecycle-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-lifecycle-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-lifecycle-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-lifecycle-msgs/recipe.yaml b/recipes/ros-jazzy-lifecycle-msgs/recipe.yaml new file mode 100644 index 00000000..d9ecd590 --- /dev/null +++ b/recipes/ros-jazzy-lifecycle-msgs/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-lifecycle-msgs + version: 2.0.2 +source: + git: https://github.com/ros2-gbp/rcl_interfaces-release.git + tag: release/jazzy/lifecycle_msgs/2.0.2-2 + target_directory: ros-jazzy-lifecycle-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-lifecycle/bld_ament_cmake.bat b/recipes/ros-jazzy-lifecycle/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-lifecycle/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-lifecycle/build_ament_cmake.sh b/recipes/ros-jazzy-lifecycle/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-lifecycle/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-lifecycle/recipe.yaml b/recipes/ros-jazzy-lifecycle/recipe.yaml new file mode 100644 index 00000000..9827993a --- /dev/null +++ b/recipes/ros-jazzy-lifecycle/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-lifecycle + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/lifecycle/0.33.5-1 + target_directory: ros-jazzy-lifecycle/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-lifecycle-msgs + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-testing + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-lifecycle-msgs + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-logging-demo/bld_ament_cmake.bat b/recipes/ros-jazzy-logging-demo/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-logging-demo/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-logging-demo/build_ament_cmake.sh b/recipes/ros-jazzy-logging-demo/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-logging-demo/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-logging-demo/recipe.yaml b/recipes/ros-jazzy-logging-demo/recipe.yaml new file mode 100644 index 00000000..3e7a85c2 --- /dev/null +++ b/recipes/ros-jazzy-logging-demo/recipe.yaml @@ -0,0 +1,102 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-logging-demo + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/logging_demo/0.33.5-1 + target_directory: ros-jazzy-logging-demo/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-launch + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-launch-testing-ros + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rcutils + - ros-jazzy-rmw-implementation-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-map-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-map-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-map-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-map-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-map-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-map-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-map-msgs/recipe.yaml b/recipes/ros-jazzy-map-msgs/recipe.yaml new file mode 100644 index 00000000..dad18f04 --- /dev/null +++ b/recipes/ros-jazzy-map-msgs/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-map-msgs + version: 2.4.1 +source: + git: https://github.com/ros2-gbp/navigation_msgs-release.git + tag: release/jazzy/map_msgs/2.4.1-2 + target_directory: ros-jazzy-map-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-nav-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-nav-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-mcap-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-mcap-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-mcap-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-mcap-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-mcap-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-mcap-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-mcap-vendor/recipe.yaml b/recipes/ros-jazzy-mcap-vendor/recipe.yaml new file mode 100644 index 00000000..49b52c4e --- /dev/null +++ b/recipes/ros-jazzy-mcap-vendor/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-mcap-vendor + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/mcap_vendor/0.26.6-1 + target_directory: ros-jazzy-mcap-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-liblz4-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-zstd-vendor + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-liblz4-vendor + - ros-jazzy-ros-workspace + - ros-jazzy-zstd-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-message-filters/bld_ament_cmake.bat b/recipes/ros-jazzy-message-filters/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-message-filters/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-message-filters/build_ament_cmake.sh b/recipes/ros-jazzy-message-filters/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-message-filters/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-message-filters/recipe.yaml b/recipes/ros-jazzy-message-filters/recipe.yaml new file mode 100644 index 00000000..e9b33ce9 --- /dev/null +++ b/recipes/ros-jazzy-message-filters/recipe.yaml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-message-filters + version: 4.11.3 +source: + git: https://github.com/ros2-gbp/ros2_message_filters-release.git + tag: release/jazzy/message_filters/4.11.3-1 + target_directory: ros-jazzy-message-filters/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-python-cmake-module + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclpy + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-mimick-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-mimick-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-mimick-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-mimick-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-mimick-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-mimick-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-mimick-vendor/recipe.yaml b/recipes/ros-jazzy-mimick-vendor/recipe.yaml new file mode 100644 index 00000000..c2101b67 --- /dev/null +++ b/recipes/ros-jazzy-mimick-vendor/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-mimick-vendor + version: 0.6.2 +source: + git: https://github.com/ros2-gbp/mimick_vendor-release.git + tag: release/jazzy/mimick_vendor/0.6.2-1 + target_directory: ros-jazzy-mimick-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - vcstool + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-common/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-common/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-common/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-common/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-common/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-common/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-common/recipe.yaml b/recipes/ros-jazzy-moveit-common/recipe.yaml new file mode 100644 index 00000000..5f99bf71 --- /dev/null +++ b/recipes/ros-jazzy-moveit-common/recipe.yaml @@ -0,0 +1,86 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-common + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_common/2.12.1-1 + target_directory: ros-jazzy-moveit-common/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-backward-ros + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-backward-ros + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-configs-utils/bld_ament_python.bat b/recipes/ros-jazzy-moveit-configs-utils/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-moveit-configs-utils/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-configs-utils/build_ament_python.sh b/recipes/ros-jazzy-moveit-configs-utils/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-moveit-configs-utils/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-moveit-configs-utils/recipe.yaml b/recipes/ros-jazzy-moveit-configs-utils/recipe.yaml new file mode 100644 index 00000000..83de6fa4 --- /dev/null +++ b/recipes/ros-jazzy-moveit-configs-utils/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-configs-utils + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_configs_utils/2.12.1-1 + target_directory: ros-jazzy-moveit-configs-utils/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ament-index-python + - ros-jazzy-launch + - ros-jazzy-launch-param-builder + - ros-jazzy-launch-ros + - ros-jazzy-ros-workspace + - ros-jazzy-srdfdom + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-core/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-core/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-core/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-core/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-core/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-core/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-core/patch/ros-jazzy-moveit-core.patch b/recipes/ros-jazzy-moveit-core/patch/ros-jazzy-moveit-core.patch new file mode 100644 index 00000000..0ddb89b4 --- /dev/null +++ b/recipes/ros-jazzy-moveit-core/patch/ros-jazzy-moveit-core.patch @@ -0,0 +1,131 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 608babbeb..a006b45fc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,7 +20,7 @@ find_package(kdl_parser REQUIRED) + find_package(moveit_msgs REQUIRED) + # Enforce system version liboctomap-dev + # https://github.com/moveit/moveit2/issues/2862 +-find_package(octomap 1.9.7...<1.10.0 REQUIRED) ++find_package(octomap REQUIRED) + find_package(octomap_msgs REQUIRED) + find_package(osqp REQUIRED) + find_package(pluginlib REQUIRED) +diff --git a/collision_detection/include/moveit/collision_detection/collision_common.hpp b/collision_detection/include/moveit/collision_detection/collision_common.hpp +index 19777a044..af3a89442 100644 +--- a/collision_detection/include/moveit/collision_detection/collision_common.hpp ++++ b/collision_detection/include/moveit/collision_detection/collision_common.hpp +@@ -141,7 +141,33 @@ struct CostSource + } + }; + +-struct CollisionResult; ++/** \brief Representation of a collision checking result */ ++struct CollisionResult ++{ ++ using ContactMap = std::map, std::vector >; ++ EIGEN_MAKE_ALIGNED_OPERATOR_NEW ++ /** \brief Clear a previously stored result */ ++ void clear() ++ { ++ collision = false; ++ distance = std::numeric_limits::max(); ++ contact_count = 0; ++ contacts.clear(); ++ cost_sources.clear(); ++ } ++ /** \brief Throttled warning printing the first collision pair, if any. All collisions are logged at DEBUG level */ ++ void print() const; ++ /** \brief True if collision was found, false otherwise */ ++ bool collision = false; ++ /** \brief Closest distance between two bodies */ ++ double distance = std::numeric_limits::max(); ++ /** \brief Number of contacts returned */ ++ std::size_t contact_count = 0; ++ /** \brief A map returning the pairs of body ids in contact, plus their contact details */ ++ ContactMap contacts; ++ /** \brief These are the individual cost sources when costs are computed */ ++ std::set cost_sources; ++}; + + /** \brief Representation of a collision checking request */ + struct CollisionRequest +@@ -159,9 +185,6 @@ struct CollisionRequest + /** \brief If true, compute proximity distance */ + bool distance = false; + +- /** \brief If true, return detailed distance information. Distance must be set to true as well */ +- bool detailed_distance = false; +- + /** \brief If true, a collision cost is computed */ + bool cost = false; + +@@ -330,42 +353,4 @@ struct DistanceResult + } + }; + +-/** \brief Representation of a collision checking result */ +-struct CollisionResult +-{ +- EIGEN_MAKE_ALIGNED_OPERATOR_NEW +- +- /** \brief Clear a previously stored result */ +- void clear() +- { +- collision = false; +- distance = std::numeric_limits::max(); +- distance_result.clear(); +- contact_count = 0; +- contacts.clear(); +- cost_sources.clear(); +- } +- +- /** \brief Throttled warning printing the first collision pair, if any. All collisions are logged at DEBUG level */ +- void print() const; +- +- /** \brief True if collision was found, false otherwise */ +- bool collision = false; +- +- /** \brief Closest distance between two bodies */ +- double distance = std::numeric_limits::max(); +- +- /** \brief Distance data for each link */ +- DistanceResult distance_result; +- +- /** \brief Number of contacts returned */ +- std::size_t contact_count = 0; +- +- /** \brief A map returning the pairs of body ids in contact, plus their contact details */ +- using ContactMap = std::map, std::vector >; +- ContactMap contacts; +- +- /** \brief These are the individual cost sources when costs are computed */ +- std::set cost_sources; +-}; + } // namespace collision_detection +diff --git a/collision_detection_fcl/src/collision_env_fcl.cpp b/collision_detection_fcl/src/collision_env_fcl.cpp +index b57e0767e..c655ed069 100644 +--- a/collision_detection_fcl/src/collision_env_fcl.cpp ++++ b/collision_detection_fcl/src/collision_env_fcl.cpp +@@ -290,10 +290,6 @@ void CollisionEnvFCL::checkSelfCollisionHelper(const CollisionRequest& req, Coll + dreq.enableGroup(getRobotModel()); + distanceSelf(dreq, dres, state); + res.distance = dres.minimum_distance.distance; +- if (req.detailed_distance) +- { +- res.distance_result = dres; +- } + } + } + +@@ -347,10 +343,6 @@ void CollisionEnvFCL::checkRobotCollisionHelper(const CollisionRequest& req, Col + dreq.enableGroup(getRobotModel()); + distanceRobot(dreq, dres, state); + res.distance = dres.minimum_distance.distance; +- if (req.detailed_distance) +- { +- res.distance_result = dres; +- } + } + } + diff --git a/recipes/ros-jazzy-moveit-core/recipe.yaml b/recipes/ros-jazzy-moveit-core/recipe.yaml new file mode 100644 index 00000000..523727f1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-core/recipe.yaml @@ -0,0 +1,171 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-core + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_core/2.12.1-1 + target_directory: ros-jazzy-moveit-core/src/work + patches: + - patch/ros-jazzy-moveit-core.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - assimp + - if: build_platform == target_platform + then: + - pkg-config + - bullet + - eigen + - fcl + - libboost-devel + - libboost-python-devel + - numpy + - pip + - pkg-config + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-google-benchmark + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-index-cpp + - ros-jazzy-angles + - ros-jazzy-common-interfaces + - ros-jazzy-eigen-stl-containers + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-generate-parameter-library + - ros-jazzy-geometric-shapes + - ros-jazzy-geometry-msgs + - ros-jazzy-google-benchmark-vendor + - ros-jazzy-kdl-parser + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-moveit-common + - ros-jazzy-moveit-msgs + - ros-jazzy-moveit-resources-panda-moveit-config + - ros-jazzy-moveit-resources-pr2-description + - ros-jazzy-octomap-msgs + - ros-jazzy-orocos-kdl-vendor + - ros-jazzy-osqp-vendor + - ros-jazzy-pluginlib + - ros-jazzy-random-numbers + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclpy + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rsl + - ros-jazzy-ruckig + - ros-jazzy-sensor-msgs + - ros-jazzy-shape-msgs + - ros-jazzy-srdfdom + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-kdl + - ros-jazzy-trajectory-msgs + - ros-jazzy-urdf + - ros-jazzy-urdfdom + - ros-jazzy-urdfdom-headers + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - assimp + - bullet + - eigen + - fcl + - libboost-devel + - libboost-python-devel + - python + - ros-jazzy-angles + - ros-jazzy-common-interfaces + - ros-jazzy-eigen-stl-containers + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-generate-parameter-library + - ros-jazzy-geometric-shapes + - ros-jazzy-geometry-msgs + - ros-jazzy-google-benchmark-vendor + - ros-jazzy-kdl-parser + - ros-jazzy-moveit-common + - ros-jazzy-moveit-msgs + - ros-jazzy-octomap-msgs + - ros-jazzy-osqp-vendor + - ros-jazzy-pluginlib + - ros-jazzy-random-numbers + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-rsl + - ros-jazzy-ruckig + - ros-jazzy-sensor-msgs + - ros-jazzy-shape-msgs + - ros-jazzy-srdfdom + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-kdl + - ros-jazzy-trajectory-msgs + - ros-jazzy-urdf + - ros-jazzy-urdfdom + - ros-jazzy-urdfdom-headers + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-kinematics/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-kinematics/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-kinematics/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-kinematics/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-kinematics/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-kinematics/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-kinematics/patch/ros-jazzy-moveit-kinematics.patch b/recipes/ros-jazzy-moveit-kinematics/patch/ros-jazzy-moveit-kinematics.patch new file mode 100644 index 00000000..6f2e9ac7 --- /dev/null +++ b/recipes/ros-jazzy-moveit-kinematics/patch/ros-jazzy-moveit-kinematics.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 21b03dfb1..5a76c1683 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,8 @@ + cmake_minimum_required(VERSION 3.22) + project(moveit_kinematics LANGUAGES CXX) + ++add_definitions(-DNOMINMAX) ++ + # Common cmake code applied to all moveit packages + find_package(moveit_common REQUIRED) + moveit_package() +diff --git a/cached_ik_kinematics_plugin/include/moveit/cached_ik_kinematics_plugin/detail/GreedyKCenters.hpp b/cached_ik_kinematics_plugin/include/moveit/cached_ik_kinematics_plugin/detail/GreedyKCenters.hpp +index 173471c7e..47e47e2db 100644 +--- a/cached_ik_kinematics_plugin/include/moveit/cached_ik_kinematics_plugin/detail/GreedyKCenters.hpp ++++ b/cached_ik_kinematics_plugin/include/moveit/cached_ik_kinematics_plugin/detail/GreedyKCenters.hpp +@@ -92,7 +92,7 @@ public: + centers.clear(); + centers.reserve(k); + if (static_cast(dists.rows()) < data.size() || static_cast(dists.cols()) < k) +- dists.resize(std::max(2 * static_cast(dists.rows()) + 1, data.size()), k); ++ dists.resize(std::max(2 * ((long unsigned int)dists.rows()) + 1, (long unsigned int)data.size()), k); + // first center is picked randomly + centers.push_back(std::uniform_int_distribution{ 0, data.size() - 1 }(rsl::rng())); + for (unsigned i = 1; i < k; ++i) diff --git a/recipes/ros-jazzy-moveit-kinematics/recipe.yaml b/recipes/ros-jazzy-moveit-kinematics/recipe.yaml new file mode 100644 index 00000000..f2c434e0 --- /dev/null +++ b/recipes/ros-jazzy-moveit-kinematics/recipe.yaml @@ -0,0 +1,120 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-kinematics + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_kinematics/2.12.1-1 + target_directory: ros-jazzy-moveit-kinematics/src/work + patches: + - patch/ros-jazzy-moveit-kinematics.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-class-loader + - ros-jazzy-generate-parameter-library + - ros-jazzy-launch-param-builder + - ros-jazzy-moveit-common + - ros-jazzy-moveit-configs-utils + - ros-jazzy-moveit-core + - ros-jazzy-moveit-msgs + - ros-jazzy-moveit-resources-fanuc-description + - ros-jazzy-moveit-resources-fanuc-moveit-config + - ros-jazzy-moveit-resources-panda-description + - ros-jazzy-moveit-resources-panda-moveit-config + - ros-jazzy-moveit-ros-planning + - ros-jazzy-orocos-kdl-vendor + - ros-jazzy-pluginlib + - ros-jazzy-ros-environment + - ros-jazzy-ros-testing + - ros-jazzy-ros-workspace + - ros-jazzy-rsl + - ros-jazzy-tf2 + - ros-jazzy-tf2-kdl + - ros2-distro-mutex 0.6.* jazzy_* + run: + - eigen + - lxml + - python + - ros-jazzy-class-loader + - ros-jazzy-generate-parameter-library + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-msgs + - ros-jazzy-moveit-ros-planning + - ros-jazzy-orocos-kdl-vendor + - ros-jazzy-pluginlib + - ros-jazzy-ros-workspace + - ros-jazzy-rsl + - ros-jazzy-tf2 + - ros-jazzy-tf2-kdl + - ros-jazzy-urdfdom + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-msgs/recipe.yaml b/recipes/ros-jazzy-moveit-msgs/recipe.yaml new file mode 100644 index 00000000..efd28c64 --- /dev/null +++ b/recipes/ros-jazzy-moveit-msgs/recipe.yaml @@ -0,0 +1,104 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-msgs + version: 2.6.0 +source: + git: https://github.com/ros2-gbp/moveit_msgs-release.git + tag: release/jazzy/moveit_msgs/2.6.0-1 + target_directory: ros-jazzy-moveit-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-action-msgs + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-cmake + - ros-jazzy-geometry-msgs + - ros-jazzy-object-recognition-msgs + - ros-jazzy-octomap-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-sensor-msgs + - ros-jazzy-shape-msgs + - ros-jazzy-std-msgs + - ros-jazzy-trajectory-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-action-msgs + - ros-jazzy-geometry-msgs + - ros-jazzy-object-recognition-msgs + - ros-jazzy-octomap-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-sensor-msgs + - ros-jazzy-shape-msgs + - ros-jazzy-std-msgs + - ros-jazzy-trajectory-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-planners-chomp/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-planners-chomp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-planners-chomp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-planners-chomp/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-planners-chomp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-planners-chomp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-planners-chomp/recipe.yaml b/recipes/ros-jazzy-moveit-planners-chomp/recipe.yaml new file mode 100644 index 00000000..c410119b --- /dev/null +++ b/recipes/ros-jazzy-moveit-planners-chomp/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-planners-chomp + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_planners_chomp/2.12.1-1 + target_directory: ros-jazzy-moveit-planners-chomp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-chomp-motion-planner + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-chomp-motion-planner + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-planners-ompl/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-planners-ompl/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-planners-ompl/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-planners-ompl/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-planners-ompl/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-planners-ompl/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-planners-ompl/patch/ros-jazzy-moveit-planners-ompl.patch b/recipes/ros-jazzy-moveit-planners-ompl/patch/ros-jazzy-moveit-planners-ompl.patch new file mode 100644 index 00000000..bd45f39f --- /dev/null +++ b/recipes/ros-jazzy-moveit-planners-ompl/patch/ros-jazzy-moveit-planners-ompl.patch @@ -0,0 +1,18 @@ +diff --git a/ompl_interface/CMakeLists.txt b/ompl_interface/CMakeLists.txt +index ff71c07c..0d0aef71 100644 +--- a/ompl_interface/CMakeLists.txt ++++ b/ompl_interface/CMakeLists.txt +@@ -24,7 +24,12 @@ add_library(${MOVEIT_LIB_NAME} SHARED + ) + set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}") + +-find_package(OpenMP REQUIRED) ++if(APPLE) ++ find_package(OpenMP) ++ set(OpenMP_CXX_FLAGS "-fopenmp") ++else() ++ find_package(OpenMP REQUIRED) ++endif() + + # Used to link in ODE, an OMPL dependency, on macOS + if(APPLE) diff --git a/recipes/ros-jazzy-moveit-planners-ompl/recipe.yaml b/recipes/ros-jazzy-moveit-planners-ompl/recipe.yaml new file mode 100644 index 00000000..069627d6 --- /dev/null +++ b/recipes/ros-jazzy-moveit-planners-ompl/recipe.yaml @@ -0,0 +1,112 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-planners-ompl + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_planners_ompl/2.12.1-1 + target_directory: ros-jazzy-moveit-planners-ompl/src/work + patches: + - patch/ros-jazzy-moveit-planners-ompl.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - llvm-openmp + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-msgs + - ros-jazzy-moveit-resources-fanuc-moveit-config + - ros-jazzy-moveit-resources-panda-moveit-config + - ros-jazzy-moveit-resources-pr2-description + - ros-jazzy-moveit-ros-planning + - ros-jazzy-ompl + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - llvm-openmp + - python + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-msgs + - ros-jazzy-moveit-ros-planning + - ros-jazzy-ompl + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-planners-stomp/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-planners-stomp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-planners-stomp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-planners-stomp/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-planners-stomp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-planners-stomp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-planners-stomp/recipe.yaml b/recipes/ros-jazzy-moveit-planners-stomp/recipe.yaml new file mode 100644 index 00000000..f1548f08 --- /dev/null +++ b/recipes/ros-jazzy-moveit-planners-stomp/recipe.yaml @@ -0,0 +1,100 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-planners-stomp + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_planners_stomp/2.12.1-1 + target_directory: ros-jazzy-moveit-planners-stomp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-generate-parameter-library + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rsl + - ros-jazzy-std-msgs + - ros-jazzy-stomp + - ros-jazzy-tf2-eigen + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-generate-parameter-library + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-ros-workspace + - ros-jazzy-rsl + - ros-jazzy-std-msgs + - ros-jazzy-stomp + - ros-jazzy-tf2-eigen + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-planners/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-planners/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-planners/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-planners/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-planners/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-planners/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-planners/recipe.yaml b/recipes/ros-jazzy-moveit-planners/recipe.yaml new file mode 100644 index 00000000..f51a7860 --- /dev/null +++ b/recipes/ros-jazzy-moveit-planners/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-planners + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_planners/2.12.1-1 + target_directory: ros-jazzy-moveit-planners/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-chomp-motion-planner + - ros-jazzy-moveit-planners-ompl + - ros-jazzy-moveit-planners-stomp + - ros-jazzy-pilz-industrial-motion-planner + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-plugins/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-plugins/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-plugins/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-plugins/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-plugins/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-plugins/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-plugins/recipe.yaml b/recipes/ros-jazzy-moveit-plugins/recipe.yaml new file mode 100644 index 00000000..7537675a --- /dev/null +++ b/recipes/ros-jazzy-moveit-plugins/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-plugins + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_plugins/2.12.1-1 + target_directory: ros-jazzy-moveit-plugins/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-moveit-simple-controller-manager + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-resources-fanuc-description/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-resources-fanuc-description/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-fanuc-description/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-resources-fanuc-description/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-resources-fanuc-description/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-fanuc-description/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-resources-fanuc-description/recipe.yaml b/recipes/ros-jazzy-moveit-resources-fanuc-description/recipe.yaml new file mode 100644 index 00000000..a85083c7 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-fanuc-description/recipe.yaml @@ -0,0 +1,84 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-resources-fanuc-description + version: 3.1.0 +source: + git: https://github.com/ros2-gbp/moveit_resources-release.git + tag: release/jazzy/moveit_resources_fanuc_description/3.1.0-1 + target_directory: ros-jazzy-moveit-resources-fanuc-description/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-resources-fanuc-moveit-config/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-resources-fanuc-moveit-config/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-fanuc-moveit-config/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-resources-fanuc-moveit-config/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-resources-fanuc-moveit-config/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-fanuc-moveit-config/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-resources-fanuc-moveit-config/recipe.yaml b/recipes/ros-jazzy-moveit-resources-fanuc-moveit-config/recipe.yaml new file mode 100644 index 00000000..0b141db9 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-fanuc-moveit-config/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-resources-fanuc-moveit-config + version: 3.1.0 +source: + git: https://github.com/ros2-gbp/moveit_resources-release.git + tag: release/jazzy/moveit_resources_fanuc_moveit_config/3.1.0-1 + target_directory: ros-jazzy-moveit-resources-fanuc-moveit-config/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-controller-manager + - ros-jazzy-joint-state-publisher + - ros-jazzy-moveit-resources-fanuc-description + - ros-jazzy-position-controllers + - ros-jazzy-robot-state-publisher + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli-common-extensions + - ros-jazzy-tf2-ros + - ros-jazzy-xacro + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-resources-panda-description/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-resources-panda-description/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-panda-description/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-resources-panda-description/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-resources-panda-description/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-panda-description/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-resources-panda-description/recipe.yaml b/recipes/ros-jazzy-moveit-resources-panda-description/recipe.yaml new file mode 100644 index 00000000..1aace845 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-panda-description/recipe.yaml @@ -0,0 +1,84 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-resources-panda-description + version: 3.1.0 +source: + git: https://github.com/ros2-gbp/moveit_resources-release.git + tag: release/jazzy/moveit_resources_panda_description/3.1.0-1 + target_directory: ros-jazzy-moveit-resources-panda-description/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-resources-panda-moveit-config/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-resources-panda-moveit-config/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-panda-moveit-config/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-resources-panda-moveit-config/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-resources-panda-moveit-config/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-panda-moveit-config/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-resources-panda-moveit-config/recipe.yaml b/recipes/ros-jazzy-moveit-resources-panda-moveit-config/recipe.yaml new file mode 100644 index 00000000..44d5a61a --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-panda-moveit-config/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-resources-panda-moveit-config + version: 3.1.0 +source: + git: https://github.com/ros2-gbp/moveit_resources-release.git + tag: release/jazzy/moveit_resources_panda_moveit_config/3.1.0-1 + target_directory: ros-jazzy-moveit-resources-panda-moveit-config/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-controller-manager + - ros-jazzy-joint-state-publisher + - ros-jazzy-joint-state-publisher-gui + - ros-jazzy-moveit-resources-panda-description + - ros-jazzy-position-controllers + - ros-jazzy-robot-state-publisher + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli-common-extensions + - ros-jazzy-topic-tools + - ros-jazzy-xacro + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-resources-pr2-description/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-resources-pr2-description/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-pr2-description/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-resources-pr2-description/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-resources-pr2-description/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-pr2-description/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-resources-pr2-description/recipe.yaml b/recipes/ros-jazzy-moveit-resources-pr2-description/recipe.yaml new file mode 100644 index 00000000..d2755eaf --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-pr2-description/recipe.yaml @@ -0,0 +1,84 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-resources-pr2-description + version: 3.1.0 +source: + git: https://github.com/ros2-gbp/moveit_resources-release.git + tag: release/jazzy/moveit_resources_pr2_description/3.1.0-1 + target_directory: ros-jazzy-moveit-resources-pr2-description/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-resources-prbt-ikfast-manipulator-plugin/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-resources-prbt-ikfast-manipulator-plugin/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-prbt-ikfast-manipulator-plugin/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-resources-prbt-ikfast-manipulator-plugin/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-resources-prbt-ikfast-manipulator-plugin/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-prbt-ikfast-manipulator-plugin/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-resources-prbt-ikfast-manipulator-plugin/recipe.yaml b/recipes/ros-jazzy-moveit-resources-prbt-ikfast-manipulator-plugin/recipe.yaml new file mode 100644 index 00000000..3b2470ce --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-prbt-ikfast-manipulator-plugin/recipe.yaml @@ -0,0 +1,98 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-resources-prbt-ikfast-manipulator-plugin + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_resources_prbt_ikfast_manipulator_plugin/2.12.1-1 + target_directory: ros-jazzy-moveit-resources-prbt-ikfast-manipulator-plugin/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-generate-parameter-library + - ros-jazzy-moveit-core + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-eigen-kdl + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-kdl + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-generate-parameter-library + - ros-jazzy-moveit-core + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-kdl + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-resources-prbt-moveit-config/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-resources-prbt-moveit-config/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-prbt-moveit-config/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-resources-prbt-moveit-config/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-resources-prbt-moveit-config/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-prbt-moveit-config/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-resources-prbt-moveit-config/recipe.yaml b/recipes/ros-jazzy-moveit-resources-prbt-moveit-config/recipe.yaml new file mode 100644 index 00000000..72f27485 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-prbt-moveit-config/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-resources-prbt-moveit-config + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_resources_prbt_moveit_config/2.12.1-1 + target_directory: ros-jazzy-moveit-resources-prbt-moveit-config/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-joint-state-publisher + - ros-jazzy-moveit-resources-prbt-ikfast-manipulator-plugin + - ros-jazzy-moveit-resources-prbt-support + - ros-jazzy-moveit-ros-move-group + - ros-jazzy-robot-state-publisher + - ros-jazzy-ros-workspace + - ros-jazzy-rviz2 + - ros-jazzy-xacro + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-resources-prbt-pg70-support/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-resources-prbt-pg70-support/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-prbt-pg70-support/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-resources-prbt-pg70-support/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-resources-prbt-pg70-support/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-prbt-pg70-support/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-resources-prbt-pg70-support/recipe.yaml b/recipes/ros-jazzy-moveit-resources-prbt-pg70-support/recipe.yaml new file mode 100644 index 00000000..2bca4a22 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-prbt-pg70-support/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-resources-prbt-pg70-support + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_resources_prbt_pg70_support/2.12.1-1 + target_directory: ros-jazzy-moveit-resources-prbt-pg70-support/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-moveit-resources-prbt-ikfast-manipulator-plugin + - ros-jazzy-moveit-resources-prbt-moveit-config + - ros-jazzy-moveit-resources-prbt-support + - ros-jazzy-ros-workspace + - ros-jazzy-xacro + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-resources-prbt-support/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-resources-prbt-support/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-prbt-support/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-resources-prbt-support/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-resources-prbt-support/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-prbt-support/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-resources-prbt-support/recipe.yaml b/recipes/ros-jazzy-moveit-resources-prbt-support/recipe.yaml new file mode 100644 index 00000000..a8cbd5a6 --- /dev/null +++ b/recipes/ros-jazzy-moveit-resources-prbt-support/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-resources-prbt-support + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_resources_prbt_support/2.12.1-1 + target_directory: ros-jazzy-moveit-resources-prbt-support/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-xacro + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-ros-benchmarks/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-ros-benchmarks/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-benchmarks/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-ros-benchmarks/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-ros-benchmarks/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-benchmarks/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-ros-benchmarks/recipe.yaml b/recipes/ros-jazzy-moveit-ros-benchmarks/recipe.yaml new file mode 100644 index 00000000..f73a1607 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-benchmarks/recipe.yaml @@ -0,0 +1,101 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-ros-benchmarks + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_ros_benchmarks/2.12.1-1 + target_directory: ros-jazzy-moveit-ros-benchmarks/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libboost-devel + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-ros-planning + - ros-jazzy-moveit-ros-warehouse + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-eigen + - ros2-distro-mutex 0.6.* jazzy_* + run: + - libboost + - python + - ros-jazzy-launch-param-builder + - ros-jazzy-moveit-common + - ros-jazzy-moveit-configs-utils + - ros-jazzy-moveit-ros-planning + - ros-jazzy-moveit-ros-warehouse + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-eigen + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-ros-move-group/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-ros-move-group/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-move-group/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-ros-move-group/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-ros-move-group/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-move-group/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-ros-move-group/recipe.yaml b/recipes/ros-jazzy-moveit-ros-move-group/recipe.yaml new file mode 100644 index 00000000..bb39b3cb --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-move-group/recipe.yaml @@ -0,0 +1,114 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-ros-move-group + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_ros_move_group/2.12.1-1 + target_directory: ros-jazzy-moveit-ros-move-group/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - fmt + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-moveit-common + - ros-jazzy-moveit-configs-utils + - ros-jazzy-moveit-core + - ros-jazzy-moveit-resources-fanuc-moveit-config + - ros-jazzy-moveit-resources-panda-moveit-config + - ros-jazzy-moveit-ros-occupancy-map-monitor + - ros-jazzy-moveit-ros-planning + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-ros-environment + - ros-jazzy-ros-testing + - ros-jazzy-ros-workspace + - ros-jazzy-std-srvs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - fmt + - python + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-kinematics + - ros-jazzy-moveit-ros-occupancy-map-monitor + - ros-jazzy-moveit-ros-planning + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-ros-workspace + - ros-jazzy-std-srvs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-ros-occupancy-map-monitor/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-ros-occupancy-map-monitor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-occupancy-map-monitor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-ros-occupancy-map-monitor/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-ros-occupancy-map-monitor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-occupancy-map-monitor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-ros-occupancy-map-monitor/patch/ros-jazzy-moveit-ros-occupancy-map-monitor.patch b/recipes/ros-jazzy-moveit-ros-occupancy-map-monitor/patch/ros-jazzy-moveit-ros-occupancy-map-monitor.patch new file mode 100644 index 00000000..d062f1b4 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-occupancy-map-monitor/patch/ros-jazzy-moveit-ros-occupancy-map-monitor.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b8dd549bc..5f9f8ef59 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,7 +15,7 @@ find_package(pluginlib REQUIRED) + find_package(Eigen3 REQUIRED) + # Enforce system version liboctomap-dev + # https://github.com/moveit/moveit2/issues/2862 +-find_package(octomap 1.9.7...<1.10.0 REQUIRED) ++find_package(octomap REQUIRED) + find_package(geometric_shapes REQUIRED) + find_package(tf2_ros REQUIRED) + diff --git a/recipes/ros-jazzy-moveit-ros-occupancy-map-monitor/recipe.yaml b/recipes/ros-jazzy-moveit-ros-occupancy-map-monitor/recipe.yaml new file mode 100644 index 00000000..2ab2f6c7 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-occupancy-map-monitor/recipe.yaml @@ -0,0 +1,105 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-ros-occupancy-map-monitor + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_ros_occupancy_map_monitor/2.12.1-1 + target_directory: ros-jazzy-moveit-ros-occupancy-map-monitor/src/work + patches: + - patch/ros-jazzy-moveit-ros-occupancy-map-monitor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-geometric-shapes + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-msgs + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - eigen + - python + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-geometric-shapes + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-msgs + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-ros-planning-interface/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-ros-planning-interface/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-planning-interface/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-ros-planning-interface/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-ros-planning-interface/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-planning-interface/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-ros-planning-interface/recipe.yaml b/recipes/ros-jazzy-moveit-ros-planning-interface/recipe.yaml new file mode 100644 index 00000000..f887de4d --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-planning-interface/recipe.yaml @@ -0,0 +1,121 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-ros-planning-interface + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_ros_planning_interface/2.12.1-1 + target_directory: ros-jazzy-moveit-ros-planning-interface/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-geometry-msgs + - ros-jazzy-moveit-common + - ros-jazzy-moveit-configs-utils + - ros-jazzy-moveit-core + - ros-jazzy-moveit-msgs + - ros-jazzy-moveit-resources-fanuc-moveit-config + - ros-jazzy-moveit-resources-panda-moveit-config + - ros-jazzy-moveit-ros-move-group + - ros-jazzy-moveit-ros-planning + - ros-jazzy-moveit-ros-warehouse + - ros-jazzy-moveit-simple-controller-manager + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclpy + - ros-jazzy-ros-environment + - ros-jazzy-ros-testing + - ros-jazzy-ros-workspace + - ros-jazzy-rviz2 + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-msgs + - ros-jazzy-moveit-ros-move-group + - ros-jazzy-moveit-ros-planning + - ros-jazzy-moveit-ros-warehouse + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-ros-planning/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-ros-planning/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-planning/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-ros-planning/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-ros-planning/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-planning/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-ros-planning/recipe.yaml b/recipes/ros-jazzy-moveit-ros-planning/recipe.yaml new file mode 100644 index 00000000..9b2e4d0d --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-planning/recipe.yaml @@ -0,0 +1,134 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-ros-planning + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_ros_planning/2.12.1-1 + target_directory: ros-jazzy-moveit-ros-planning/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - fmt + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-index-cpp + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-generate-parameter-library + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-message-filters + - ros-jazzy-moveit-common + - ros-jazzy-moveit-configs-utils + - ros-jazzy-moveit-core + - ros-jazzy-moveit-msgs + - ros-jazzy-moveit-resources-panda-moveit-config + - ros-jazzy-moveit-ros-occupancy-map-monitor + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-testing + - ros-jazzy-ros-workspace + - ros-jazzy-srdfdom + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-urdf + - ros2-distro-mutex 0.6.* jazzy_* + run: + - eigen + - fmt + - python + - ros-jazzy-ament-index-cpp + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-generate-parameter-library + - ros-jazzy-message-filters + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-msgs + - ros-jazzy-moveit-ros-occupancy-map-monitor + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-srdfdom + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-urdf + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-ros-robot-interaction/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-ros-robot-interaction/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-robot-interaction/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-ros-robot-interaction/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-ros-robot-interaction/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-robot-interaction/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-ros-robot-interaction/recipe.yaml b/recipes/ros-jazzy-moveit-ros-robot-interaction/recipe.yaml new file mode 100644 index 00000000..b8725d55 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-robot-interaction/recipe.yaml @@ -0,0 +1,103 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-ros-robot-interaction + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_ros_robot_interaction/2.12.1-1 + target_directory: ros-jazzy-moveit-ros-robot-interaction/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-interactive-markers + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-ros-planning + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-interactive-markers + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-ros-planning + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-ros-visualization/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-ros-visualization/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-visualization/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-ros-visualization/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-ros-visualization/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-visualization/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-ros-visualization/recipe.yaml b/recipes/ros-jazzy-moveit-ros-visualization/recipe.yaml new file mode 100644 index 00000000..f6a5cbd0 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-visualization/recipe.yaml @@ -0,0 +1,123 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-ros-visualization + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_ros_visualization/2.12.1-1 + target_directory: ros-jazzy-moveit-ros-visualization/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - numpy + - pip + - pkg-config + - python + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-class-loader + - ros-jazzy-geometric-shapes + - ros-jazzy-interactive-markers + - ros-jazzy-moveit-common + - ros-jazzy-moveit-ros-planning-interface + - ros-jazzy-moveit-ros-robot-interaction + - ros-jazzy-moveit-ros-warehouse + - ros-jazzy-object-recognition-msgs + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclpy + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rviz2 + - ros-jazzy-tf2-eigen + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - ros-jazzy-geometric-shapes + - ros-jazzy-interactive-markers + - ros-jazzy-moveit-common + - ros-jazzy-moveit-ros-planning-interface + - ros-jazzy-moveit-ros-robot-interaction + - ros-jazzy-moveit-ros-warehouse + - ros-jazzy-object-recognition-msgs + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-rviz2 + - ros-jazzy-tf2-eigen + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-moveit-ros-warehouse/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-ros-warehouse/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-warehouse/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-ros-warehouse/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-ros-warehouse/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-warehouse/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-ros-warehouse/recipe.yaml b/recipes/ros-jazzy-moveit-ros-warehouse/recipe.yaml new file mode 100644 index 00000000..00c2fb53 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros-warehouse/recipe.yaml @@ -0,0 +1,100 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-ros-warehouse + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_ros_warehouse/2.12.1-1 + target_directory: ros-jazzy-moveit-ros-warehouse/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - fmt + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-ros-planning + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-ros + - ros-jazzy-warehouse-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - fmt + - python + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-ros-planning + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-ros + - ros-jazzy-warehouse-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-ros/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-ros/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-ros/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-ros/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-ros/recipe.yaml b/recipes/ros-jazzy-moveit-ros/recipe.yaml new file mode 100644 index 00000000..ec281bbc --- /dev/null +++ b/recipes/ros-jazzy-moveit-ros/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-ros + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_ros/2.12.1-1 + target_directory: ros-jazzy-moveit-ros/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-moveit-ros-benchmarks + - ros-jazzy-moveit-ros-move-group + - ros-jazzy-moveit-ros-planning + - ros-jazzy-moveit-ros-planning-interface + - ros-jazzy-moveit-ros-robot-interaction + - ros-jazzy-moveit-ros-visualization + - ros-jazzy-moveit-ros-warehouse + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit-setup-app-plugins/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-setup-app-plugins/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-app-plugins/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-setup-app-plugins/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-setup-app-plugins/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-app-plugins/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-setup-app-plugins/recipe.yaml b/recipes/ros-jazzy-moveit-setup-app-plugins/recipe.yaml new file mode 100644 index 00000000..410d39a8 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-app-plugins/recipe.yaml @@ -0,0 +1,108 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-setup-app-plugins + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_setup_app_plugins/2.12.1-1 + target_directory: ros-jazzy-moveit-setup-app-plugins/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-index-cpp + - ros-jazzy-moveit-configs-utils + - ros-jazzy-moveit-ros-visualization + - ros-jazzy-moveit-setup-framework + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - ros-jazzy-ament-index-cpp + - ros-jazzy-moveit-configs-utils + - ros-jazzy-moveit-ros-visualization + - ros-jazzy-moveit-setup-framework + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-moveit-setup-assistant/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-setup-assistant/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-assistant/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-setup-assistant/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-setup-assistant/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-assistant/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-setup-assistant/patch/ros-jazzy-moveit-setup-assistant.patch b/recipes/ros-jazzy-moveit-setup-assistant/patch/ros-jazzy-moveit-setup-assistant.patch new file mode 100644 index 00000000..6b7a2d22 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-assistant/patch/ros-jazzy-moveit-setup-assistant.patch @@ -0,0 +1,35 @@ +diff --git a/src/collisions_updater.cpp b/src/collisions_updater.cpp +index d8963e1be..f99e493ac 100644 +--- a/src/collisions_updater.cpp ++++ b/src/collisions_updater.cpp +@@ -100,7 +100,7 @@ int main(int argc, char* argv[]) + auto package_settings = config_data->get("package_settings"); + try + { +- package_settings->loadExisting(config_pkg_path); ++ package_settings->loadExisting(config_pkg_path.string()); + } + catch (const std::runtime_error& e) + { +@@ -113,7 +113,7 @@ int main(int argc, char* argv[]) + RCLCPP_ERROR_STREAM(node->get_logger(), "Please provide config package or URDF and SRDF path"); + return 1; + } +- else if (rdf_loader::RDFLoader::isXacroFile(srdf_path) && output_path.empty()) ++ else if (rdf_loader::RDFLoader::isXacroFile(srdf_path.string()) && output_path.empty()) + { + RCLCPP_ERROR_STREAM(node->get_logger(), "Please provide a different output file for SRDF xacro input file"); + return 1; +diff --git a/src/setup_assistant_widget.cpp b/src/setup_assistant_widget.cpp +index 2d56b5e40..bab1ec094 100644 +--- a/src/setup_assistant_widget.cpp ++++ b/src/setup_assistant_widget.cpp +@@ -71,7 +71,7 @@ SetupAssistantWidget::SetupAssistantWidget(const rviz_common::ros_integration::R + + // Setting the window icon + auto icon_path = getSharePath("moveit_ros_visualization") / "icons/classes/MotionPlanning.png"; +- setWindowIcon(QIcon(icon_path.c_str())); ++ setWindowIcon(QIcon(icon_path.string().c_str())); + + // Basic widget container ----------------------------------------- + QHBoxLayout* layout = new QHBoxLayout(); diff --git a/recipes/ros-jazzy-moveit-setup-assistant/recipe.yaml b/recipes/ros-jazzy-moveit-setup-assistant/recipe.yaml new file mode 100644 index 00000000..bf9ef14a --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-assistant/recipe.yaml @@ -0,0 +1,115 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-setup-assistant + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_setup_assistant/2.12.1-1 + target_directory: ros-jazzy-moveit-setup-assistant/src/work + patches: + - patch/ros-jazzy-moveit-setup-assistant.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-index-cpp + - ros-jazzy-moveit-resources-panda-moveit-config + - ros-jazzy-moveit-setup-framework + - ros-jazzy-moveit-setup-srdf-plugins + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - qt-main + - ros-jazzy-ament-index-cpp + - ros-jazzy-moveit-configs-utils + - ros-jazzy-moveit-setup-app-plugins + - ros-jazzy-moveit-setup-controllers + - ros-jazzy-moveit-setup-core-plugins + - ros-jazzy-moveit-setup-framework + - ros-jazzy-moveit-setup-srdf-plugins + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-moveit-setup-controllers/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-setup-controllers/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-controllers/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-setup-controllers/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-setup-controllers/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-controllers/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-setup-controllers/recipe.yaml b/recipes/ros-jazzy-moveit-setup-controllers/recipe.yaml new file mode 100644 index 00000000..361c2923 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-controllers/recipe.yaml @@ -0,0 +1,107 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-setup-controllers + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_setup_controllers/2.12.1-1 + target_directory: ros-jazzy-moveit-setup-controllers/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-index-cpp + - ros-jazzy-moveit-configs-utils + - ros-jazzy-moveit-resources-fanuc-moveit-config + - ros-jazzy-moveit-resources-panda-moveit-config + - ros-jazzy-moveit-setup-framework + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - ros-jazzy-ament-index-cpp + - ros-jazzy-moveit-setup-framework + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-moveit-setup-core-plugins/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-setup-core-plugins/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-core-plugins/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-setup-core-plugins/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-setup-core-plugins/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-core-plugins/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-setup-core-plugins/patch/ros-jazzy-moveit-setup-core-plugins.patch b/recipes/ros-jazzy-moveit-setup-core-plugins/patch/ros-jazzy-moveit-setup-core-plugins.patch new file mode 100644 index 00000000..c742b556 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-core-plugins/patch/ros-jazzy-moveit-setup-core-plugins.patch @@ -0,0 +1,88 @@ +diff --git a/moveit_setup_assistant/moveit_setup_core_plugins/src/start_screen.cpp b/moveit_setup_assistant/moveit_setup_core_plugins/src/start_screen.cpp +index ff6827d6ff..b0550b1e90 100644 +--- a/moveit_setup_assistant/moveit_setup_core_plugins/src/start_screen.cpp ++++ b/moveit_setup_assistant/moveit_setup_core_plugins/src/start_screen.cpp +@@ -70,7 +70,7 @@ std::filesystem::path StartScreen::getPackagePath() + + void StartScreen::loadExisting(const std::filesystem::path& package_path) + { +- package_settings_->loadExisting(package_path); ++ package_settings_->loadExisting(package_path.string()); + } + + bool StartScreen::isXacroFile() +diff --git a/moveit_setup_assistant/moveit_setup_core_plugins/src/start_screen_widget.cpp b/moveit_setup_assistant/moveit_setup_core_plugins/src/start_screen_widget.cpp +index 70bae9ddc9..82da843d60 100644 +--- a/moveit_setup_assistant/moveit_setup_core_plugins/src/start_screen_widget.cpp ++++ b/moveit_setup_assistant/moveit_setup_core_plugins/src/start_screen_widget.cpp +@@ -79,7 +79,7 @@ void StartScreenWidget::onInit() + right_image_label_ = new QLabel(this); + auto image_path = getSharePath("moveit_setup_assistant") / "resources/MoveIt_Setup_Assistant2.png"; + +- if (right_image_->load(image_path.c_str())) ++ if (right_image_->load(image_path.string().c_str())) + { + right_image_label_->setPixmap(QPixmap::fromImage(*right_image_)); + right_image_label_->setMinimumHeight(384); // size of right_image_label_ +@@ -205,7 +205,7 @@ void StartScreenWidget::focusGiven() + std::filesystem::path pkg_path = setup_step_.getPackagePath(); + if (!pkg_path.empty()) + { +- stack_path_->setPath(pkg_path); ++ stack_path_->setPath(pkg_path.string()); + select_mode_->btn_exist_->click(); + return; + } +@@ -213,7 +213,7 @@ void StartScreenWidget::focusGiven() + std::filesystem::path urdf_path = setup_step_.getURDFPath(); + if (!urdf_path.empty()) + { +- urdf_file_->setPath(urdf_path); ++ urdf_file_->setPath(urdf_path.string()); + select_mode_->btn_new_->click(); + } + } +diff --git a/moveit_setup_assistant/moveit_setup_core_plugins/include/moveit_setup_core_plugins/configuration_files.hpp b/moveit_setup_assistant/moveit_setup_core_plugins/include/moveit_setup_core_plugins/configuration_files.hpp +index bfca1e8d62..3d3f3ab386 100644 +--- a/moveit_setup_assistant/moveit_setup_core_plugins/include/moveit_setup_core_plugins/configuration_files.hpp ++++ b/moveit_setup_assistant/moveit_setup_core_plugins/include/moveit_setup_core_plugins/configuration_files.hpp +@@ -80,7 +80,7 @@ class ConfigurationFiles : public SetupStep + + bool shouldGenerate(const GeneratedFilePtr& file) const + { +- std::string rel_path = file->getRelativePath(); ++ std::string rel_path = file->getRelativePath().string(); + auto it = should_generate_.find(rel_path); + if (it == should_generate_.end()) + { +diff --git a/moveit_setup_assistant/moveit_setup_core_plugins/src/configuration_files_widget.cpp b/moveit_setup_assistant/moveit_setup_core_plugins/src/configuration_files_widget.cpp +index 9c76fc1d52..3e689772e3 100644 +--- a/moveit_setup_assistant/moveit_setup_core_plugins/src/configuration_files_widget.cpp ++++ b/moveit_setup_assistant/moveit_setup_core_plugins/src/configuration_files_widget.cpp +@@ -294,7 +294,7 @@ void ConfigurationFilesWidget::changeCheckedState(QListWidgetItem* item) + } + + // Enable/disable file +- setup_step_.setShouldGenerate(gen_file->getRelativePath(), generate); ++ setup_step_.setShouldGenerate(gen_file->getRelativePath().string(), generate); + } + + // ****************************************************************************************** +@@ -303,7 +303,7 @@ void ConfigurationFilesWidget::changeCheckedState(QListWidgetItem* item) + void ConfigurationFilesWidget::focusGiven() + { + // Pass the package path from start screen to configuration files screen +- stack_path_->setPath(setup_step_.getPackagePath()); ++ stack_path_->setPath(setup_step_.getPackagePath().string()); + + setup_step_.loadFiles(); + +@@ -350,7 +350,7 @@ void ConfigurationFilesWidget::showGenFiles() + auto gen_file = gen_files[i]; + + // Create a formatted row +- QListWidgetItem* item = new QListWidgetItem(QString(gen_file->getRelativePath().c_str()), action_list_, 0); ++ QListWidgetItem* item = new QListWidgetItem(QString(gen_file->getRelativePath().string().c_str()), action_list_, 0); + + // Checkbox + item->setCheckState(setup_step_.shouldGenerate(gen_file) ? Qt::Checked : Qt::Unchecked); diff --git a/recipes/ros-jazzy-moveit-setup-core-plugins/recipe.yaml b/recipes/ros-jazzy-moveit-setup-core-plugins/recipe.yaml new file mode 100644 index 00000000..e9014682 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-core-plugins/recipe.yaml @@ -0,0 +1,111 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-setup-core-plugins + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_setup_core_plugins/2.12.1-1 + target_directory: ros-jazzy-moveit-setup-core-plugins/src/work + patches: + - patch/ros-jazzy-moveit-setup-core-plugins.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-index-cpp + - ros-jazzy-moveit-ros-visualization + - ros-jazzy-moveit-setup-framework + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-srdfdom + - ros-jazzy-urdf + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - ros-jazzy-ament-index-cpp + - ros-jazzy-moveit-ros-visualization + - ros-jazzy-moveit-setup-framework + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-srdfdom + - ros-jazzy-urdf + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-moveit-setup-framework/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-setup-framework/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-framework/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-setup-framework/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-setup-framework/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-framework/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-setup-framework/patch/ros-jazzy-moveit-setup-framework.patch b/recipes/ros-jazzy-moveit-setup-framework/patch/ros-jazzy-moveit-setup-framework.patch new file mode 100644 index 00000000..2e50fa82 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-framework/patch/ros-jazzy-moveit-setup-framework.patch @@ -0,0 +1,187 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3e3d417fb..91c15c6b2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,8 +12,7 @@ find_package(fmt REQUIRED) + find_package(moveit_core REQUIRED) + find_package(moveit_ros_planning REQUIRED) + find_package(moveit_ros_visualization REQUIRED) +-find_package(Qt5Core REQUIRED) +-find_package(Qt5Widgets REQUIRED) ++find_package(Qt5 COMPONENTS Core Widgets REQUIRED) + find_package(pluginlib REQUIRED) + find_package(rclcpp REQUIRED) + find_package(rviz_common REQUIRED) +@@ -43,6 +42,10 @@ add_library( + src/utilities.cpp + src/xml_syntax_highlighter.cpp + ${MOC_FILES}) ++ ++include(GenerateExportHeader) ++generate_export_header(${PROJECT_NAME}) ++ + target_include_directories( + moveit_setup_framework + PUBLIC $ +@@ -54,8 +57,7 @@ ament_target_dependencies( + moveit_ros_planning + moveit_ros_visualization + pluginlib +- Qt5Core +- Qt5Widgets ++ Qt5 + rclcpp + rviz_common + rviz_rendering +@@ -67,6 +69,7 @@ install(FILES moveit_setup_framework_plugins.xml + DESTINATION share/moveit_setup_framework) + + install(DIRECTORY templates DESTINATION share/moveit_setup_framework) ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_export.h DESTINATION include) + + ament_export_targets(moveit_setup_frameworkTargets HAS_LIBRARY_TARGET) + install( +diff --git a/include/moveit_setup_framework/data/srdf_config.hpp b/include/moveit_setup_framework/data/srdf_config.hpp +index 92508e025..5b7fed77d 100644 +--- a/include/moveit_setup_framework/data/srdf_config.hpp ++++ b/include/moveit_setup_framework/data/srdf_config.hpp +@@ -263,7 +263,7 @@ public: + + bool write(const std::filesystem::path& path) + { +- return srdf_.writeSRDF(path); ++ return srdf_.writeSRDF(path.string()); + } + + std::filesystem::path getPath() const +diff --git a/include/moveit_setup_framework/qt/setup_step_widget.hpp b/include/moveit_setup_framework/qt/setup_step_widget.hpp +index f32e7b5ad..c6f472682 100644 +--- a/include/moveit_setup_framework/qt/setup_step_widget.hpp ++++ b/include/moveit_setup_framework/qt/setup_step_widget.hpp +@@ -40,12 +40,14 @@ + #include + #include + ++#include ++ + namespace moveit_setup + { + /** + * @brief The GUI code for one SetupStep + */ +-class SetupStepWidget : public QWidget ++class MOVEIT_SETUP_FRAMEWORK_EXPORT SetupStepWidget : public QWidget + { + Q_OBJECT + public: +diff --git a/include/moveit_setup_framework/templates.hpp b/include/moveit_setup_framework/templates.hpp +index 1555eee16..b02d52024 100644 +--- a/include/moveit_setup_framework/templates.hpp ++++ b/include/moveit_setup_framework/templates.hpp +@@ -38,6 +38,8 @@ + #include + #include + ++#include ++ + namespace moveit_setup + { + /** +@@ -69,7 +71,7 @@ public: + + bool write() override; + +- static std::vector variables; ++ static MOVEIT_SETUP_FRAMEWORK_EXPORT std::vector variables; + }; + + } // namespace moveit_setup +diff --git a/src/srdf_config.cpp b/src/srdf_config.cpp +index d19bdbfa5..69002a3ec 100644 +--- a/src/srdf_config.cpp ++++ b/src/srdf_config.cpp +@@ -88,7 +88,7 @@ void SRDFConfig::loadSRDFFile(const std::filesystem::path& srdf_file_path, const + loadURDFModel(); + + std::string srdf_string; +- if (!rdf_loader::RDFLoader::loadXmlFileToString(srdf_string, srdf_path_, xacro_args)) ++ if (!rdf_loader::RDFLoader::loadXmlFileToString(srdf_string, srdf_path_.string(), xacro_args)) + { + throw std::runtime_error("SRDF file not found: " + srdf_path_.string()); + } +diff --git a/src/urdf_config.cpp b/src/urdf_config.cpp +index 72d9bf4af..3ca176656 100644 +--- a/src/urdf_config.cpp ++++ b/src/urdf_config.cpp +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + namespace moveit_setup + { +@@ -126,7 +127,7 @@ void URDFConfig::loadFromPackage(const std::filesystem::path& package_name, cons + throw std::runtime_error("URDF/COLLADA package not found: ''" + package_name.string()); + } + +- urdf_pkg_name_ = package_name; ++ urdf_pkg_name_ = package_name.string(); + urdf_pkg_relative_path_ = relative_path; + xacro_args_ = xacro_args; + +@@ -139,12 +140,12 @@ void URDFConfig::load() + RCLCPP_DEBUG_STREAM(*logger_, "URDF Package Name: " << urdf_pkg_name_); + RCLCPP_DEBUG_STREAM(*logger_, "URDF Package Path: " << urdf_pkg_relative_path_); + +- if (!rdf_loader::RDFLoader::loadXmlFileToString(urdf_string_, urdf_path_, xacro_args_vec_)) ++ if (!rdf_loader::RDFLoader::loadXmlFileToString(urdf_string_, urdf_path_.string(), xacro_args_vec_)) + { + throw std::runtime_error("URDF/COLLADA file not found: " + urdf_path_.string()); + } + +- if (urdf_string_.empty() && rdf_loader::RDFLoader::isXacroFile(urdf_path_)) ++ if (urdf_string_.empty() && rdf_loader::RDFLoader::isXacroFile(urdf_path_.string())) + { + throw std::runtime_error("Running xacro failed.\nPlease check console for errors."); + } +@@ -154,7 +155,7 @@ void URDFConfig::load() + { + throw std::runtime_error("URDF/COLLADA file is not a valid robot model."); + } +- urdf_from_xacro_ = rdf_loader::RDFLoader::isXacroFile(urdf_path_); ++ urdf_from_xacro_ = rdf_loader::RDFLoader::isXacroFile(urdf_path_.string()); + + // Set parameter + parent_node_->set_parameter(rclcpp::Parameter("robot_description", urdf_string_)); +@@ -164,7 +165,7 @@ void URDFConfig::load() + + bool URDFConfig::isXacroFile() const + { +- return rdf_loader::RDFLoader::isXacroFile(urdf_path_); ++ return rdf_loader::RDFLoader::isXacroFile(urdf_path_.string()); + } + + bool URDFConfig::isConfigured() const +@@ -182,7 +183,7 @@ void URDFConfig::collectVariables(std::vector& variables) + std::string urdf_location; + if (urdf_pkg_name_.empty()) + { +- urdf_location = urdf_path_; ++ urdf_location = urdf_path_.string(); + } + else + { +diff --git a/src/utilities.cpp b/src/utilities.cpp +index 3625d9459..43ade4b27 100644 +--- a/src/utilities.cpp ++++ b/src/utilities.cpp +@@ -63,7 +63,7 @@ bool extractPackageNameFromPath(const std::filesystem::path& path, std::string& + // Default package name to folder name + package_name = sub_path.filename().string(); + tinyxml2::XMLDocument package_xml_file; +- auto is_open = package_xml_file.LoadFile((sub_path / "package.xml").c_str()); ++ auto is_open = package_xml_file.LoadFile((sub_path / "package.xml").string().c_str()); + if (is_open == tinyxml2::XML_SUCCESS) + { + auto name_potential = diff --git a/recipes/ros-jazzy-moveit-setup-framework/recipe.yaml b/recipes/ros-jazzy-moveit-setup-framework/recipe.yaml new file mode 100644 index 00000000..b95af941 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-framework/recipe.yaml @@ -0,0 +1,121 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-setup-framework + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_setup_framework/2.12.1-1 + target_directory: ros-jazzy-moveit-setup-framework/src/work + patches: + - patch/ros-jazzy-moveit-setup-framework.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - fmt + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-index-cpp + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-ros-planning + - ros-jazzy-moveit-ros-visualization + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rviz-common + - ros-jazzy-rviz-rendering + - ros-jazzy-srdfdom + - ros-jazzy-urdf + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - fmt + - python + - ros-jazzy-ament-index-cpp + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-ros-planning + - ros-jazzy-moveit-ros-visualization + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-rviz-common + - ros-jazzy-rviz-rendering + - ros-jazzy-srdfdom + - ros-jazzy-urdf + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-moveit-setup-srdf-plugins/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-setup-srdf-plugins/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-srdf-plugins/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-setup-srdf-plugins/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-setup-srdf-plugins/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-srdf-plugins/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-setup-srdf-plugins/recipe.yaml b/recipes/ros-jazzy-moveit-setup-srdf-plugins/recipe.yaml new file mode 100644 index 00000000..d3841b1b --- /dev/null +++ b/recipes/ros-jazzy-moveit-setup-srdf-plugins/recipe.yaml @@ -0,0 +1,101 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-setup-srdf-plugins + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_setup_srdf_plugins/2.12.1-1 + target_directory: ros-jazzy-moveit-setup-srdf-plugins/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-moveit-resources-fanuc-description + - ros-jazzy-moveit-setup-framework + - ros-jazzy-pluginlib + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - ros-jazzy-moveit-setup-framework + - ros-jazzy-pluginlib + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-moveit-simple-controller-manager/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit-simple-controller-manager/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit-simple-controller-manager/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit-simple-controller-manager/build_ament_cmake.sh b/recipes/ros-jazzy-moveit-simple-controller-manager/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit-simple-controller-manager/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit-simple-controller-manager/recipe.yaml b/recipes/ros-jazzy-moveit-simple-controller-manager/recipe.yaml new file mode 100644 index 00000000..83266342 --- /dev/null +++ b/recipes/ros-jazzy-moveit-simple-controller-manager/recipe.yaml @@ -0,0 +1,96 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit-simple-controller-manager + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit_simple_controller_manager/2.12.1-1 + target_directory: ros-jazzy-moveit-simple-controller-manager/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-control-msgs + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-control-msgs + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-moveit/bld_ament_cmake.bat b/recipes/ros-jazzy-moveit/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-moveit/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-moveit/build_ament_cmake.sh b/recipes/ros-jazzy-moveit/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-moveit/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-moveit/recipe.yaml b/recipes/ros-jazzy-moveit/recipe.yaml new file mode 100644 index 00000000..cc45e8c6 --- /dev/null +++ b/recipes/ros-jazzy-moveit/recipe.yaml @@ -0,0 +1,100 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-moveit + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/moveit/2.12.1-1 + target_directory: ros-jazzy-moveit/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - ros-jazzy-moveit-core + - ros-jazzy-moveit-planners + - ros-jazzy-moveit-plugins + - ros-jazzy-moveit-ros + - ros-jazzy-moveit-setup-assistant + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-nav-2d-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-nav-2d-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav-2d-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav-2d-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-nav-2d-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav-2d-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav-2d-msgs/recipe.yaml b/recipes/ros-jazzy-nav-2d-msgs/recipe.yaml new file mode 100644 index 00000000..2a850055 --- /dev/null +++ b/recipes/ros-jazzy-nav-2d-msgs/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav-2d-msgs + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav_2d_msgs/1.3.4-1 + target_directory: ros-jazzy-nav-2d-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav-2d-utils/bld_ament_cmake.bat b/recipes/ros-jazzy-nav-2d-utils/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav-2d-utils/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav-2d-utils/build_ament_cmake.sh b/recipes/ros-jazzy-nav-2d-utils/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav-2d-utils/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav-2d-utils/recipe.yaml b/recipes/ros-jazzy-nav-2d-utils/recipe.yaml new file mode 100644 index 00000000..be725913 --- /dev/null +++ b/recipes/ros-jazzy-nav-2d-utils/recipe.yaml @@ -0,0 +1,104 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav-2d-utils + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav_2d_utils/1.3.4-1 + target_directory: ros-jazzy-nav-2d-utils/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-2d-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-2d-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-nav-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-nav-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav-msgs/recipe.yaml b/recipes/ros-jazzy-nav-msgs/recipe.yaml new file mode 100644 index 00000000..03f154cf --- /dev/null +++ b/recipes/ros-jazzy-nav-msgs/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav-msgs + version: 5.3.5 +source: + git: https://github.com/ros2-gbp/common_interfaces-release.git + tag: release/jazzy/nav_msgs/5.3.5-1 + target_directory: ros-jazzy-nav-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-amcl/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-amcl/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-amcl/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-amcl/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-amcl/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-amcl/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-amcl/recipe.yaml b/recipes/ros-jazzy-nav2-amcl/recipe.yaml new file mode 100644 index 00000000..c592b985 --- /dev/null +++ b/recipes/ros-jazzy-nav2-amcl/recipe.yaml @@ -0,0 +1,115 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-amcl + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_amcl/1.3.4-1 + target_directory: ros-jazzy-nav2-amcl/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-message-filters + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-srvs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-message-filters + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-srvs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-behavior-tree/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-behavior-tree/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-behavior-tree/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-behavior-tree/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-behavior-tree/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-behavior-tree/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-behavior-tree/recipe.yaml b/recipes/ros-jazzy-nav2-behavior-tree/recipe.yaml new file mode 100644 index 00000000..f98162d5 --- /dev/null +++ b/recipes/ros-jazzy-nav2-behavior-tree/recipe.yaml @@ -0,0 +1,121 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-behavior-tree + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_behavior_tree/1.3.4-1 + target_directory: ros-jazzy-nav2-behavior-tree/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-behaviortree-cpp + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-lifecycle-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-test-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-behaviortree-cpp + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-lifecycle-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-behaviors/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-behaviors/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-behaviors/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-behaviors/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-behaviors/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-behaviors/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-behaviors/recipe.yaml b/recipes/ros-jazzy-nav2-behaviors/recipe.yaml new file mode 100644 index 00000000..9eeb7dd6 --- /dev/null +++ b/recipes/ros-jazzy-nav2-behaviors/recipe.yaml @@ -0,0 +1,112 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-behaviors + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_behaviors/1.3.4-1 + target_directory: ros-jazzy-nav2-behaviors/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-behavior-tree + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-behavior-tree + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-bt-navigator/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-bt-navigator/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-bt-navigator/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-bt-navigator/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-bt-navigator/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-bt-navigator/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-bt-navigator/recipe.yaml b/recipes/ros-jazzy-nav2-bt-navigator/recipe.yaml new file mode 100644 index 00000000..719d8688 --- /dev/null +++ b/recipes/ros-jazzy-nav2-bt-navigator/recipe.yaml @@ -0,0 +1,114 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-bt-navigator + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_bt_navigator/1.3.4-1 + target_directory: ros-jazzy-nav2-bt-navigator/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-behaviortree-cpp + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-behavior-tree + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-behaviortree-cpp + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-behavior-tree + - ros-jazzy-nav2-core + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-collision-monitor/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-collision-monitor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-collision-monitor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-collision-monitor/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-collision-monitor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-collision-monitor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-collision-monitor/recipe.yaml b/recipes/ros-jazzy-nav2-collision-monitor/recipe.yaml new file mode 100644 index 00000000..c1a839e5 --- /dev/null +++ b/recipes/ros-jazzy-nav2-collision-monitor/recipe.yaml @@ -0,0 +1,113 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-collision-monitor + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_collision_monitor/1.3.4-1 + target_directory: ros-jazzy-nav2-collision-monitor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-common/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-common/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-common/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-common/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-common/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-common/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-common/patch/ros-jazzy-nav2-common.patch b/recipes/ros-jazzy-nav2-common/patch/ros-jazzy-nav2-common.patch new file mode 100644 index 00000000..f22d44e4 --- /dev/null +++ b/recipes/ros-jazzy-nav2-common/patch/ros-jazzy-nav2-common.patch @@ -0,0 +1,13 @@ +diff --git a/nav2_common/cmake/nav2_package.cmake b/nav2_common/cmake/nav2_package.cmake +index 3f4977193c..01ca1c3ed2 100644 +--- a/nav2_common/cmake/nav2_package.cmake ++++ b/nav2_common/cmake/nav2_package.cmake +@@ -37,7 +37,7 @@ macro(nav2_package) + endif() + + if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") +- add_compile_options(-Wall -Wextra -Wpedantic -Werror -Wdeprecated -fPIC -Wshadow -Wnull-dereference) ++ add_compile_options(-Wall -Wextra -Wpedantic -Wdeprecated -fPIC -Wshadow -Wnull-dereference) + add_compile_options("$<$:-Wnon-virtual-dtor>") + endif() + diff --git a/recipes/ros-jazzy-nav2-common/recipe.yaml b/recipes/ros-jazzy-nav2-common/recipe.yaml new file mode 100644 index 00000000..7e824506 --- /dev/null +++ b/recipes/ros-jazzy-nav2-common/recipe.yaml @@ -0,0 +1,98 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-common + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_common/1.3.4-1 + target_directory: ros-jazzy-nav2-common/src/work + patches: + - patch/ros-jazzy-nav2-common.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - pyyaml + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-python + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-osrf-pycommon + - ros-jazzy-rclpy + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - pyyaml + - ros-jazzy-ament-cmake-core + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-osrf-pycommon + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-constrained-smoother/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-constrained-smoother/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-constrained-smoother/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-constrained-smoother/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-constrained-smoother/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-constrained-smoother/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-constrained-smoother/recipe.yaml b/recipes/ros-jazzy-nav2-constrained-smoother/recipe.yaml new file mode 100644 index 00000000..5a31fd22 --- /dev/null +++ b/recipes/ros-jazzy-nav2-constrained-smoother/recipe.yaml @@ -0,0 +1,107 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-constrained-smoother + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_constrained_smoother/1.3.4-1 + target_directory: ros-jazzy-nav2-constrained-smoother/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - ${{ 'openblas' if win }} + - if: build_platform == target_platform + then: + - pkg-config + - ceres-solver + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-angles + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - ceres-solver + - python + - ros-jazzy-angles + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-controller/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-controller/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-controller/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-controller/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-controller/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-controller/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-controller/recipe.yaml b/recipes/ros-jazzy-nav2-controller/recipe.yaml new file mode 100644 index 00000000..8f53b598 --- /dev/null +++ b/recipes/ros-jazzy-nav2-controller/recipe.yaml @@ -0,0 +1,111 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-controller + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_controller/1.3.4-1 + target_directory: ros-jazzy-nav2-controller/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-angles + - ros-jazzy-nav-2d-msgs + - ros-jazzy-nav-2d-utils + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-angles + - ros-jazzy-nav-2d-msgs + - ros-jazzy-nav-2d-utils + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-core/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-core/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-core/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-core/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-core/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-core/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-core/recipe.yaml b/recipes/ros-jazzy-nav2-core/recipe.yaml new file mode 100644 index 00000000..aa3c856e --- /dev/null +++ b/recipes/ros-jazzy-nav2-core/recipe.yaml @@ -0,0 +1,111 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-core + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_core/1.3.4-1 + target_directory: ros-jazzy-nav2-core/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-launch + - ros-jazzy-launch-testing + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-behavior-tree + - ros-jazzy-nav2-common + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-behavior-tree + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-costmap-2d/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-costmap-2d/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-costmap-2d/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-costmap-2d/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-costmap-2d/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-costmap-2d/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-costmap-2d/patch/ros-jazzy-nav2-costmap-2d.patch b/recipes/ros-jazzy-nav2-costmap-2d/patch/ros-jazzy-nav2-costmap-2d.patch new file mode 100644 index 00000000..974334df --- /dev/null +++ b/recipes/ros-jazzy-nav2-costmap-2d/patch/ros-jazzy-nav2-costmap-2d.patch @@ -0,0 +1,56 @@ +diff --git a/include/nav2_costmap_2d/plugin_container_layer.hpp b/include/nav2_costmap_2d/plugin_container_layer.hpp +index e98c7b813..fb1d23e2e 100644 +--- a/include/nav2_costmap_2d/plugin_container_layer.hpp ++++ b/include/nav2_costmap_2d/plugin_container_layer.hpp +@@ -46,7 +46,7 @@ public: + /** + * @brief Initialization process of layer on startup + */ +- virtual void onInitialize(); ++ virtual void onInitialize() override; + /** + * @brief Update the bounds of the master costmap by this layer's update + *dimensions +@@ -65,7 +65,7 @@ public: + double * min_x, + double * min_y, + double * max_x, +- double * max_y); ++ double * max_y) override; + /** + * @brief Update the costs in the master costmap in the window + * @param master_grid The master costmap grid to update +@@ -79,26 +79,26 @@ public: + int min_i, + int min_j, + int max_i, +- int max_j); +- virtual void onFootprintChanged(); ++ int max_j) override; ++ virtual void onFootprintChanged() override; + /** @brief Update the footprint to match size of the parent costmap. */ +- virtual void matchSize(); ++ virtual void matchSize() override; + /** + * @brief Deactivate the layer + */ +- virtual void deactivate(); ++ virtual void deactivate() override; + /** + * @brief Activate the layer + */ +- virtual void activate(); ++ virtual void activate() override; + /** + * @brief Reset this costmap + */ +- virtual void reset(); ++ virtual void reset() override; + /** + * @brief If clearing operations should be processed on this layer or not + */ +- virtual bool isClearable(); ++ virtual bool isClearable() override; + /** + * @brief Clear an area in the constituent costmaps with the given dimension + * if invert, then clear everything except these dimensions diff --git a/recipes/ros-jazzy-nav2-costmap-2d/recipe.yaml b/recipes/ros-jazzy-nav2-costmap-2d/recipe.yaml new file mode 100644 index 00000000..41536be8 --- /dev/null +++ b/recipes/ros-jazzy-nav2-costmap-2d/recipe.yaml @@ -0,0 +1,134 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-costmap-2d + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_costmap_2d/1.3.4-1 + target_directory: ros-jazzy-nav2-costmap-2d/src/work + patches: + - patch/ros-jazzy-nav2-costmap-2d.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-angles + - ros-jazzy-geometry-msgs + - ros-jazzy-laser-geometry + - ros-jazzy-launch + - ros-jazzy-launch-testing + - ros-jazzy-map-msgs + - ros-jazzy-message-filters + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-lifecycle-manager + - ros-jazzy-nav2-map-server + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-nav2-voxel-grid + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-tf2-sensor-msgs + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-angles + - ros-jazzy-geometry-msgs + - ros-jazzy-laser-geometry + - ros-jazzy-map-msgs + - ros-jazzy-message-filters + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-nav2-voxel-grid + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-tf2-sensor-msgs + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-dwb-controller/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-dwb-controller/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-dwb-controller/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-dwb-controller/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-dwb-controller/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-dwb-controller/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-dwb-controller/recipe.yaml b/recipes/ros-jazzy-nav2-dwb-controller/recipe.yaml new file mode 100644 index 00000000..155b92b7 --- /dev/null +++ b/recipes/ros-jazzy-nav2-dwb-controller/recipe.yaml @@ -0,0 +1,98 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-dwb-controller + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_dwb_controller/1.3.4-1 + target_directory: ros-jazzy-nav2-dwb-controller/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-costmap-queue + - ros-jazzy-dwb-core + - ros-jazzy-dwb-critics + - ros-jazzy-dwb-msgs + - ros-jazzy-dwb-plugins + - ros-jazzy-nav-2d-msgs + - ros-jazzy-nav-2d-utils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-costmap-queue + - ros-jazzy-dwb-core + - ros-jazzy-dwb-critics + - ros-jazzy-dwb-msgs + - ros-jazzy-dwb-plugins + - ros-jazzy-nav-2d-msgs + - ros-jazzy-nav-2d-utils + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-graceful-controller/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-graceful-controller/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-graceful-controller/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-graceful-controller/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-graceful-controller/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-graceful-controller/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-graceful-controller/recipe.yaml b/recipes/ros-jazzy-nav2-graceful-controller/recipe.yaml new file mode 100644 index 00000000..49500a5b --- /dev/null +++ b/recipes/ros-jazzy-nav2-graceful-controller/recipe.yaml @@ -0,0 +1,112 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-graceful-controller + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_graceful_controller/1.3.4-1 + target_directory: ros-jazzy-nav2-graceful-controller/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-angles + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-2d-utils + - ros-jazzy-nav2-common + - ros-jazzy-nav2-controller + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-angles + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-2d-utils + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-lifecycle-manager/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-lifecycle-manager/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-lifecycle-manager/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-lifecycle-manager/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-lifecycle-manager/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-lifecycle-manager/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-lifecycle-manager/recipe.yaml b/recipes/ros-jazzy-nav2-lifecycle-manager/recipe.yaml new file mode 100644 index 00000000..3cd85ec1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-lifecycle-manager/recipe.yaml @@ -0,0 +1,111 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-lifecycle-manager + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_lifecycle_manager/1.3.4-1 + target_directory: ros-jazzy-nav2-lifecycle-manager/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-bondcpp + - ros-jazzy-diagnostic-updater + - ros-jazzy-geometry-msgs + - ros-jazzy-lifecycle-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-tf2-geometry-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-bondcpp + - ros-jazzy-diagnostic-updater + - ros-jazzy-geometry-msgs + - ros-jazzy-lifecycle-msgs + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-tf2-geometry-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-map-server/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-map-server/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-map-server/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-map-server/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-map-server/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-map-server/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-map-server/recipe.yaml b/recipes/ros-jazzy-nav2-map-server/recipe.yaml new file mode 100644 index 00000000..fbd56f2d --- /dev/null +++ b/recipes/ros-jazzy-nav2-map-server/recipe.yaml @@ -0,0 +1,112 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-map-server + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_map_server/1.3.4-1 + target_directory: ros-jazzy-nav2-map-server/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - graphicsmagick + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + run: + - graphicsmagick + - python + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-mppi-controller/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-mppi-controller/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-mppi-controller/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-mppi-controller/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-mppi-controller/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-mppi-controller/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-mppi-controller/patch/ros-jazzy-nav2-mppi-controller.patch b/recipes/ros-jazzy-nav2-mppi-controller/patch/ros-jazzy-nav2-mppi-controller.patch new file mode 100644 index 00000000..b9228c74 --- /dev/null +++ b/recipes/ros-jazzy-nav2-mppi-controller/patch/ros-jazzy-nav2-mppi-controller.patch @@ -0,0 +1,37 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 95eabf6c4..567c3e5fb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -52,7 +52,7 @@ if(COMPILER_SUPPORTS_AVX512) + add_compile_options(-mno-avx512f) + endif() + +-if(COMPILER_SUPPORTS_SSE4) ++if(COMPILER_SUPPORTS_SSE4 AND NOT APPLE) + add_compile_options(-msse4.2) + endif() + +@@ -65,7 +65,11 @@ if(COMPILER_SUPPORTS_FMA) + endif() + + # If building one the same hardware to be deployed on, try `-march=native`! +-add_compile_options(-O3 -finline-limit=10000000 -ffp-contract=fast -ffast-math -mtune=generic) ++if(APPLE) ++ add_compile_options(-O3 -ffp-contract=fast -ffast-math -mtune=generic) ++else() ++ add_compile_options(-O3 -finline-limit=10000000 -ffp-contract=fast -ffast-math -mtune=generic) ++endif() + + add_library(mppi_controller SHARED + src/controller.cpp +@@ -94,7 +98,9 @@ add_library(mppi_critics SHARED + set(libraries mppi_controller mppi_critics) + + foreach(lib IN LISTS libraries) +- target_compile_options(${lib} PUBLIC -fconcepts) ++ if(NOT APPLE) ++ target_compile_options(${lib} PUBLIC -fconcepts) ++ endif() + target_include_directories(${lib} PUBLIC ${xsimd_INCLUDE_DIRS}) # ${OpenMP_INCLUDE_DIRS} + target_link_libraries(${lib} xtensor xtensor::optimize xtensor::use_xsimd) + ament_target_dependencies(${lib} ${dependencies_pkgs}) diff --git a/recipes/ros-jazzy-nav2-mppi-controller/recipe.yaml b/recipes/ros-jazzy-nav2-mppi-controller/recipe.yaml new file mode 100644 index 00000000..0706b25a --- /dev/null +++ b/recipes/ros-jazzy-nav2-mppi-controller/recipe.yaml @@ -0,0 +1,127 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-mppi-controller + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_mppi_controller/1.3.4-1 + target_directory: ros-jazzy-nav2-mppi-controller/src/work + patches: + - patch/ros-jazzy-nav2-mppi-controller.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - ${{ 'clang <19' if osx }} + host: + - benchmark + - if: build_platform == target_platform + then: + - pkg-config + - llvm-openmp + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - xsimd + - xtensor ==0.24.7 + run: + - benchmark + - llvm-openmp + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - xsimd + - xtensor + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-msgs/recipe.yaml b/recipes/ros-jazzy-nav2-msgs/recipe.yaml new file mode 100644 index 00000000..0b5c75ae --- /dev/null +++ b/recipes/ros-jazzy-nav2-msgs/recipe.yaml @@ -0,0 +1,101 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-msgs + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_msgs/1.3.4-1 + target_directory: ros-jazzy-nav2-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-action-msgs + - ros-jazzy-ament-cmake + - ros-jazzy-builtin-interfaces + - ros-jazzy-geographic-msgs + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-action-msgs + - ros-jazzy-builtin-interfaces + - ros-jazzy-geographic-msgs + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-navfn-planner/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-navfn-planner/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-navfn-planner/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-navfn-planner/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-navfn-planner/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-navfn-planner/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-navfn-planner/recipe.yaml b/recipes/ros-jazzy-nav2-navfn-planner/recipe.yaml new file mode 100644 index 00000000..904fac4a --- /dev/null +++ b/recipes/ros-jazzy-nav2-navfn-planner/recipe.yaml @@ -0,0 +1,115 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-navfn-planner + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_navfn_planner/1.3.4-1 + target_directory: ros-jazzy-nav2-navfn-planner/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-ros + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-ros + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-planner/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-planner/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-planner/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-planner/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-planner/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-planner/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-planner/recipe.yaml b/recipes/ros-jazzy-nav2-planner/recipe.yaml new file mode 100644 index 00000000..b34ef01e --- /dev/null +++ b/recipes/ros-jazzy-nav2-planner/recipe.yaml @@ -0,0 +1,114 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-planner + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_planner/1.3.4-1 + target_directory: ros-jazzy-nav2-planner/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-ros + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-ros + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-regulated-pure-pursuit-controller/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-regulated-pure-pursuit-controller/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-regulated-pure-pursuit-controller/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-regulated-pure-pursuit-controller/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-regulated-pure-pursuit-controller/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-regulated-pure-pursuit-controller/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-regulated-pure-pursuit-controller/recipe.yaml b/recipes/ros-jazzy-nav2-regulated-pure-pursuit-controller/recipe.yaml new file mode 100644 index 00000000..af0160e3 --- /dev/null +++ b/recipes/ros-jazzy-nav2-regulated-pure-pursuit-controller/recipe.yaml @@ -0,0 +1,109 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-regulated-pure-pursuit-controller + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_regulated_pure_pursuit_controller/1.3.4-1 + target_directory: ros-jazzy-nav2-regulated-pure-pursuit-controller/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-angles + - ros-jazzy-geometry-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-angles + - ros-jazzy-geometry-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-rotation-shim-controller/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-rotation-shim-controller/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-rotation-shim-controller/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-rotation-shim-controller/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-rotation-shim-controller/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-rotation-shim-controller/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-rotation-shim-controller/recipe.yaml b/recipes/ros-jazzy-nav2-rotation-shim-controller/recipe.yaml new file mode 100644 index 00000000..62868d57 --- /dev/null +++ b/recipes/ros-jazzy-nav2-rotation-shim-controller/recipe.yaml @@ -0,0 +1,109 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-rotation-shim-controller + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_rotation_shim_controller/1.3.4-1 + target_directory: ros-jazzy-nav2-rotation-shim-controller/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-angles + - ros-jazzy-geometry-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-controller + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-regulated-pure-pursuit-controller + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-angles + - ros-jazzy-geometry-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-rviz-plugins/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-rviz-plugins/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-rviz-plugins/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-rviz-plugins/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-rviz-plugins/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-rviz-plugins/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-rviz-plugins/patch/ros-jazzy-nav2-rviz-plugins.patch b/recipes/ros-jazzy-nav2-rviz-plugins/patch/ros-jazzy-nav2-rviz-plugins.patch new file mode 100644 index 00000000..177fb6af --- /dev/null +++ b/recipes/ros-jazzy-nav2-rviz-plugins/patch/ros-jazzy-nav2-rviz-plugins.patch @@ -0,0 +1,43 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c5f5c788a..dbb0f0d3b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,7 +7,7 @@ if(NOT CMAKE_CXX_STANDARD) + endif() + + if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") +- add_compile_options(-Wall -Wextra -Wpedantic -Werror) ++ add_compile_options(-Wall -Wextra -Wpedantic) + endif() + + # Qt5 boilerplate options from http://doc.qt.io/qt-5/cmake-manual.html +diff --git a/src/costmap_cost_tool.cpp b/src/costmap_cost_tool.cpp +index f25a71cd8..93d234043 100644 +--- a/src/costmap_cost_tool.cpp ++++ b/src/costmap_cost_tool.cpp +@@ -50,6 +50,10 @@ void CostmapCostTool::onInitialize() + node_->create_client("/global_costmap/get_cost_global_costmap"); + } + ++void CostmapCostTool::updateAutoDeactivate() { ++ // TODO: Add implementation ++} ++ + void CostmapCostTool::activate() {} + void CostmapCostTool::deactivate() {} + +diff --git a/src/docking_panel.cpp b/src/docking_panel.cpp +index 62304a825..291a570f9 100644 +--- a/src/docking_panel.cpp ++++ b/src/docking_panel.cpp +@@ -311,6 +311,10 @@ void DockingPanel::save(rviz_common::Config config) const + Panel::save(config); + } + ++void DockingPanel::onStartup() { ++ // TODO: Add implementation ++} ++ + void DockingPanel::onDockingButtonPressed() + { + auto is_action_server_ready = diff --git a/recipes/ros-jazzy-nav2-rviz-plugins/recipe.yaml b/recipes/ros-jazzy-nav2-rviz-plugins/recipe.yaml new file mode 100644 index 00000000..3da9dec0 --- /dev/null +++ b/recipes/ros-jazzy-nav2-rviz-plugins/recipe.yaml @@ -0,0 +1,137 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-rviz-plugins + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_rviz_plugins/1.3.4-1 + target_directory: ros-jazzy-nav2-rviz-plugins/src/work + patches: + - patch/ros-jazzy-nav2-rviz-plugins.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-lifecycle-manager + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-resource-retriever + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rviz-common + - ros-jazzy-rviz-default-plugins + - ros-jazzy-rviz-ogre-vendor + - ros-jazzy-rviz-rendering + - ros-jazzy-std-msgs + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-urdf + - ros-jazzy-visualization-msgs + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - qt-main + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-lifecycle-manager + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-resource-retriever + - ros-jazzy-ros-workspace + - ros-jazzy-rviz-common + - ros-jazzy-rviz-default-plugins + - ros-jazzy-rviz-ogre-vendor + - ros-jazzy-rviz-rendering + - ros-jazzy-std-msgs + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-urdf + - ros-jazzy-visualization-msgs + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-nav2-simple-commander/bld_ament_python.bat b/recipes/ros-jazzy-nav2-simple-commander/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-nav2-simple-commander/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-simple-commander/build_ament_python.sh b/recipes/ros-jazzy-nav2-simple-commander/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-nav2-simple-commander/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-nav2-simple-commander/recipe.yaml b/recipes/ros-jazzy-nav2-simple-commander/recipe.yaml new file mode 100644 index 00000000..b6efc8a3 --- /dev/null +++ b/recipes/ros-jazzy-nav2-simple-commander/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-simple-commander + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_simple_commander/1.3.4-1 + target_directory: ros-jazzy-nav2-simple-commander/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-action-msgs + - ros-jazzy-geometry-msgs + - ros-jazzy-lifecycle-msgs + - ros-jazzy-nav2-msgs + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-smac-planner/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-smac-planner/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-smac-planner/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-smac-planner/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-smac-planner/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-smac-planner/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-smac-planner/recipe.yaml b/recipes/ros-jazzy-nav2-smac-planner/recipe.yaml new file mode 100644 index 00000000..35684802 --- /dev/null +++ b/recipes/ros-jazzy-nav2-smac-planner/recipe.yaml @@ -0,0 +1,130 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-smac-planner + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_smac_planner/1.3.4-1 + target_directory: ros-jazzy-nav2-smac-planner/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - ${{ 'llvm-openmp' if osx }} + host: + - ${{ 'llvm-openmp' if osx }} + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - libode + - nlohmann_json + - numpy + - ompl + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-angles + - ros-jazzy-builtin-interfaces + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-ompl + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-ros + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - eigen + - nlohmann_json + - python + - ros-jazzy-angles + - ros-jazzy-builtin-interfaces + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-ompl + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-ros + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-smoother/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-smoother/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-smoother/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-smoother/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-smoother/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-smoother/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-smoother/recipe.yaml b/recipes/ros-jazzy-nav2-smoother/recipe.yaml new file mode 100644 index 00000000..4645119f --- /dev/null +++ b/recipes/ros-jazzy-nav2-smoother/recipe.yaml @@ -0,0 +1,111 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-smoother + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_smoother/1.3.4-1 + target_directory: ros-jazzy-nav2-smoother/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-angles + - ros-jazzy-nav-2d-msgs + - ros-jazzy-nav-2d-utils + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-angles + - ros-jazzy-nav-2d-msgs + - ros-jazzy-nav-2d-utils + - ros-jazzy-nav2-core + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-theta-star-planner/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-theta-star-planner/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-theta-star-planner/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-theta-star-planner/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-theta-star-planner/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-theta-star-planner/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-theta-star-planner/recipe.yaml b/recipes/ros-jazzy-nav2-theta-star-planner/recipe.yaml new file mode 100644 index 00000000..48c103ac --- /dev/null +++ b/recipes/ros-jazzy-nav2-theta-star-planner/recipe.yaml @@ -0,0 +1,109 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-theta-star-planner + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_theta_star_planner/1.3.4-1 + target_directory: ros-jazzy-nav2-theta-star-planner/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-util/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-util/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-util/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-util/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-util/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-util/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-util/patch/ros-jazzy-nav2-util.patch b/recipes/ros-jazzy-nav2-util/patch/ros-jazzy-nav2-util.patch new file mode 100644 index 00000000..f6a7129f --- /dev/null +++ b/recipes/ros-jazzy-nav2-util/patch/ros-jazzy-nav2-util.patch @@ -0,0 +1,22 @@ +diff --git a/src/node_utils.cpp b/src/node_utils.cpp +index 993eaf53b..83ab5ebaa 100644 +--- a/src/node_utils.cpp ++++ b/src/node_utils.cpp +@@ -92,6 +92,9 @@ rclcpp::Node::SharedPtr generate_internal_node(const std::string & prefix) + + void setSoftRealTimePriority() + { ++#if defined(__APPLE__) ++ throw std::runtime_error("Cannot set as real-time thread on macOS!"); ++#else + sched_param sch; + sch.sched_priority = 49; + if (sched_setscheduler(0, SCHED_FIFO, &sch) == -1) { +@@ -101,6 +104,7 @@ void setSoftRealTimePriority() + "realtime prioritization! Error: "); + throw std::runtime_error(errmsg + std::strerror(errno)); + } ++#endif + } + + } // namespace nav2_util diff --git a/recipes/ros-jazzy-nav2-util/recipe.yaml b/recipes/ros-jazzy-nav2-util/recipe.yaml new file mode 100644 index 00000000..94add3ac --- /dev/null +++ b/recipes/ros-jazzy-nav2-util/recipe.yaml @@ -0,0 +1,127 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-util + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_util/1.3.4-1 + target_directory: ros-jazzy-nav2-util/src/work + patches: + - patch/ros-jazzy-nav2-util.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libboost-devel + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-bond + - ros-jazzy-bondcpp + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-lifecycle-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-msgs + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-test-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-bond + - ros-jazzy-bondcpp + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-lifecycle-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-msgs + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-velocity-smoother/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-velocity-smoother/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-velocity-smoother/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-velocity-smoother/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-velocity-smoother/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-velocity-smoother/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-velocity-smoother/recipe.yaml b/recipes/ros-jazzy-nav2-velocity-smoother/recipe.yaml new file mode 100644 index 00000000..8f602d36 --- /dev/null +++ b/recipes/ros-jazzy-nav2-velocity-smoother/recipe.yaml @@ -0,0 +1,96 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-velocity-smoother + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_velocity_smoother/1.3.4-1 + target_directory: ros-jazzy-nav2-velocity-smoother/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-util + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-nav2-util + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-voxel-grid/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-voxel-grid/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-voxel-grid/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-voxel-grid/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-voxel-grid/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-voxel-grid/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-voxel-grid/recipe.yaml b/recipes/ros-jazzy-nav2-voxel-grid/recipe.yaml new file mode 100644 index 00000000..c5e978a5 --- /dev/null +++ b/recipes/ros-jazzy-nav2-voxel-grid/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-voxel-grid + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_voxel_grid/1.3.4-1 + target_directory: ros-jazzy-nav2-voxel-grid/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-nav2-common + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nav2-waypoint-follower/bld_ament_cmake.bat b/recipes/ros-jazzy-nav2-waypoint-follower/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nav2-waypoint-follower/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nav2-waypoint-follower/build_ament_cmake.sh b/recipes/ros-jazzy-nav2-waypoint-follower/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nav2-waypoint-follower/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nav2-waypoint-follower/recipe.yaml b/recipes/ros-jazzy-nav2-waypoint-follower/recipe.yaml new file mode 100644 index 00000000..9b1a562f --- /dev/null +++ b/recipes/ros-jazzy-nav2-waypoint-follower/recipe.yaml @@ -0,0 +1,116 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nav2-waypoint-follower + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/nav2_waypoint_follower/1.3.4-1 + target_directory: ros-jazzy-nav2-waypoint-follower/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-cv-bridge + - ros-jazzy-geographic-msgs + - ros-jazzy-image-transport + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-robot-localization + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-cv-bridge + - ros-jazzy-geographic-msgs + - ros-jazzy-image-transport + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-common + - ros-jazzy-nav2-core + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-robot-localization + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-navigation2/bld_ament_cmake.bat b/recipes/ros-jazzy-navigation2/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-navigation2/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-navigation2/build_ament_cmake.sh b/recipes/ros-jazzy-navigation2/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-navigation2/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-navigation2/recipe.yaml b/recipes/ros-jazzy-navigation2/recipe.yaml new file mode 100644 index 00000000..34a01e82 --- /dev/null +++ b/recipes/ros-jazzy-navigation2/recipe.yaml @@ -0,0 +1,115 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-navigation2 + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/navigation2/1.3.4-1 + target_directory: ros-jazzy-navigation2/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-nav2-amcl + - ros-jazzy-nav2-behavior-tree + - ros-jazzy-nav2-behaviors + - ros-jazzy-nav2-bt-navigator + - ros-jazzy-nav2-collision-monitor + - ros-jazzy-nav2-constrained-smoother + - ros-jazzy-nav2-controller + - ros-jazzy-nav2-core + - ros-jazzy-nav2-costmap-2d + - ros-jazzy-nav2-dwb-controller + - ros-jazzy-nav2-graceful-controller + - ros-jazzy-nav2-lifecycle-manager + - ros-jazzy-nav2-map-server + - ros-jazzy-nav2-mppi-controller + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-navfn-planner + - ros-jazzy-nav2-planner + - ros-jazzy-nav2-regulated-pure-pursuit-controller + - ros-jazzy-nav2-rotation-shim-controller + - ros-jazzy-nav2-rviz-plugins + - ros-jazzy-nav2-simple-commander + - ros-jazzy-nav2-smac-planner + - ros-jazzy-nav2-smoother + - ros-jazzy-nav2-theta-star-planner + - ros-jazzy-nav2-util + - ros-jazzy-nav2-velocity-smoother + - ros-jazzy-nav2-voxel-grid + - ros-jazzy-nav2-waypoint-follower + - ros-jazzy-opennav-docking + - ros-jazzy-opennav-docking-bt + - ros-jazzy-opennav-docking-core + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-nmea-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-nmea-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-nmea-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-nmea-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-nmea-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-nmea-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-nmea-msgs/recipe.yaml b/recipes/ros-jazzy-nmea-msgs/recipe.yaml new file mode 100644 index 00000000..d5e48458 --- /dev/null +++ b/recipes/ros-jazzy-nmea-msgs/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-nmea-msgs + version: 2.1.0 +source: + git: https://github.com/ros2-gbp/nmea_msgs-release.git + tag: release/jazzy/nmea_msgs/2.1.0-3 + target_directory: ros-jazzy-nmea-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-object-recognition-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-object-recognition-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-object-recognition-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-object-recognition-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-object-recognition-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-object-recognition-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-object-recognition-msgs/recipe.yaml b/recipes/ros-jazzy-object-recognition-msgs/recipe.yaml new file mode 100644 index 00000000..82c9f12f --- /dev/null +++ b/recipes/ros-jazzy-object-recognition-msgs/recipe.yaml @@ -0,0 +1,96 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-object-recognition-msgs + version: 2.0.0 +source: + git: https://github.com/ros2-gbp/object_recognition_msgs-release.git + tag: release/jazzy/object_recognition_msgs/2.0.0-5 + target_directory: ros-jazzy-object-recognition-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-action-msgs + - ros-jazzy-ament-cmake + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-sensor-msgs + - ros-jazzy-shape-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-action-msgs + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-sensor-msgs + - ros-jazzy-shape-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-octomap-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-octomap-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-octomap-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-octomap-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-octomap-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-octomap-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-octomap-msgs/recipe.yaml b/recipes/ros-jazzy-octomap-msgs/recipe.yaml new file mode 100644 index 00000000..f2fa8697 --- /dev/null +++ b/recipes/ros-jazzy-octomap-msgs/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-octomap-msgs + version: 2.0.1 +source: + git: https://github.com/ros2-gbp/octomap_msgs-release.git + tag: release/jazzy/octomap_msgs/2.0.1-1 + target_directory: ros-jazzy-octomap-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ompl/bld_catkin.bat b/recipes/ros-jazzy-ompl/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-ompl/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-ompl/build_catkin.sh b/recipes/ros-jazzy-ompl/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-ompl/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-ompl/patch/ros-jazzy-ompl.patch b/recipes/ros-jazzy-ompl/patch/ros-jazzy-ompl.patch new file mode 100644 index 00000000..daad9108 --- /dev/null +++ b/recipes/ros-jazzy-ompl/patch/ros-jazzy-ompl.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 09fc750..2e4ff16 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -178,7 +178,7 @@ find_program(R_EXEC R) + + add_subdirectory(src) + add_subdirectory(py-bindings) +-add_subdirectory(tests) ++# add_subdirectory(tests) + add_subdirectory(demos) + add_subdirectory(scripts) + add_subdirectory(doc) diff --git a/recipes/ros-jazzy-ompl/recipe.yaml b/recipes/ros-jazzy-ompl/recipe.yaml new file mode 100644 index 00000000..09d0bd5f --- /dev/null +++ b/recipes/ros-jazzy-ompl/recipe.yaml @@ -0,0 +1,96 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ompl + version: 1.6.0 +source: + git: https://github.com/ros2-gbp/ompl-release.git + tag: release/jazzy/ompl/1.6.0-1 + target_directory: ros-jazzy-ompl/src/work + patches: + - patch/ros-jazzy-ompl.patch + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - cmake + - eigen + - flann + - libboost-devel + - libboost-python-devel + - numpy + - ompl + - pip + - pkg-config + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - eigen + - flann + - libboost-devel + - libboost-python-devel + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-opennav-docking-bt/bld_ament_cmake.bat b/recipes/ros-jazzy-opennav-docking-bt/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-opennav-docking-bt/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-opennav-docking-bt/build_ament_cmake.sh b/recipes/ros-jazzy-opennav-docking-bt/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-opennav-docking-bt/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-opennav-docking-bt/recipe.yaml b/recipes/ros-jazzy-opennav-docking-bt/recipe.yaml new file mode 100644 index 00000000..d2c3e062 --- /dev/null +++ b/recipes/ros-jazzy-opennav-docking-bt/recipe.yaml @@ -0,0 +1,104 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-opennav-docking-bt + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/opennav_docking_bt/1.3.4-1 + target_directory: ros-jazzy-opennav-docking-bt/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-behaviortree-cpp + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-behavior-tree + - ros-jazzy-nav2-core + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-behaviortree-cpp + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-behavior-tree + - ros-jazzy-nav2-core + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-opennav-docking-core/bld_ament_cmake.bat b/recipes/ros-jazzy-opennav-docking-core/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-opennav-docking-core/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-opennav-docking-core/build_ament_cmake.sh b/recipes/ros-jazzy-opennav-docking-core/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-opennav-docking-core/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-opennav-docking-core/recipe.yaml b/recipes/ros-jazzy-opennav-docking-core/recipe.yaml new file mode 100644 index 00000000..f4059e8b --- /dev/null +++ b/recipes/ros-jazzy-opennav-docking-core/recipe.yaml @@ -0,0 +1,96 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-opennav-docking-core + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/opennav_docking_core/1.3.4-1 + target_directory: ros-jazzy-opennav-docking-core/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-opennav-docking/bld_ament_cmake.bat b/recipes/ros-jazzy-opennav-docking/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-opennav-docking/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-opennav-docking/build_ament_cmake.sh b/recipes/ros-jazzy-opennav-docking/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-opennav-docking/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-opennav-docking/recipe.yaml b/recipes/ros-jazzy-opennav-docking/recipe.yaml new file mode 100644 index 00000000..6339df37 --- /dev/null +++ b/recipes/ros-jazzy-opennav-docking/recipe.yaml @@ -0,0 +1,118 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-opennav-docking + version: 1.3.4 +source: + git: https://github.com/SteveMacenski/navigation2-release.git + tag: release/jazzy/opennav_docking/1.3.4-1 + target_directory: ros-jazzy-opennav-docking/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-angles + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-graceful-controller + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-opennav-docking-core + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-angles + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nav2-graceful-controller + - ros-jazzy-nav2-msgs + - ros-jazzy-nav2-util + - ros-jazzy-opennav-docking-core + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-orocos-kdl-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-orocos-kdl-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-orocos-kdl-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-orocos-kdl-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-orocos-kdl-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-orocos-kdl-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-orocos-kdl-vendor/recipe.yaml b/recipes/ros-jazzy-orocos-kdl-vendor/recipe.yaml new file mode 100644 index 00000000..1dcefa2d --- /dev/null +++ b/recipes/ros-jazzy-orocos-kdl-vendor/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-orocos-kdl-vendor + version: 0.5.1 +source: + git: https://github.com/ros2-gbp/orocos_kdl_vendor-release.git + tag: release/jazzy/orocos_kdl_vendor/0.5.1-2 + target_directory: ros-jazzy-orocos-kdl-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - numpy + - orocos-kdl + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - eigen + - orocos-kdl + - python + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-osqp-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-osqp-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-osqp-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-osqp-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-osqp-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-osqp-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-osqp-vendor/recipe.yaml b/recipes/ros-jazzy-osqp-vendor/recipe.yaml new file mode 100644 index 00000000..8201926c --- /dev/null +++ b/recipes/ros-jazzy-osqp-vendor/recipe.yaml @@ -0,0 +1,86 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-osqp-vendor + version: 0.2.0 +source: + git: https://github.com/ros2-gbp/osqp_vendor-release.git + tag: release/jazzy/osqp_vendor/0.2.0-4 + target_directory: ros-jazzy-osqp-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-osrf-pycommon/bld_ament_python.bat b/recipes/ros-jazzy-osrf-pycommon/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-osrf-pycommon/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-osrf-pycommon/build_ament_python.sh b/recipes/ros-jazzy-osrf-pycommon/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-osrf-pycommon/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-osrf-pycommon/recipe.yaml b/recipes/ros-jazzy-osrf-pycommon/recipe.yaml new file mode 100644 index 00000000..e59fbafa --- /dev/null +++ b/recipes/ros-jazzy-osrf-pycommon/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-osrf-pycommon + version: 2.1.5 +source: + git: https://github.com/ros2-gbp/osrf_pycommon-release.git + tag: release/jazzy/osrf_pycommon/2.1.5-1 + target_directory: ros-jazzy-osrf-pycommon/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - importlib-metadata + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-osrf-testing-tools-cpp/bld_catkin.bat b/recipes/ros-jazzy-osrf-testing-tools-cpp/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-osrf-testing-tools-cpp/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-osrf-testing-tools-cpp/build_catkin.sh b/recipes/ros-jazzy-osrf-testing-tools-cpp/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-osrf-testing-tools-cpp/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-osrf-testing-tools-cpp/recipe.yaml b/recipes/ros-jazzy-osrf-testing-tools-cpp/recipe.yaml new file mode 100644 index 00000000..0cdb9444 --- /dev/null +++ b/recipes/ros-jazzy-osrf-testing-tools-cpp/recipe.yaml @@ -0,0 +1,83 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-osrf-testing-tools-cpp + version: 2.0.0 +source: + git: https://github.com/ros2-gbp/osrf_testing_tools_cpp-release.git + tag: release/jazzy/osrf_testing_tools_cpp/2.0.0-3 + target_directory: ros-jazzy-osrf-testing-tools-cpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-parameter-traits/bld_ament_cmake.bat b/recipes/ros-jazzy-parameter-traits/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-parameter-traits/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-parameter-traits/build_ament_cmake.sh b/recipes/ros-jazzy-parameter-traits/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-parameter-traits/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-parameter-traits/recipe.yaml b/recipes/ros-jazzy-parameter-traits/recipe.yaml new file mode 100644 index 00000000..fc0180ce --- /dev/null +++ b/recipes/ros-jazzy-parameter-traits/recipe.yaml @@ -0,0 +1,97 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-parameter-traits + version: 0.3.9 +source: + git: https://github.com/ros2-gbp/generate_parameter_library-release.git + tag: release/jazzy/parameter_traits/0.3.9-1 + target_directory: ros-jazzy-parameter-traits/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - fmt + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rsl + - ros-jazzy-tcb-span + - ros-jazzy-tl-expected + - ros2-distro-mutex 0.6.* jazzy_* + run: + - fmt + - python + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-rsl + - ros-jazzy-tcb-span + - ros-jazzy-tl-expected + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-pcl-conversions/bld_ament_cmake.bat b/recipes/ros-jazzy-pcl-conversions/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-pcl-conversions/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-pcl-conversions/build_ament_cmake.sh b/recipes/ros-jazzy-pcl-conversions/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-pcl-conversions/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-pcl-conversions/recipe.yaml b/recipes/ros-jazzy-pcl-conversions/recipe.yaml new file mode 100644 index 00000000..8d3b3ad7 --- /dev/null +++ b/recipes/ros-jazzy-pcl-conversions/recipe.yaml @@ -0,0 +1,114 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-pcl-conversions + version: 2.6.2 +source: + git: https://github.com/ros2-gbp/perception_pcl-release.git + tag: release/jazzy/pcl_conversions/2.6.2-1 + target_directory: ros-jazzy-pcl-conversions/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - libboost-devel + - numpy + - pcl + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-message-filters + - ros-jazzy-pcl-msgs + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - vtk-base + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - eigen + - libboost-devel + - pcl + - python + - ros-jazzy-message-filters + - ros-jazzy-pcl-msgs + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - vtk-base + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-pcl-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-pcl-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-pcl-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-pcl-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-pcl-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-pcl-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-pcl-msgs/recipe.yaml b/recipes/ros-jazzy-pcl-msgs/recipe.yaml new file mode 100644 index 00000000..34ba4236 --- /dev/null +++ b/recipes/ros-jazzy-pcl-msgs/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-pcl-msgs + version: 1.0.0 +source: + git: https://github.com/ros2-gbp/pcl_msgs-release.git + tag: release/jazzy/pcl_msgs/1.0.0-9 + target_directory: ros-jazzy-pcl-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-pcl-ros/bld_ament_cmake.bat b/recipes/ros-jazzy-pcl-ros/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-pcl-ros/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-pcl-ros/build_ament_cmake.sh b/recipes/ros-jazzy-pcl-ros/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-pcl-ros/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-pcl-ros/recipe.yaml b/recipes/ros-jazzy-pcl-ros/recipe.yaml new file mode 100644 index 00000000..01882392 --- /dev/null +++ b/recipes/ros-jazzy-pcl-ros/recipe.yaml @@ -0,0 +1,129 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-pcl-ros + version: 2.6.2 +source: + git: https://github.com/ros2-gbp/perception_pcl-release.git + tag: release/jazzy/pcl_ros/2.6.2-1 + target_directory: ros-jazzy-pcl-ros/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - libboost-devel + - numpy + - pcl + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ros + - ros-jazzy-pcl-conversions + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - vtk-base + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - eigen + - libboost-devel + - pcl + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-pcl-conversions + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - vtk-base + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-pendulum-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-pendulum-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-pendulum-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-pendulum-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-pendulum-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-pendulum-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-pendulum-msgs/recipe.yaml b/recipes/ros-jazzy-pendulum-msgs/recipe.yaml new file mode 100644 index 00000000..21ccf08e --- /dev/null +++ b/recipes/ros-jazzy-pendulum-msgs/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-pendulum-msgs + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/pendulum_msgs/0.33.5-1 + target_directory: ros-jazzy-pendulum-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-perception-pcl/bld_ament_cmake.bat b/recipes/ros-jazzy-perception-pcl/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-perception-pcl/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-perception-pcl/build_ament_cmake.sh b/recipes/ros-jazzy-perception-pcl/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-perception-pcl/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-perception-pcl/recipe.yaml b/recipes/ros-jazzy-perception-pcl/recipe.yaml new file mode 100644 index 00000000..4e66df45 --- /dev/null +++ b/recipes/ros-jazzy-perception-pcl/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-perception-pcl + version: 2.6.2 +source: + git: https://github.com/ros2-gbp/perception_pcl-release.git + tag: release/jazzy/perception_pcl/2.6.2-1 + target_directory: ros-jazzy-perception-pcl/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-pcl-conversions + - ros-jazzy-pcl-msgs + - ros-jazzy-pcl-ros + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-perception/bld_ament_cmake.bat b/recipes/ros-jazzy-perception/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-perception/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-perception/build_ament_cmake.sh b/recipes/ros-jazzy-perception/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-perception/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-perception/recipe.yaml b/recipes/ros-jazzy-perception/recipe.yaml new file mode 100644 index 00000000..470293b7 --- /dev/null +++ b/recipes/ros-jazzy-perception/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-perception + version: 0.11.0 +source: + git: https://github.com/ros2-gbp/variants-release.git + tag: release/jazzy/perception/0.11.0-1 + target_directory: ros-jazzy-perception/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-image-common + - ros-jazzy-image-pipeline + - ros-jazzy-image-transport-plugins + - ros-jazzy-laser-filters + - ros-jazzy-laser-geometry + - ros-jazzy-perception-pcl + - ros-jazzy-ros-base + - ros-jazzy-ros-workspace + - ros-jazzy-vision-opencv + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-performance-test-fixture/bld_ament_cmake.bat b/recipes/ros-jazzy-performance-test-fixture/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-performance-test-fixture/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-performance-test-fixture/build_ament_cmake.sh b/recipes/ros-jazzy-performance-test-fixture/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-performance-test-fixture/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-performance-test-fixture/recipe.yaml b/recipes/ros-jazzy-performance-test-fixture/recipe.yaml new file mode 100644 index 00000000..0ba1a6cf --- /dev/null +++ b/recipes/ros-jazzy-performance-test-fixture/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-performance-test-fixture + version: 0.2.1 +source: + git: https://github.com/ros2-gbp/performance_test_fixture-release.git + tag: release/jazzy/performance_test_fixture/0.2.1-2 + target_directory: ros-jazzy-performance-test-fixture/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-export-dependencies + - ros-jazzy-ament-cmake-export-targets + - ros-jazzy-ament-cmake-google-benchmark + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-google-benchmark-vendor + - ros-jazzy-osrf-testing-tools-cpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-google-benchmark + - ros-jazzy-google-benchmark-vendor + - ros-jazzy-osrf-testing-tools-cpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-pilz-industrial-motion-planner-testutils/bld_ament_cmake.bat b/recipes/ros-jazzy-pilz-industrial-motion-planner-testutils/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-pilz-industrial-motion-planner-testutils/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-pilz-industrial-motion-planner-testutils/build_ament_cmake.sh b/recipes/ros-jazzy-pilz-industrial-motion-planner-testutils/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-pilz-industrial-motion-planner-testutils/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-pilz-industrial-motion-planner-testutils/recipe.yaml b/recipes/ros-jazzy-pilz-industrial-motion-planner-testutils/recipe.yaml new file mode 100644 index 00000000..79a96c80 --- /dev/null +++ b/recipes/ros-jazzy-pilz-industrial-motion-planner-testutils/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-pilz-industrial-motion-planner-testutils + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/pilz_industrial_motion_planner_testutils/2.12.1-1 + target_directory: ros-jazzy-pilz-industrial-motion-planner-testutils/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-msgs + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-eigen + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-msgs + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-pilz-industrial-motion-planner/bld_ament_cmake.bat b/recipes/ros-jazzy-pilz-industrial-motion-planner/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-pilz-industrial-motion-planner/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-pilz-industrial-motion-planner/build_ament_cmake.sh b/recipes/ros-jazzy-pilz-industrial-motion-planner/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-pilz-industrial-motion-planner/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-pilz-industrial-motion-planner/patch/ros-jazzy-pilz-industrial-motion-planner.patch b/recipes/ros-jazzy-pilz-industrial-motion-planner/patch/ros-jazzy-pilz-industrial-motion-planner.patch new file mode 100644 index 00000000..83fe60b2 --- /dev/null +++ b/recipes/ros-jazzy-pilz-industrial-motion-planner/patch/ros-jazzy-pilz-industrial-motion-planner.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e8420aec3..b1257cde3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -64,7 +64,7 @@ generate_parameter_library( + ) + + add_library(planning_context_loader_base SHARED src/planning_context_loader.cpp) +-target_link_libraries(planning_context_loader_base cartesian_limits_parameters) ++target_link_libraries(planning_context_loader_base cartesian_limits_parameters joint_limits_common) + ament_target_dependencies(planning_context_loader_base + ${THIS_PACKAGE_INCLUDE_DEPENDS}) + +@@ -79,7 +79,7 @@ add_library( + trajectory_generation_common SHARED + src/trajectory_functions.cpp src/trajectory_generator.cpp + src/trajectory_blender_transition_window.cpp) +-target_link_libraries(trajectory_generation_common cartesian_limits_parameters) ++target_link_libraries(trajectory_generation_common cartesian_limits_parameters joint_limits_common) + ament_target_dependencies(trajectory_generation_common + ${THIS_PACKAGE_INCLUDE_DEPENDS}) + diff --git a/recipes/ros-jazzy-pilz-industrial-motion-planner/recipe.yaml b/recipes/ros-jazzy-pilz-industrial-motion-planner/recipe.yaml new file mode 100644 index 00000000..c4dab6f7 --- /dev/null +++ b/recipes/ros-jazzy-pilz-industrial-motion-planner/recipe.yaml @@ -0,0 +1,132 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-pilz-industrial-motion-planner + version: 2.12.1 +source: + git: https://github.com/ros2-gbp/moveit2-release.git + tag: release/jazzy/pilz_industrial_motion_planner/2.12.1-1 + target_directory: ros-jazzy-pilz-industrial-motion-planner/src/work + patches: + - patch/ros-jazzy-pilz-industrial-motion-planner.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libboost-devel + - libboost-python-devel + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-generate-parameter-library + - ros-jazzy-geometry-msgs + - ros-jazzy-launch-param-builder + - ros-jazzy-moveit-common + - ros-jazzy-moveit-configs-utils + - ros-jazzy-moveit-core + - ros-jazzy-moveit-msgs + - ros-jazzy-moveit-resources-panda-moveit-config + - ros-jazzy-moveit-resources-prbt-moveit-config + - ros-jazzy-moveit-resources-prbt-pg70-support + - ros-jazzy-moveit-resources-prbt-support + - ros-jazzy-moveit-ros-move-group + - ros-jazzy-moveit-ros-planning + - ros-jazzy-orocos-kdl-vendor + - ros-jazzy-pilz-industrial-motion-planner-testutils + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-testing + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-eigen-kdl + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-kdl + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-generate-parameter-library + - ros-jazzy-geometry-msgs + - ros-jazzy-moveit-common + - ros-jazzy-moveit-core + - ros-jazzy-moveit-msgs + - ros-jazzy-moveit-ros-move-group + - ros-jazzy-moveit-ros-planning + - ros-jazzy-orocos-kdl-vendor + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-eigen-kdl + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-kdl + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-plotjuggler-ros/bld_ament_cmake.bat b/recipes/ros-jazzy-plotjuggler-ros/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-plotjuggler-ros/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-plotjuggler-ros/build_ament_cmake.sh b/recipes/ros-jazzy-plotjuggler-ros/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-plotjuggler-ros/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-plotjuggler-ros/recipe.yaml b/recipes/ros-jazzy-plotjuggler-ros/recipe.yaml new file mode 100644 index 00000000..113815cb --- /dev/null +++ b/recipes/ros-jazzy-plotjuggler-ros/recipe.yaml @@ -0,0 +1,116 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-plotjuggler-ros + version: 2.1.2 +source: + git: https://github.com/ros2-gbp/plotjuggler-ros-plugins-release.git + tag: release/jazzy/plotjuggler_ros/2.1.2-2 + target_directory: ros-jazzy-plotjuggler-ros/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libboost-devel + - libboost-python-devel + - numpy + - pip + - python + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-plotjuggler + - ros-jazzy-rclcpp + - ros-jazzy-rcpputils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2 + - ros-jazzy-rosbag2-transport + - ros-jazzy-tf2-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - libboost-devel + - libboost-python-devel + - python + - qt-main + - ros-jazzy-plotjuggler + - ros-jazzy-rclcpp + - ros-jazzy-rcpputils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2 + - ros-jazzy-rosbag2-transport + - ros-jazzy-tf2-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-plotjuggler/bld_ament_cmake.bat b/recipes/ros-jazzy-plotjuggler/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-plotjuggler/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-plotjuggler/build_ament_cmake.sh b/recipes/ros-jazzy-plotjuggler/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-plotjuggler/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-plotjuggler/patch/ros-jazzy-plotjuggler.patch b/recipes/ros-jazzy-plotjuggler/patch/ros-jazzy-plotjuggler.patch new file mode 100644 index 00000000..9a0da52d --- /dev/null +++ b/recipes/ros-jazzy-plotjuggler/patch/ros-jazzy-plotjuggler.patch @@ -0,0 +1,626 @@ +diff --git a/cmake/FindXCB.cmake b/cmake/FindXCB.cmake +new file mode 100644 +index 00000000..a2e2757a +--- /dev/null ++++ b/cmake/FindXCB.cmake +@@ -0,0 +1,51 @@ ++# - FindXCB ++# ++# Copyright 2015 Valve Coporation ++ ++find_package(PkgConfig) ++ ++if(NOT XCB_FIND_COMPONENTS) ++ set(XCB_FIND_COMPONENTS xcb) ++endif() ++ ++include(FindPackageHandleStandardArgs) ++set(XCB_FOUND true) ++set(XCB_INCLUDE_DIRS "") ++set(XCB_LIBRARIES "") ++foreach(comp ${XCB_FIND_COMPONENTS}) ++ # component name ++ string(TOUPPER ${comp} compname) ++ string(REPLACE "-" "_" compname ${compname}) ++ # header name ++ string(REPLACE "xcb-" "" headername xcb/${comp}.h) ++ # library name ++ set(libname ${comp}) ++ ++ pkg_check_modules(PC_${comp} QUIET ${comp}) ++ ++ find_path(${compname}_INCLUDE_DIR NAMES ${headername} ++ HINTS ++ ${PC_${comp}_INCLUDEDIR} ++ ${PC_${comp}_INCLUDE_DIRS} ++ ) ++ ++ find_library(${compname}_LIBRARY NAMES ${libname} ++ HINTS ++ ${PC_${comp}_LIBDIR} ++ ${PC_${comp}_LIBRARY_DIRS} ++ ) ++ ++ find_package_handle_standard_args(${comp} ++ FOUND_VAR ${comp}_FOUND ++ REQUIRED_VARS ${compname}_INCLUDE_DIR ${compname}_LIBRARY) ++ mark_as_advanced(${compname}_INCLUDE_DIR ${compname}_LIBRARY) ++ ++ list(APPEND XCB_INCLUDE_DIRS ${${compname}_INCLUDE_DIR}) ++ list(APPEND XCB_LIBRARIES ${${compname}_LIBRARY}) ++ ++ if(NOT ${comp}_FOUND) ++ set(XCB_FOUND false) ++ endif() ++endforeach() ++ ++list(REMOVE_DUPLICATES XCB_INCLUDE_DIRS) +diff --git a/3rdparty/nlohmann/json.hpp b/3rdparty/nlohmann/json.hpp +index cb27e058..cecdb1fd 100644 +--- a/3rdparty/nlohmann/json.hpp ++++ b/3rdparty/nlohmann/json.hpp +@@ -3198,6 +3198,7 @@ template struct identity_tag {}; + #include // false_type, is_constructible, is_integral, is_same, true_type + #include // declval + #include // tuple ++#include // char_traits + + // #include + +@@ -3261,6 +3262,7 @@ struct iterator_traits::value>> + + + // #include ++// #include + + + namespace nlohmann +@@ -3272,6 +3274,7 @@ NLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin); + + + // #include ++// #include + + + namespace nlohmann +@@ -3482,6 +3485,63 @@ struct has_to_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> + }; + + ++///////////////// ++// char_traits // ++///////////////// ++ ++// Primary template of char_traits calls std char_traits ++template ++struct char_traits : std::char_traits ++{}; ++ ++// Explicitly define char traits for unsigned char since it is not standard ++template<> ++struct char_traits : std::char_traits ++{ ++ using char_type = unsigned char; ++ using int_type = uint64_t; ++ ++ // Redefine to_int_type function ++ static int_type to_int_type(char_type c) noexcept ++ { ++ return static_cast(c); ++ } ++ ++ static char_type to_char_type(int_type i) noexcept ++ { ++ return static_cast(i); ++ } ++ ++ static constexpr int_type eof() noexcept ++ { ++ return static_cast(EOF); ++ } ++}; ++ ++// Explicitly define char traits for signed char since it is not standard ++template<> ++struct char_traits : std::char_traits ++{ ++ using char_type = signed char; ++ using int_type = uint64_t; ++ ++ // Redefine to_int_type function ++ static int_type to_int_type(char_type c) noexcept ++ { ++ return static_cast(c); ++ } ++ ++ static char_type to_char_type(int_type i) noexcept ++ { ++ return static_cast(i); ++ } ++ ++ static constexpr int_type eof() noexcept ++ { ++ return static_cast(EOF); ++ } ++}; ++ + /////////////////// + // is_ functions // + /////////////////// +@@ -5342,16 +5402,16 @@ class iterator_input_adapter + : current(std::move(first)), end(std::move(last)) + {} + +- typename std::char_traits::int_type get_character() ++ typename char_traits::int_type get_character() + { + if (JSON_HEDLEY_LIKELY(current != end)) + { +- auto result = std::char_traits::to_int_type(*current); ++ auto result = char_traits::to_int_type(*current); + std::advance(current, 1); + return result; + } + +- return std::char_traits::eof(); ++ return char_traits::eof(); + } + + private: +@@ -6517,7 +6577,7 @@ class lexer : public lexer_base + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using char_type = typename InputAdapterType::char_type; +- using char_int_type = typename std::char_traits::int_type; ++ using char_int_type = typename char_traits::int_type; + + public: + using token_type = typename lexer_base::token_type; +@@ -6667,7 +6727,7 @@ class lexer : public lexer_base + switch (get()) + { + // end of file while parsing string +- case std::char_traits::eof(): ++ case char_traits::eof(): + { + error_message = "invalid string: missing closing quote"; + return token_type::parse_error; +@@ -7256,7 +7316,7 @@ class lexer : public lexer_base + { + case '\n': + case '\r': +- case std::char_traits::eof(): ++ case char_traits::eof(): + case '\0': + return true; + +@@ -7273,7 +7333,7 @@ class lexer : public lexer_base + { + switch (get()) + { +- case std::char_traits::eof(): ++ case char_traits::eof(): + case '\0': + { + error_message = "invalid comment; missing closing '*/'"; +@@ -7702,10 +7762,10 @@ scan_number_done: + token_type scan_literal(const char_type* literal_text, const std::size_t length, + token_type return_type) + { +- JSON_ASSERT(std::char_traits::to_char_type(current) == literal_text[0]); ++ JSON_ASSERT(char_traits::to_char_type(current) == literal_text[0]); + for (std::size_t i = 1; i < length; ++i) + { +- if (JSON_HEDLEY_UNLIKELY(std::char_traits::to_char_type(get()) != literal_text[i])) ++ if (JSON_HEDLEY_UNLIKELY(char_traits::to_char_type(get()) != literal_text[i])) + { + error_message = "invalid literal"; + return token_type::parse_error; +@@ -7723,7 +7783,7 @@ scan_number_done: + { + token_buffer.clear(); + token_string.clear(); +- token_string.push_back(std::char_traits::to_char_type(current)); ++ token_string.push_back(char_traits::to_char_type(current)); + } + + /* +@@ -7731,7 +7791,7 @@ scan_number_done: + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a +- `std::char_traits::eof()` in that case. Stores the scanned characters ++ `char_traits::eof()` in that case. Stores the scanned characters + for use in error messages. + + @return character read from the input +@@ -7751,9 +7811,9 @@ scan_number_done: + current = ia.get_character(); + } + +- if (JSON_HEDLEY_LIKELY(current != std::char_traits::eof())) ++ if (JSON_HEDLEY_LIKELY(current != char_traits::eof())) + { +- token_string.push_back(std::char_traits::to_char_type(current)); ++ token_string.push_back(char_traits::to_char_type(current)); + } + + if (current == '\n') +@@ -7792,7 +7852,7 @@ scan_number_done: + --position.chars_read_current_line; + } + +- if (JSON_HEDLEY_LIKELY(current != std::char_traits::eof())) ++ if (JSON_HEDLEY_LIKELY(current != char_traits::eof())) + { + JSON_ASSERT(!token_string.empty()); + token_string.pop_back(); +@@ -7986,7 +8046,7 @@ scan_number_done: + // end of input (the null byte is needed when parsing from + // string literals) + case '\0': +- case std::char_traits::eof(): ++ case char_traits::eof(): + return token_type::end_of_input; + + // error +@@ -8004,7 +8064,7 @@ scan_number_done: + const bool ignore_comments = false; + + /// the current character +- char_int_type current = std::char_traits::eof(); ++ char_int_type current = char_traits::eof(); + + /// whether the next get() call should just return current + bool next_unget = false; +@@ -8235,7 +8295,7 @@ class binary_reader + using binary_t = typename BasicJsonType::binary_t; + using json_sax_t = SAX; + using char_type = typename InputAdapterType::char_type; +- using char_int_type = typename std::char_traits::int_type; ++ using char_int_type = typename char_traits::int_type; + + public: + /*! +@@ -8307,7 +8367,7 @@ class binary_reader + get(); + } + +- if (JSON_HEDLEY_UNLIKELY(current != std::char_traits::eof())) ++ if (JSON_HEDLEY_UNLIKELY(current != char_traits::eof())) + { + return sax->parse_error(chars_read, get_token_string(), + parse_error::create(110, chars_read, exception_message(format, "expected end of input; last byte: 0x" + get_token_string(), "value"), BasicJsonType())); +@@ -8389,7 +8449,7 @@ class binary_reader + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::bson, "string length must be at least 1, is " + std::to_string(len), "string"), BasicJsonType())); + } + +- return get_string(input_format_t::bson, len - static_cast(1), result) && get() != std::char_traits::eof(); ++ return get_string(input_format_t::bson, len - static_cast(1), result) && get() != char_traits::eof(); + } + + /*! +@@ -8580,7 +8640,7 @@ class binary_reader + switch (get_char ? get() : current) + { + // EOF +- case std::char_traits::eof(): ++ case char_traits::eof(): + return unexpect_eof(input_format_t::cbor, "value"); + + // Integer 0x00..0x17 (0..23) +@@ -9350,7 +9410,7 @@ class binary_reader + switch (get()) + { + // EOF +- case std::char_traits::eof(): ++ case char_traits::eof(): + return unexpect_eof(input_format_t::msgpack, "value"); + + // positive fixint +@@ -10172,7 +10232,7 @@ class binary_reader + { + switch (prefix) + { +- case std::char_traits::eof(): // EOF ++ case char_traits::eof(): // EOF + return unexpect_eof(input_format_t::ubjson, "value"); + + case 'T': // true +@@ -10478,7 +10538,7 @@ class binary_reader + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a -'ve valued +- `std::char_traits::eof()` in that case. ++ `char_traits::eof()` in that case. + + @return character read from the input + */ +@@ -10618,7 +10678,7 @@ class binary_reader + JSON_HEDLEY_NON_NULL(3) + bool unexpect_eof(const input_format_t format, const char* context) const + { +- if (JSON_HEDLEY_UNLIKELY(current == std::char_traits::eof())) ++ if (JSON_HEDLEY_UNLIKELY(current == char_traits::eof())) + { + return sax->parse_error(chars_read, "", + parse_error::create(110, chars_read, exception_message(format, "unexpected end of input", context), BasicJsonType())); +@@ -10679,7 +10739,7 @@ class binary_reader + InputAdapterType ia; + + /// the current character +- char_int_type current = std::char_traits::eof(); ++ char_int_type current = char_traits::eof(); + + /// the number of characters read + std::size_t chars_read = 0; +@@ -16102,8 +16162,8 @@ class serializer + error_handler_t error_handler_ = error_handler_t::strict) + : o(std::move(s)) + , loc(std::localeconv()) +- , thousands_sep(loc->thousands_sep == nullptr ? '\0' : std::char_traits::to_char_type(* (loc->thousands_sep))) +- , decimal_point(loc->decimal_point == nullptr ? '\0' : std::char_traits::to_char_type(* (loc->decimal_point))) ++ , thousands_sep(loc->thousands_sep == nullptr ? '\0' : char_traits::to_char_type(* (loc->thousands_sep))) ++ , decimal_point(loc->decimal_point == nullptr ? '\0' : char_traits::to_char_type(* (loc->decimal_point))) + , indent_char(ichar) + , indent_string(512, indent_char) + , error_handler(error_handler_) +diff --git a/plotjuggler_plugins/ParserProtobuf/error_collectors.cpp b/plotjuggler_plugins/ParserProtobuf/error_collectors.cpp +index 761e0b73..b7ce4129 100644 +--- a/plotjuggler_plugins/ParserProtobuf/error_collectors.cpp ++++ b/plotjuggler_plugins/ParserProtobuf/error_collectors.cpp +@@ -2,38 +2,38 @@ + #include + #include + +-void FileErrorCollector::AddError(const std::string& filename, int line, int, +- const std::string& message) ++void FileErrorCollector::RecordError(const absl::string_view filename, int line, int, ++ const absl::string_view message) + { + auto msg = QString("File: [%1] Line: [%2] Message: %3\n\n") +- .arg(QString::fromStdString(filename)) ++ .arg(QString::fromStdString(std::string(filename))) + .arg(line) +- .arg(QString::fromStdString(message)); ++ .arg(QString::fromStdString(std::string(message))); + + _errors.push_back(msg); + } + +-void FileErrorCollector::AddWarning(const std::string& filename, int line, int, +- const std::string& message) ++void FileErrorCollector::RecordWarning(const absl::string_view filename, int line, int, ++ const absl::string_view message) + { + auto msg = QString("Warning [%1] line %2: %3") +- .arg(QString::fromStdString(filename)) ++ .arg(QString::fromStdString(std::string(filename))) + .arg(line) +- .arg(QString::fromStdString(message)); ++ .arg(QString::fromStdString(std::string(message))); + qDebug() << msg; + } + +-void IoErrorCollector::AddError(int line, google::protobuf::io::ColumnNumber, +- const std::string& message) ++void IoErrorCollector::RecordError(int line, google::protobuf::io::ColumnNumber, ++ const absl::string_view message) + { + _errors.push_back( +- QString("Line: [%1] Message: %2\n").arg(line).arg(QString::fromStdString(message))); ++ QString("Line: [%1] Message: %2\n").arg(line).arg(QString::fromStdString(std::string(message)))); + } + +-void IoErrorCollector::AddWarning(int line, google::protobuf::io::ColumnNumber column, +- const std::string& message) ++void IoErrorCollector::RecordWarning(int line, google::protobuf::io::ColumnNumber column, ++ const absl::string_view message) + { + qDebug() << QString("Line: [%1] Message: %2\n") + .arg(line) +- .arg(QString::fromStdString(message)); ++ .arg(QString::fromStdString(std::string(message))); + } +diff --git a/plotjuggler_plugins/ParserProtobuf/error_collectors.h b/plotjuggler_plugins/ParserProtobuf/error_collectors.h +index f70a881f..7afe1fea 100644 +--- a/plotjuggler_plugins/ParserProtobuf/error_collectors.h ++++ b/plotjuggler_plugins/ParserProtobuf/error_collectors.h +@@ -3,17 +3,18 @@ + + #include + #include ++#include + + #include + + class IoErrorCollector : public google::protobuf::io::ErrorCollector + { + public: +- void AddError(int line, google::protobuf::io::ColumnNumber column, +- const std::string& message) override; ++ void RecordError(int line, google::protobuf::io::ColumnNumber column, ++ const absl::string_view message) override; + +- void AddWarning(int line, google::protobuf::io::ColumnNumber column, +- const std::string& message) override; ++ void RecordWarning(int line, google::protobuf::io::ColumnNumber column, ++ const absl::string_view message) override; + + const QStringList& errors() + { +@@ -27,11 +28,11 @@ private: + class FileErrorCollector : public google::protobuf::compiler::MultiFileErrorCollector + { + public: +- void AddError(const std::string& filename, int line, int, +- const std::string& message) override; ++ void RecordError(const absl::string_view filename, int line, int, ++ const absl::string_view message) override; + +- void AddWarning(const std::string& filename, int line, int, +- const std::string& message) override; ++ void RecordWarning(const absl::string_view filename, int line, int, ++ const absl::string_view message) override; + + const QStringList& errors() + { +diff --git a/3rdparty/Qt-Advanced-Docking/CMakeLists.txt b/3rdparty/Qt-Advanced-Docking/CMakeLists.txt +index 6b650f1b..82c58edb 100644 +--- a/3rdparty/Qt-Advanced-Docking/CMakeLists.txt ++++ b/3rdparty/Qt-Advanced-Docking/CMakeLists.txt +@@ -67,7 +67,9 @@ target_link_libraries(qt_advanced_docking PUBLIC Qt5::Core Qt5::Gui Qt5::Widgets + + if(UNIX AND NOT APPLE) + target_link_libraries(qt_advanced_docking PUBLIC Qt5::X11Extras) +- target_link_libraries(qt_advanced_docking PRIVATE xcb) ++ find_package(XCB REQUIRED) ++ target_link_libraries(qt_advanced_docking PRIVATE ${XCB_LIBRARIES}) ++ target_include_directories(qt_advanced_docking SYSTEM PUBLIC ${XCB_INCLUDE_DIRS}) + endif() + + set_target_properties(qt_advanced_docking PROPERTIES +diff --git a/3rdparty/lua-5.4.3/CMakeLists.txt b/3rdparty/lua-5.4.3/CMakeLists.txt +index ad3dc012..a3da197b 100644 +--- a/3rdparty/lua-5.4.3/CMakeLists.txt ++++ b/3rdparty/lua-5.4.3/CMakeLists.txt +@@ -1,3 +1,5 @@ ++include_directories( ./src ) ++ + set(LUA_LIB_SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/src/lapi.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/lcode.c +@@ -32,7 +34,7 @@ set(LUA_LIB_SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/src/loadlib.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/linit.c + ) +-set(LUA_LIB_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/src) ++# set(LUA_LIB_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/src) + + if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|AppleClang") + add_compile_options(-fPIC) +@@ -42,7 +44,7 @@ add_library(lua_static STATIC + ${LUA_LIB_SRCS} + ${CMAKE_CURRENT_SOURCE_DIR}/src/lua.c + ) +-target_include_directories(lua_static PUBLIC ${LUA_LIB_INCLUDE}) ++# target_include_directories(lua_static PUBLIC ${LUA_LIB_INCLUDE}) + + add_library(lua_objects OBJECT ${LUA_LIB_SRCS}) + +@@ -55,3 +57,11 @@ if(EMSCRIPTEN) + endif() + target_compile_definitions(lua_static PUBLIC ${LUA_DEFINITIONS}) + ++install( ++ TARGETS ++ lua_static ++ EXPORT export_lua_static ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ RUNTIME DESTINATION bin ++ INCLUDES DESTINATION include ) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 16477dd3..859f7320 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.10.2) ++cmake_minimum_required(VERSION 3.20) + + PROJECT(plotjuggler LANGUAGES C CXX VERSION 3.9.2) + +@@ -94,18 +94,6 @@ if (NOT WIN32) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer") + endif() + +-if(APPLE AND EXISTS /usr/local/opt/qt5) +- # Homebrew installs Qt5 (up to at least 5.9.1) in +- # /usr/local/qt5, ensure it can be found by CMake since +- # it is not in the default /usr/local prefix. +- # source: https://github.com/Homebrew/homebrew-core/issues/8392#issuecomment-325226494 +- list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5") +- set(CMAKE_MACOSX_RPATH 1) +-elseif(APPLE AND EXISTS /opt/homebrew/opt/qt@5) +- list(APPEND CMAKE_PREFIX_PATH "/opt/homebrew/opt/qt@5") +- set(CMAKE_MACOSX_RPATH 1) +-endif() +- + find_package(Qt5 REQUIRED COMPONENTS + Core + Widgets +@@ -120,11 +108,9 @@ find_package(Qt5 REQUIRED COMPONENTS + set( QT_LINK_LIBRARIES + Qt5::Core + Qt5::Widgets +- Qt5::PrintSupport + Qt5::Xml + Qt5::Concurrent + Qt5::Svg +- Qt5::OpenGL + Qt5::WebSockets + ) + +@@ -191,7 +177,7 @@ if (BASE_AS_SHARED) + ${PLOTJUGGLER_BASE_SRC} + ${PLOTJUGGLER_BASE_MOCS} + ) +- target_link_libraries(plotjuggler_base PRIVATE lua_objects plotjuggler_qwt_objects) ++ target_link_libraries(plotjuggler_base PRIVATE ${QT_LINK_LIBRARIES} lua_objects plotjuggler_qwt_objects) + else() + add_library(plotjuggler_base STATIC + ${PLOTJUGGLER_BASE_SRC} +@@ -199,13 +185,6 @@ else() + ) + endif() + +-# target_link_libraries(plotjuggler_base plotjuggler_qwt) +- +-target_include_directories(plotjuggler_base INTERFACE +- $ +- $ +-) +- + ######################### INSTALL #################################### + + if(COMPILING_WITH_CATKIN) +diff --git a/plotjuggler_plugins/ParserProtobuf/CMakeLists.txt b/plotjuggler_plugins/ParserProtobuf/CMakeLists.txt +index f399fdad..4c89c787 100644 +--- a/plotjuggler_plugins/ParserProtobuf/CMakeLists.txt ++++ b/plotjuggler_plugins/ParserProtobuf/CMakeLists.txt +@@ -1,13 +1,6 @@ +-if(BUILDING_WITH_CONAN) +- message(STATUS "Finding Protobuf with conan") +- set(Protobuf_LIBS protobuf::libprotobuf) +-else() +- message(STATUS "Finding Protobuf without package managers") +- find_package(Protobuf QUIET) +- set(Protobuf_LIBS ${Protobuf_LIBRARIES}) +-endif() ++set(Protobuf_LIBS protobuf::libprotobuf) + +-find_package(Protobuf QUIET) ++find_package(Protobuf QUIET CONFIG) + + if( Protobuf_FOUND) + +diff --git a/3rdparty/sol/sol.hpp b/3rdparty/sol/sol.hpp +index 0bb68ebe..20855338 100644 +--- a/3rdparty/sol/sol.hpp ++++ b/3rdparty/sol/sol.hpp +@@ -6747,12 +6747,9 @@ namespace sol { + /// one. + /// + /// \group emplace +- template +- T& emplace(Args&&... args) noexcept { +- static_assert(std::is_constructible::value, "T must be constructible with Args"); +- +- *this = nullopt; +- this->construct(std::forward(args)...); ++ T& emplace(T& arg) noexcept { ++ m_value = &arg; ++ return **this; + } + + /// Swaps this optional with the other. diff --git a/recipes/ros-jazzy-plotjuggler/recipe.yaml b/recipes/ros-jazzy-plotjuggler/recipe.yaml new file mode 100644 index 00000000..b540cb54 --- /dev/null +++ b/recipes/ros-jazzy-plotjuggler/recipe.yaml @@ -0,0 +1,123 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-plotjuggler + version: 3.9.2 +source: + git: https://github.com/ros2-gbp/plotjuggler-release.git + tag: release/jazzy/plotjuggler/3.9.2-1 + target_directory: ros-jazzy-plotjuggler/src/work + patches: + - patch/ros-jazzy-plotjuggler.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - ${{ 'elfutils' if linux }} + - if: build_platform == target_platform + then: + - pkg-config + - cppzmq + - libboost-devel + - libboost-python-devel + - libprotobuf + - libxcb + - lz4 + - numpy + - pip + - protobuf + - python + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-ament-index-cpp + - ros-jazzy-fastcdr + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - zeromq + - zstd + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - cppzmq + - libboost-devel + - libboost-python-devel + - libprotobuf + - lz4 + - protobuf + - python + - qt-main + - ros-jazzy-ament-index-cpp + - ros-jazzy-fastcdr + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - zeromq + - zstd + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-pluginlib/bld_ament_cmake.bat b/recipes/ros-jazzy-pluginlib/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-pluginlib/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-pluginlib/build_ament_cmake.sh b/recipes/ros-jazzy-pluginlib/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-pluginlib/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-pluginlib/recipe.yaml b/recipes/ros-jazzy-pluginlib/recipe.yaml new file mode 100644 index 00000000..bed0e572 --- /dev/null +++ b/recipes/ros-jazzy-pluginlib/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-pluginlib + version: 5.4.2 +source: + git: https://github.com/ros2-gbp/pluginlib-release.git + tag: release/jazzy/pluginlib/5.4.2-2 + target_directory: ros-jazzy-pluginlib/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-index-cpp + - ros-jazzy-class-loader + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tinyxml2-vendor + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-index-cpp + - ros-jazzy-class-loader + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-tinyxml2-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-point-cloud-transport/bld_ament_cmake.bat b/recipes/ros-jazzy-point-cloud-transport/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-point-cloud-transport/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-point-cloud-transport/build_ament_cmake.sh b/recipes/ros-jazzy-point-cloud-transport/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-point-cloud-transport/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-point-cloud-transport/recipe.yaml b/recipes/ros-jazzy-point-cloud-transport/recipe.yaml new file mode 100644 index 00000000..c352d1e5 --- /dev/null +++ b/recipes/ros-jazzy-point-cloud-transport/recipe.yaml @@ -0,0 +1,100 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-point-cloud-transport + version: 4.0.3 +source: + git: https://github.com/ros2-gbp/point_cloud_transport-release.git + tag: release/jazzy/point_cloud_transport/4.0.3-1 + target_directory: ros-jazzy-point-cloud-transport/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-message-filters + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rcpputils + - ros-jazzy-rmw + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-message-filters + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rcpputils + - ros-jazzy-rmw + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-position-controllers/bld_ament_cmake.bat b/recipes/ros-jazzy-position-controllers/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-position-controllers/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-position-controllers/build_ament_cmake.sh b/recipes/ros-jazzy-position-controllers/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-position-controllers/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-position-controllers/recipe.yaml b/recipes/ros-jazzy-position-controllers/recipe.yaml new file mode 100644 index 00000000..cc843e9d --- /dev/null +++ b/recipes/ros-jazzy-position-controllers/recipe.yaml @@ -0,0 +1,97 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-position-controllers + version: 4.18.0 +source: + git: https://github.com/ros2-gbp/ros2_controllers-release.git + tag: release/jazzy/position_controllers/4.18.0-1 + target_directory: ros-jazzy-position-controllers/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-backward-ros + - ros-jazzy-controller-manager + - ros-jazzy-forward-command-controller + - ros-jazzy-hardware-interface + - ros-jazzy-hardware-interface-testing + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-ros2-control-test-assets + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-backward-ros + - ros-jazzy-forward-command-controller + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-pybind11-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-pybind11-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-pybind11-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-pybind11-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-pybind11-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-pybind11-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-pybind11-vendor/recipe.yaml b/recipes/ros-jazzy-pybind11-vendor/recipe.yaml new file mode 100644 index 00000000..f47e707f --- /dev/null +++ b/recipes/ros-jazzy-pybind11-vendor/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-pybind11-vendor + version: 3.1.2 +source: + git: https://github.com/ros2-gbp/pybind11_vendor-release.git + tag: release/jazzy/pybind11_vendor/3.1.2-2 + target_directory: ros-jazzy-pybind11-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - if: build_platform != target_platform + then: + - pybind11 + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pybind11 + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - pybind11 + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-python-cmake-module/bld_ament_cmake.bat b/recipes/ros-jazzy-python-cmake-module/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-python-cmake-module/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-python-cmake-module/build_ament_cmake.sh b/recipes/ros-jazzy-python-cmake-module/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-python-cmake-module/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-python-cmake-module/recipe.yaml b/recipes/ros-jazzy-python-cmake-module/recipe.yaml new file mode 100644 index 00000000..31b343a0 --- /dev/null +++ b/recipes/ros-jazzy-python-cmake-module/recipe.yaml @@ -0,0 +1,86 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-python-cmake-module + version: 0.11.1 +source: + git: https://github.com/ros2-gbp/python_cmake_module-release.git + tag: release/jazzy/python_cmake_module/0.11.1-2 + target_directory: ros-jazzy-python-cmake-module/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-python-qt-binding/bld_ament_cmake.bat b/recipes/ros-jazzy-python-qt-binding/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-python-qt-binding/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-python-qt-binding/build_ament_cmake.sh b/recipes/ros-jazzy-python-qt-binding/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-python-qt-binding/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-python-qt-binding/patch/ros-jazzy-python-qt-binding.patch b/recipes/ros-jazzy-python-qt-binding/patch/ros-jazzy-python-qt-binding.patch new file mode 100644 index 00000000..d025bbca --- /dev/null +++ b/recipes/ros-jazzy-python-qt-binding/patch/ros-jazzy-python-qt-binding.patch @@ -0,0 +1,254 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 919969e..2bf015a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,6 +11,7 @@ install(FILES + cmake/shiboken_helper.cmake + cmake/sip_configure.py + cmake/sip_helper.cmake ++ cmake/pyproject.toml.in + DESTINATION share/${PROJECT_NAME}/cmake) + + if(BUILD_TESTING) +diff --git a/cmake/pyproject.toml.in b/cmake/pyproject.toml.in +new file mode 100644 +index 0000000..cf4f57f +--- /dev/null ++++ b/cmake/pyproject.toml.in +@@ -0,0 +1,31 @@ ++[project] ++name = "lib@PROJECT_NAME@" ++ ++# Specify sip v5 as the build system for the package. ++[build-system] ++requires = ["PyQt-builder >=1, <2"] ++build-backend = "sipbuild.api" ++ ++[tool.sip] ++project-factory = "pyqtbuild:PyQtProject" ++ ++[tool.sip.builder] ++qmake = "@QMAKE_EXECUTABLE@" ++qmake-settings = [ "QMAKE_MACOSX_DEPLOYMENT_TARGET=@MACOS_MINIMUM_VERSION@", "CONFIG+=c++17" ] ++ ++[tool.sip.project] ++sip-files-dir = "@SIP_FILES_DIR@" ++build-dir = "@SIP_BUILD_DIR@" ++verbose = true ++minimum-macos-version = "@MACOS_MINIMUM_VERSION@" ++# Specify the PEP 566 metadata for the project. ++[tool.sip.metadata] ++name = "lib@PROJECT_NAME@" ++ ++[tool.sip.bindings.libqt_gui_cpp_sip] ++sip-file = "@SIP_FILE@" ++include-dirs = [@SIP_INCLUDE_DIRS@] ++libraries = [@SIP_LIBARIES@] ++library-dirs = [@SIP_LIBRARY_DIRS@] ++qmake-QT = ["widgets"] ++exceptions = true +diff --git a/cmake/sip_configure.py b/cmake/sip_configure.py +index 5210ee5..7bafe73 100644 +--- a/cmake/sip_configure.py ++++ b/cmake/sip_configure.py +@@ -215,6 +215,7 @@ if sys.platform == 'win32': + # The __cplusplus flag is not properly set on Windows for backwards + # compatibilty. This flag sets it correctly + makefile.CXXFLAGS.append('/Zc:__cplusplus') ++ makefile.extra_cxxflags.append('/DROS_BUILD_SHARED_LIBS=1') + else: + makefile.extra_cxxflags.append('-std=c++17') + +diff --git a/cmake/sip_helper.cmake b/cmake/sip_helper.cmake +index a5ac3c2..fdc9c18 100644 +--- a/cmake/sip_helper.cmake ++++ b/cmake/sip_helper.cmake +@@ -31,7 +31,7 @@ execute_process( + if(PYTHON_SIP_EXECUTABLE) + string(STRIP ${PYTHON_SIP_EXECUTABLE} SIP_EXECUTABLE) + else() +- find_program(SIP_EXECUTABLE sip) ++ find_program(SIP_EXECUTABLE NAMES sip sip-build) + endif() + + if(SIP_EXECUTABLE) +@@ -42,6 +42,15 @@ else() + set(sip_helper_NOTFOUND TRUE) + endif() + ++if(sip_helper_FOUND) ++ execute_process( ++ COMMAND ${SIP_EXECUTABLE} -V ++ OUTPUT_VARIABLE SIP_VERSION ++ ERROR_QUIET) ++ string(STRIP ${SIP_VERSION} SIP_VERSION) ++ message(STATUS "SIP binding generator version: ${SIP_VERSION}") ++endif() ++ + # + # Run the SIP generator and compile the generated code into a library. + # +@@ -93,34 +102,107 @@ function(build_sip_binding PROJECT_NAME SIP_FILE) + set(LIBRARY_DIRS ${${PROJECT_NAME}_LIBRARY_DIRS}) + set(LDFLAGS_OTHER ${${PROJECT_NAME}_LDFLAGS_OTHER}) + +- add_custom_command( +- OUTPUT ${SIP_BUILD_DIR}/Makefile +- COMMAND ${Python3_EXECUTABLE} ${sip_SIP_CONFIGURE} ${SIP_BUILD_DIR} ${SIP_FILE} ${sip_LIBRARY_DIR} +- \"${INCLUDE_DIRS}\" \"${LIBRARIES}\" \"${LIBRARY_DIRS}\" \"${LDFLAGS_OTHER}\" +- DEPENDS ${sip_SIP_CONFIGURE} ${SIP_FILE} ${sip_DEPENDS} +- WORKING_DIRECTORY ${sip_SOURCE_DIR} +- COMMENT "Running SIP generator for ${PROJECT_NAME} Python bindings..." +- ) ++ if(${SIP_VERSION} VERSION_GREATER_EQUAL "5.0.0") ++ # Since v5, SIP implements the backend per PEP 517, PEP 518 ++ # Here we synthesize `pyproject.toml` and run `pip install` + +- if(NOT EXISTS "${sip_LIBRARY_DIR}") ++ find_program(QMAKE_EXECUTABLE NAMES qmake REQUIRED) ++ ++ file(REMOVE_RECURSE ${SIP_BUILD_DIR}) + file(MAKE_DIRECTORY ${sip_LIBRARY_DIR}) +- endif() + +- if(WIN32) +- set(MAKE_EXECUTABLE NMake.exe) ++ set(SIP_FILES_DIR ${sip_SOURCE_DIR}) ++ ++ set(SIP_INCLUDE_DIRS "") ++ foreach(_x ${INCLUDE_DIRS}) ++ set(SIP_INCLUDE_DIRS "${SIP_INCLUDE_DIRS},\"${_x}\"") ++ endforeach() ++ string(REGEX REPLACE "^," "" SIP_INCLUDE_DIRS ${SIP_INCLUDE_DIRS}) ++ ++ # SIP expects the libraries WITHOUT the file extension. ++ set(SIP_LIBARIES "") ++ set(SIP_LIBRARY_DIRS "") ++ ++ if(APPLE) ++ set(LIBRARIES_TO_LOOP ${LIBRARIES}) ++ else() ++ set(LIBRARIES_TO_LOOP ${LIBRARIES} ${PYTHON_LIBRARIES}) ++ endif() ++ ++ foreach(_x ${LIBRARIES_TO_LOOP}) ++ get_filename_component(_x_NAME "${_x}" NAME_WLE) ++ get_filename_component(_x_DIR "${_x}" DIRECTORY) ++ get_filename_component(_x "${_x_DIR}/${_x_NAME}" ABSOLUTE) ++ STRING(REGEX REPLACE "^lib" "" _x_NAME_NOPREFIX ${_x_NAME}) ++ ++ string(FIND "${_x_NAME_NOPREFIX}" "$" "" _x_NAME_NOPREFIX ${_x_NAME_NOPREFIX}) ++ if(NOT "${out2}" EQUAL -1) ++ message(STATUS "IGNORE: ${_x_NAME_NOPREFIX}") ++ else() ++ set(SIP_LIBARIES "${SIP_LIBARIES},\"${_x_NAME_NOPREFIX}\"") ++ endif() ++ else() ++ set(SIP_LIBARIES "${SIP_LIBARIES},\"${_x_NAME_NOPREFIX}\"") ++ set(SIP_LIBRARY_DIRS "${SIP_LIBRARY_DIRS},\"${_x_DIR}\"") ++ endif() ++ endforeach() ++ string(REGEX REPLACE "^," "" SIP_LIBARIES ${SIP_LIBARIES}) ++ ++ foreach(_x ${LIBRARY_DIRS}) ++ set(SIP_LIBRARY_DIRS "${SIP_LIBRARY_DIRS},\"${_x}\"") ++ endforeach() ++ string(REGEX REPLACE "^," "" SIP_LIBRARY_DIRS ${SIP_LIBRARY_DIRS}) ++ message(WARNING "test lib dir: ${SIP_LIBRARY_DIRS}") ++ ++ set(MACOS_MINIMUM_VERSION ${CMAKE_OSX_DEPLOYMENT_TARGET}) ++ ++ # TODO: ++ # I don't know what to do about LDFLAGS_OTHER ++ # what's the equivalent construct in sip5? ++ ++ configure_file( ++ ${__PYTHON_QT_BINDING_SIP_HELPER_DIR}/pyproject.toml.in ++ ${sip_BINARY_DIR}/sip/pyproject.toml ++ ) ++ add_custom_command( ++ OUTPUT ${sip_LIBRARY_DIR}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ++ COMMAND ${Python3_EXECUTABLE} -m pip install . --target ${sip_LIBRARY_DIR} --no-deps --verbose --upgrade ++ DEPENDS ${sip_SIP_CONFIGURE} ${SIP_FILE} ${sip_DEPENDS} ++ WORKING_DIRECTORY ${sip_BINARY_DIR}/sip ++ COMMENT "Running SIP-build generator for ${PROJECT_NAME} Python bindings..." ++ ) + else() +- find_program(MAKE_PROGRAM NAMES make) +- message(STATUS "Found required make: ${MAKE_PROGRAM}") +- set(MAKE_EXECUTABLE ${MAKE_PROGRAM}) +- endif() ++ add_custom_command( ++ OUTPUT ${SIP_BUILD_DIR}/Makefile ++ COMMAND ${Python3_EXECUTABLE} ${sip_SIP_CONFIGURE} ${SIP_BUILD_DIR} ${SIP_FILE} ${sip_LIBRARY_DIR} ++ \"${INCLUDE_DIRS}\" \"${LIBRARIES}\" \"${LIBRARY_DIRS}\" \"${LDFLAGS_OTHER}\" ++ DEPENDS ${sip_SIP_CONFIGURE} ${SIP_FILE} ${sip_DEPENDS} ++ WORKING_DIRECTORY ${sip_SOURCE_DIR} ++ COMMENT "Running SIP generator for ${PROJECT_NAME} Python bindings..." ++ ) + +- add_custom_command( +- OUTPUT ${sip_LIBRARY_DIR}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} +- COMMAND ${MAKE_EXECUTABLE} +- DEPENDS ${SIP_BUILD_DIR}/Makefile +- WORKING_DIRECTORY ${SIP_BUILD_DIR} +- COMMENT "Compiling generated code for ${PROJECT_NAME} Python bindings..." +- ) ++ if(NOT EXISTS "${sip_LIBRARY_DIR}") ++ file(MAKE_DIRECTORY ${sip_LIBRARY_DIR}) ++ endif() ++ ++ if(WIN32) ++ set(MAKE_EXECUTABLE NMake.exe) ++ else() ++ set(MAKE_EXECUTABLE make) ++ endif() ++ ++ add_custom_command( ++ OUTPUT ${sip_LIBRARY_DIR}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ++ COMMAND ${MAKE_EXECUTABLE} ++ DEPENDS ${SIP_BUILD_DIR}/Makefile ++ WORKING_DIRECTORY ${SIP_BUILD_DIR} ++ COMMENT "Compiling generated code for ${PROJECT_NAME} Python bindings..." ++ ) ++ endif() + + add_custom_target(lib${PROJECT_NAME} ALL + DEPENDS ${sip_LIBRARY_DIR}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} +diff --git a/src/python_qt_binding/__init__.py b/src/python_qt_binding/__init__.py +index 1e209de..6b55f35 100644 +--- a/src/python_qt_binding/__init__.py ++++ b/src/python_qt_binding/__init__.py +@@ -66,3 +66,11 @@ for module_name, module in QT_BINDING_MODULES.items(): + del module + + del sys ++ ++import os ++from PyQt5.QtGui import QIcon ++current_theme_path = QIcon.themeSearchPaths() ++conda_path = os.environ['CONDA_PREFIX'] ++QIcon.setThemeSearchPaths(current_theme_path + [os.path.join(conda_path, 'share/icons/')]) ++QIcon.setThemeName('Adwaita') ++del os +diff --git a/src/python_qt_binding/binding_helper.py b/src/python_qt_binding/binding_helper.py +index 27c3237..781fe62 100644 +--- a/src/python_qt_binding/binding_helper.py ++++ b/src/python_qt_binding/binding_helper.py +@@ -50,11 +50,7 @@ QT_BINDING_VERSION = None + def _select_qt_binding(binding_name=None, binding_order=None): + global QT_BINDING, QT_BINDING_VERSION + +- # order of default bindings can be changed here +- if platform.system() == 'Darwin': +- DEFAULT_BINDING_ORDER = ['pyside'] +- else: +- DEFAULT_BINDING_ORDER = ['pyqt', 'pyside'] ++ DEFAULT_BINDING_ORDER = ['pyqt', 'pyside'] + + binding_order = binding_order or DEFAULT_BINDING_ORDER + diff --git a/recipes/ros-jazzy-python-qt-binding/recipe.yaml b/recipes/ros-jazzy-python-qt-binding/recipe.yaml new file mode 100644 index 00000000..9f94d83a --- /dev/null +++ b/recipes/ros-jazzy-python-qt-binding/recipe.yaml @@ -0,0 +1,110 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-python-qt-binding + version: 2.2.1 +source: + git: https://github.com/ros2-gbp/python_qt_binding-release.git + tag: release/jazzy/python_qt_binding/2.2.1-1 + target_directory: ros-jazzy-python-qt-binding/src/work + patches: + - patch/ros-jazzy-python-qt-binding.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - if: build_platform != target_platform + then: + - pyqt-builder + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pyqt + - python + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: build_platform == target_platform + then: + - pyqt-builder + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - pyqt + - pyqt-builder + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-qt-dotgraph/bld_ament_cmake.bat b/recipes/ros-jazzy-qt-dotgraph/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-qt-dotgraph/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-qt-dotgraph/build_ament_cmake.sh b/recipes/ros-jazzy-qt-dotgraph/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-qt-dotgraph/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-qt-dotgraph/recipe.yaml b/recipes/ros-jazzy-qt-dotgraph/recipe.yaml new file mode 100644 index 00000000..13d91742 --- /dev/null +++ b/recipes/ros-jazzy-qt-dotgraph/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-qt-dotgraph + version: 2.7.5 +source: + git: https://github.com/ros2-gbp/qt_gui_core-release.git + tag: release/jazzy/qt_dotgraph/2.7.5-1 + target_directory: ros-jazzy-qt-dotgraph/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pygraphviz + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - pydot + - python + - ros-jazzy-python-qt-binding + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-qt-gui-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-qt-gui-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-qt-gui-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-qt-gui-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-qt-gui-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-qt-gui-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-qt-gui-cpp/patch/ros-jazzy-qt-gui-cpp.patch b/recipes/ros-jazzy-qt-gui-cpp/patch/ros-jazzy-qt-gui-cpp.patch new file mode 100644 index 00000000..7b18400e --- /dev/null +++ b/recipes/ros-jazzy-qt-gui-cpp/patch/ros-jazzy-qt-gui-cpp.patch @@ -0,0 +1,61 @@ +diff --git a/src/qt_gui_cpp_sip/CMakeLists.txt b/src/qt_gui_cpp_sip/CMakeLists.txt +index 47c24958..d5a95d48 100644 +--- a/src/qt_gui_cpp_sip/CMakeLists.txt ++++ b/src/qt_gui_cpp_sip/CMakeLists.txt +@@ -28,7 +28,7 @@ set(qt_gui_cpp_sip_DEPENDENT_FILES + + # maintain context for different named target + set(qt_gui_cpp_sip_INCLUDE_DIRS ${qt_gui_cpp_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/../../include") +-set(qt_gui_cpp_sip_LIBRARY_DIRS ${qt_gui_cpp_LIBRARY_DIRS} lib) ++set(qt_gui_cpp_sip_LIBRARY_DIRS ${CMAKE_BINARY_DIR}) + set(qt_gui_cpp_sip_LDFLAGS_OTHER ${qt_gui_cpp_LDFLAGS_OTHER}) + + ament_get_recursive_properties(deps_include_dirs deps_libraries ${pluginlib_TARGETS}) +@@ -51,16 +51,22 @@ cmake_minimum_required(VERSION 3.20) + cmake_policy(SET CMP0094 NEW) + set(Python3_FIND_UNVERSIONED_NAMES FIRST) + +-find_package(Python3 REQUIRED COMPONENTS Development) ++find_package(Python REQUIRED COMPONENTS Development) ++find_package(OpenGL REQUIRED) + + set(_qt_gui_cpp_sip_LIBRARIES + ${deps_libraries} +- Python3::Python + qt_gui_cpp ++ OpenGL::GL + ) + ++if(NOT APPLE) ++ set(_qt_gui_cpp_sip_LIBRARIES ${_qt_gui_cpp_sip_LIBRARIES} Python::Python) ++endif() ++ + # sip needs libraries to have resolved paths and cannot link to cmake targets +-foreach(_lib_name ${_qt_gui_cpp_sip_LIBRARIES}) ++foreach(_lib_name_raw ${_qt_gui_cpp_sip_LIBRARIES}) ++ string(REGEX REPLACE "\\.so\\.[0-9,\\.]*" ".so" _lib_name ${_lib_name_raw}) + if(TARGET ${_lib_name}) + # Use a nifty cmake generator expression to resolve the target location + list(APPEND qt_gui_cpp_sip_LIBRARIES $) +@@ -91,11 +97,19 @@ if(sip_helper_FOUND) + ) + + if(APPLE) +- set(LIBQT_GUI_CPP_SIP_SUFFIX .so) ++ if(${SIP_VERSION} VERSION_GREATER_EQUAL "5.0.0") ++ set(LIBQT_GUI_CPP_SIP_SUFFIX ".cpython-${Python_VERSION_MAJOR}${Python_VERSION_MINOR}-darwin.so") ++ else() ++ set(LIBQT_GUI_CPP_SIP_SUFFIX .so) ++ endif() + elseif(WIN32) + set(LIBQT_GUI_CPP_SIP_SUFFIX .pyd) + else() +- set(LIBQT_GUI_CPP_SIP_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}) ++ if(${SIP_VERSION} VERSION_GREATER_EQUAL "5.0.0") ++ set(LIBQT_GUI_CPP_SIP_SUFFIX ".cpython-${Python_VERSION_MAJOR}${Python_VERSION_MINOR}-${CMAKE_HOST_SYSTEM_PROCESSOR}-linux-gnu${CMAKE_SHARED_LIBRARY_SUFFIX}") ++ else() ++ set(LIBQT_GUI_CPP_SIP_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}) ++ endif() + endif() + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libqt_gui_cpp_sip${LIBQT_GUI_CPP_SIP_SUFFIX} diff --git a/recipes/ros-jazzy-qt-gui-cpp/recipe.yaml b/recipes/ros-jazzy-qt-gui-cpp/recipe.yaml new file mode 100644 index 00000000..74f56527 --- /dev/null +++ b/recipes/ros-jazzy-qt-gui-cpp/recipe.yaml @@ -0,0 +1,118 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-qt-gui-cpp + version: 2.7.5 +source: + git: https://github.com/ros2-gbp/qt_gui_core-release.git + tag: release/jazzy/qt_gui_cpp/2.7.5-1 + target_directory: ros-jazzy-qt-gui-cpp/src/work + patches: + - patch/ros-jazzy-qt-gui-cpp.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - ${{ 'pyqt' if (build_platform != target_platform) }} + - ${{ 'qt-main' if (build_platform != target_platform) }} + - if: build_platform != target_platform + then: + - pyqt-builder + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pep517 + - pip + - pkg-config + - pyside2 + - python + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-pluginlib + - ros-jazzy-python-qt-binding + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tinyxml2-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: build_platform == target_platform + then: + - pyqt-builder + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - pep517 + - pyqt-builder + - python + - ros-jazzy-pluginlib + - ros-jazzy-qt-gui + - ros-jazzy-ros-workspace + - ros-jazzy-tinyxml2-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-qt-gui-py-common/bld_ament_cmake.bat b/recipes/ros-jazzy-qt-gui-py-common/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-qt-gui-py-common/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-qt-gui-py-common/build_ament_cmake.sh b/recipes/ros-jazzy-qt-gui-py-common/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-qt-gui-py-common/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-qt-gui-py-common/recipe.yaml b/recipes/ros-jazzy-qt-gui-py-common/recipe.yaml new file mode 100644 index 00000000..5ea3dea6 --- /dev/null +++ b/recipes/ros-jazzy-qt-gui-py-common/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-qt-gui-py-common + version: 2.7.5 +source: + git: https://github.com/ros2-gbp/qt_gui_core-release.git + tag: release/jazzy/qt_gui_py_common/2.7.5-1 + target_directory: ros-jazzy-qt-gui-py-common/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-index-python + - ros-jazzy-python-qt-binding + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-qt-gui/bld_ament_cmake.bat b/recipes/ros-jazzy-qt-gui/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-qt-gui/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-qt-gui/build_ament_cmake.sh b/recipes/ros-jazzy-qt-gui/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-qt-gui/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-qt-gui/recipe.yaml b/recipes/ros-jazzy-qt-gui/recipe.yaml new file mode 100644 index 00000000..70d91bae --- /dev/null +++ b/recipes/ros-jazzy-qt-gui/recipe.yaml @@ -0,0 +1,109 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-qt-gui + version: 2.7.5 +source: + git: https://github.com/ros2-gbp/qt_gui_core-release.git + tag: release/jazzy/qt_gui/2.7.5-1 + target_directory: ros-jazzy-qt-gui/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - if: build_platform != target_platform + then: + - pyqt-builder + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pyqt + - python + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: build_platform == target_platform + then: + - pyqt-builder + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - catkin_pkg + - python + - ros-jazzy-ament-index-python + - ros-jazzy-python-qt-binding + - ros-jazzy-ros-workspace + - ros-jazzy-tango-icons-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-quality-of-service-demo-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-quality-of-service-demo-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-quality-of-service-demo-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-quality-of-service-demo-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-quality-of-service-demo-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-quality-of-service-demo-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-quality-of-service-demo-cpp/recipe.yaml b/recipes/ros-jazzy-quality-of-service-demo-cpp/recipe.yaml new file mode 100644 index 00000000..cdc922c9 --- /dev/null +++ b/recipes/ros-jazzy-quality-of-service-demo-cpp/recipe.yaml @@ -0,0 +1,104 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-quality-of-service-demo-cpp + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/quality_of_service_demo_cpp/0.33.5-1 + target_directory: ros-jazzy-quality-of-service-demo-cpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-example-interfaces + - ros-jazzy-launch + - ros-jazzy-launch-testing + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-implementation-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-example-interfaces + - ros-jazzy-launch-ros + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-quality-of-service-demo-py/bld_ament_python.bat b/recipes/ros-jazzy-quality-of-service-demo-py/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-quality-of-service-demo-py/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-quality-of-service-demo-py/build_ament_python.sh b/recipes/ros-jazzy-quality-of-service-demo-py/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-quality-of-service-demo-py/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-quality-of-service-demo-py/recipe.yaml b/recipes/ros-jazzy-quality-of-service-demo-py/recipe.yaml new file mode 100644 index 00000000..e520bdce --- /dev/null +++ b/recipes/ros-jazzy-quality-of-service-demo-py/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-quality-of-service-demo-py + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/quality_of_service_demo_py/0.33.5-1 + target_directory: ros-jazzy-quality-of-service-demo-py/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-random-numbers/bld_ament_cmake.bat b/recipes/ros-jazzy-random-numbers/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-random-numbers/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-random-numbers/build_ament_cmake.sh b/recipes/ros-jazzy-random-numbers/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-random-numbers/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-random-numbers/recipe.yaml b/recipes/ros-jazzy-random-numbers/recipe.yaml new file mode 100644 index 00000000..ac2352e8 --- /dev/null +++ b/recipes/ros-jazzy-random-numbers/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-random-numbers + version: 2.0.1 +source: + git: https://github.com/ros2-gbp/random_numbers-release.git + tag: release/jazzy/random_numbers/2.0.1-5 + target_directory: ros-jazzy-random-numbers/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libboost-devel + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - libboost + - libboost-devel + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rcl-action/bld_ament_cmake.bat b/recipes/ros-jazzy-rcl-action/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rcl-action/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rcl-action/build_ament_cmake.sh b/recipes/ros-jazzy-rcl-action/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rcl-action/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rcl-action/recipe.yaml b/recipes/ros-jazzy-rcl-action/recipe.yaml new file mode 100644 index 00000000..b337a836 --- /dev/null +++ b/recipes/ros-jazzy-rcl-action/recipe.yaml @@ -0,0 +1,101 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rcl-action + version: 9.2.4 +source: + git: https://github.com/ros2-gbp/rcl-release.git + tag: release/jazzy/rcl_action/9.2.4-1 + target_directory: ros-jazzy-rcl-action/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-action-msgs + - ros-jazzy-ament-cmake-gen-version-h + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-osrf-testing-tools-cpp + - ros-jazzy-rcl + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-implementation-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-action-msgs + - ros-jazzy-rcl + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rcl-interfaces/bld_ament_cmake.bat b/recipes/ros-jazzy-rcl-interfaces/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rcl-interfaces/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rcl-interfaces/build_ament_cmake.sh b/recipes/ros-jazzy-rcl-interfaces/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rcl-interfaces/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rcl-interfaces/recipe.yaml b/recipes/ros-jazzy-rcl-interfaces/recipe.yaml new file mode 100644 index 00000000..96c1490d --- /dev/null +++ b/recipes/ros-jazzy-rcl-interfaces/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rcl-interfaces + version: 2.0.2 +source: + git: https://github.com/ros2-gbp/rcl_interfaces-release.git + tag: release/jazzy/rcl_interfaces/2.0.2-2 + target_directory: ros-jazzy-rcl-interfaces/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rcl-lifecycle/bld_ament_cmake.bat b/recipes/ros-jazzy-rcl-lifecycle/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rcl-lifecycle/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rcl-lifecycle/build_ament_cmake.sh b/recipes/ros-jazzy-rcl-lifecycle/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rcl-lifecycle/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rcl-lifecycle/recipe.yaml b/recipes/ros-jazzy-rcl-lifecycle/recipe.yaml new file mode 100644 index 00000000..8875271d --- /dev/null +++ b/recipes/ros-jazzy-rcl-lifecycle/recipe.yaml @@ -0,0 +1,101 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rcl-lifecycle + version: 9.2.4 +source: + git: https://github.com/ros2-gbp/rcl-release.git + tag: release/jazzy/rcl_lifecycle/9.2.4-1 + target_directory: ros-jazzy-rcl-lifecycle/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gen-version-h + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-lifecycle-msgs + - ros-jazzy-osrf-testing-tools-cpp + - ros-jazzy-rcl + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-tracetools + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-lifecycle-msgs + - ros-jazzy-rcl + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-tracetools + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rcl-logging-interface/bld_ament_cmake.bat b/recipes/ros-jazzy-rcl-logging-interface/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rcl-logging-interface/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rcl-logging-interface/build_ament_cmake.sh b/recipes/ros-jazzy-rcl-logging-interface/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rcl-logging-interface/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rcl-logging-interface/recipe.yaml b/recipes/ros-jazzy-rcl-logging-interface/recipe.yaml new file mode 100644 index 00000000..fe5e6afa --- /dev/null +++ b/recipes/ros-jazzy-rcl-logging-interface/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rcl-logging-interface + version: 3.1.1 +source: + git: https://github.com/ros2-gbp/rcl_logging-release.git + tag: release/jazzy/rcl_logging_interface/3.1.1-1 + target_directory: ros-jazzy-rcl-logging-interface/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rcl-logging-spdlog/bld_ament_cmake.bat b/recipes/ros-jazzy-rcl-logging-spdlog/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rcl-logging-spdlog/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rcl-logging-spdlog/build_ament_cmake.sh b/recipes/ros-jazzy-rcl-logging-spdlog/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rcl-logging-spdlog/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rcl-logging-spdlog/recipe.yaml b/recipes/ros-jazzy-rcl-logging-spdlog/recipe.yaml new file mode 100644 index 00000000..2f8551a0 --- /dev/null +++ b/recipes/ros-jazzy-rcl-logging-spdlog/recipe.yaml @@ -0,0 +1,97 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rcl-logging-spdlog + version: 3.1.1 +source: + git: https://github.com/ros2-gbp/rcl_logging-release.git + tag: release/jazzy/rcl_logging_spdlog/3.1.1-1 + target_directory: ros-jazzy-rcl-logging-spdlog/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-performance-test-fixture + - ros-jazzy-rcl-logging-interface + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-spdlog-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - spdlog + run: + - python + - ros-jazzy-rcl-logging-interface + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-spdlog-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - spdlog + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rcl-yaml-param-parser/bld_ament_cmake.bat b/recipes/ros-jazzy-rcl-yaml-param-parser/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rcl-yaml-param-parser/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rcl-yaml-param-parser/build_ament_cmake.sh b/recipes/ros-jazzy-rcl-yaml-param-parser/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rcl-yaml-param-parser/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rcl-yaml-param-parser/recipe.yaml b/recipes/ros-jazzy-rcl-yaml-param-parser/recipe.yaml new file mode 100644 index 00000000..390c11a2 --- /dev/null +++ b/recipes/ros-jazzy-rcl-yaml-param-parser/recipe.yaml @@ -0,0 +1,101 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rcl-yaml-param-parser + version: 9.2.4 +source: + git: https://github.com/ros2-gbp/rcl-release.git + tag: release/jazzy/rcl_yaml_param_parser/9.2.4-1 + target_directory: ros-jazzy-rcl-yaml-param-parser/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gen-version-h + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-libyaml-vendor + - ros-jazzy-mimick-vendor + - ros-jazzy-osrf-testing-tools-cpp + - ros-jazzy-performance-test-fixture + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - yaml + - yaml-cpp + run: + - python + - ros-jazzy-libyaml-vendor + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - yaml + - yaml-cpp + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rcl/bld_ament_cmake.bat b/recipes/ros-jazzy-rcl/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rcl/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rcl/build_ament_cmake.sh b/recipes/ros-jazzy-rcl/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rcl/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rcl/recipe.yaml b/recipes/ros-jazzy-rcl/recipe.yaml new file mode 100644 index 00000000..c9cd2856 --- /dev/null +++ b/recipes/ros-jazzy-rcl/recipe.yaml @@ -0,0 +1,124 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rcl + version: 9.2.4 +source: + git: https://github.com/ros2-gbp/rcl-release.git + tag: release/jazzy/rcl/9.2.4-1 + target_directory: ros-jazzy-rcl/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gen-version-h + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-launch + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-libyaml-vendor + - ros-jazzy-mimick-vendor + - ros-jazzy-osrf-testing-tools-cpp + - ros-jazzy-rcl-interfaces + - ros-jazzy-rcl-logging-interface + - ros-jazzy-rcl-logging-spdlog + - ros-jazzy-rcl-yaml-param-parser + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-implementation + - ros-jazzy-rmw-implementation-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-service-msgs + - ros-jazzy-test-msgs + - ros-jazzy-tracetools + - ros-jazzy-type-description-interfaces + - ros2-distro-mutex 0.6.* jazzy_* + - yaml + - yaml-cpp + run: + - python + - ros-jazzy-libyaml-vendor + - ros-jazzy-rcl-interfaces + - ros-jazzy-rcl-logging-interface + - ros-jazzy-rcl-logging-spdlog + - ros-jazzy-rcl-yaml-param-parser + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-implementation + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-service-msgs + - ros-jazzy-tracetools + - ros-jazzy-type-description-interfaces + - ros2-distro-mutex 0.6.* jazzy_* + - yaml + - yaml-cpp + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rclcpp-action/bld_ament_cmake.bat b/recipes/ros-jazzy-rclcpp-action/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rclcpp-action/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rclcpp-action/build_ament_cmake.sh b/recipes/ros-jazzy-rclcpp-action/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rclcpp-action/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rclcpp-action/recipe.yaml b/recipes/ros-jazzy-rclcpp-action/recipe.yaml new file mode 100644 index 00000000..accba985 --- /dev/null +++ b/recipes/ros-jazzy-rclcpp-action/recipe.yaml @@ -0,0 +1,104 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rclcpp-action + version: 28.1.6 +source: + git: https://github.com/ros2-gbp/rclcpp-release.git + tag: release/jazzy/rclcpp_action/28.1.6-1 + target_directory: ros-jazzy-rclcpp-action/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-action-msgs + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-mimick-vendor + - ros-jazzy-performance-test-fixture + - ros-jazzy-rcl + - ros-jazzy-rcl-action + - ros-jazzy-rclcpp + - ros-jazzy-rcpputils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-action-msgs + - ros-jazzy-ament-cmake + - ros-jazzy-rcl + - ros-jazzy-rcl-action + - ros-jazzy-rclcpp + - ros-jazzy-rcpputils + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rclcpp-components/bld_ament_cmake.bat b/recipes/ros-jazzy-rclcpp-components/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rclcpp-components/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rclcpp-components/build_ament_cmake.sh b/recipes/ros-jazzy-rclcpp-components/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rclcpp-components/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rclcpp-components/recipe.yaml b/recipes/ros-jazzy-rclcpp-components/recipe.yaml new file mode 100644 index 00000000..b192e1ea --- /dev/null +++ b/recipes/ros-jazzy-rclcpp-components/recipe.yaml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rclcpp-components + version: 28.1.6 +source: + git: https://github.com/ros2-gbp/rclcpp-release.git + tag: release/jazzy/rclcpp_components/28.1.6-1 + target_directory: ros-jazzy-rclcpp-components/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-google-benchmark + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-index-cpp + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-class-loader + - ros-jazzy-composition-interfaces + - ros-jazzy-launch-testing + - ros-jazzy-rclcpp + - ros-jazzy-rcpputils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-index-cpp + - ros-jazzy-class-loader + - ros-jazzy-composition-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rclcpp-lifecycle/bld_ament_cmake.bat b/recipes/ros-jazzy-rclcpp-lifecycle/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rclcpp-lifecycle/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rclcpp-lifecycle/build_ament_cmake.sh b/recipes/ros-jazzy-rclcpp-lifecycle/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rclcpp-lifecycle/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rclcpp-lifecycle/recipe.yaml b/recipes/ros-jazzy-rclcpp-lifecycle/recipe.yaml new file mode 100644 index 00000000..13b7a940 --- /dev/null +++ b/recipes/ros-jazzy-rclcpp-lifecycle/recipe.yaml @@ -0,0 +1,107 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rclcpp-lifecycle + version: 28.1.6 +source: + git: https://github.com/ros2-gbp/rclcpp-release.git + tag: release/jazzy/rclcpp_lifecycle/28.1.6-1 + target_directory: ros-jazzy-rclcpp-lifecycle/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-lifecycle-msgs + - ros-jazzy-mimick-vendor + - ros-jazzy-performance-test-fixture + - ros-jazzy-rcl + - ros-jazzy-rcl-interfaces + - ros-jazzy-rcl-lifecycle + - ros-jazzy-rclcpp + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-typesupport-cpp + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-lifecycle-msgs + - ros-jazzy-rcl + - ros-jazzy-rcl-interfaces + - ros-jazzy-rcl-lifecycle + - ros-jazzy-rclcpp + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-typesupport-cpp + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rclcpp/bld_ament_cmake.bat b/recipes/ros-jazzy-rclcpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rclcpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rclcpp/build_ament_cmake.sh b/recipes/ros-jazzy-rclcpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rclcpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rclcpp/recipe.yaml b/recipes/ros-jazzy-rclcpp/recipe.yaml new file mode 100644 index 00000000..5451a8b3 --- /dev/null +++ b/recipes/ros-jazzy-rclcpp/recipe.yaml @@ -0,0 +1,131 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rclcpp + version: 28.1.6 +source: + git: https://github.com/ros2-gbp/rclcpp-release.git + tag: release/jazzy/rclcpp/28.1.6-1 + target_directory: ros-jazzy-rclcpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gen-version-h + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-google-benchmark + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-index-cpp + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-libstatistics-collector + - ros-jazzy-mimick-vendor + - ros-jazzy-performance-test-fixture + - ros-jazzy-rcl + - ros-jazzy-rcl-interfaces + - ros-jazzy-rcl-logging-interface + - ros-jazzy-rcl-yaml-param-parser + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-implementation-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosgraph-msgs + - ros-jazzy-rosidl-default-generators + - ros-jazzy-rosidl-dynamic-typesupport + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-c + - ros-jazzy-rosidl-typesupport-cpp + - ros-jazzy-statistics-msgs + - ros-jazzy-test-msgs + - ros-jazzy-tracetools + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-index-cpp + - ros-jazzy-builtin-interfaces + - ros-jazzy-libstatistics-collector + - ros-jazzy-rcl + - ros-jazzy-rcl-interfaces + - ros-jazzy-rcl-logging-interface + - ros-jazzy-rcl-yaml-param-parser + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-workspace + - ros-jazzy-rosgraph-msgs + - ros-jazzy-rosidl-dynamic-typesupport + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-c + - ros-jazzy-rosidl-typesupport-cpp + - ros-jazzy-statistics-msgs + - ros-jazzy-tracetools + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rclpy/bld_ament_cmake.bat b/recipes/ros-jazzy-rclpy/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rclpy/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rclpy/build_ament_cmake.sh b/recipes/ros-jazzy-rclpy/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rclpy/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rclpy/patch/ros-jazzy-rclpy.osx.patch b/recipes/ros-jazzy-rclpy/patch/ros-jazzy-rclpy.osx.patch new file mode 100644 index 00000000..89b7d203 --- /dev/null +++ b/recipes/ros-jazzy-rclpy/patch/ros-jazzy-rclpy.osx.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 80b8a1f..5b6a55b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -72,7 +72,7 @@ function(configure_build_install_location _library_name) + endfunction() + + # Split from main extension and converted to pybind11 +-pybind11_add_module(_rclpy_pybind11 SHARED ++pybind11_add_module(_rclpy_pybind11 MODULE + src/rclpy/_rclpy_logging.cpp + src/rclpy/_rclpy_pybind11.cpp + src/rclpy/action_client.cpp diff --git a/recipes/ros-jazzy-rclpy/recipe.yaml b/recipes/ros-jazzy-rclpy/recipe.yaml new file mode 100644 index 00000000..ae56515f --- /dev/null +++ b/recipes/ros-jazzy-rclpy/recipe.yaml @@ -0,0 +1,135 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rclpy + version: 7.1.3 +source: + git: https://github.com/ros2-gbp/rclpy-release.git + tag: release/jazzy/rclpy/7.1.3-1 + target_directory: ros-jazzy-rclpy/src/work + patches: + - patch/ros-jazzy-rclpy.osx.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - if: build_platform != target_platform + then: + - pybind11 + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-lifecycle-msgs + - ros-jazzy-pybind11-vendor + - ros-jazzy-python-cmake-module + - ros-jazzy-rcl + - ros-jazzy-rcl-action + - ros-jazzy-rcl-interfaces + - ros-jazzy-rcl-lifecycle + - ros-jazzy-rcl-logging-interface + - ros-jazzy-rcl-yaml-param-parser + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-implementation + - ros-jazzy-rmw-implementation-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-generator-py + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-test-msgs + - ros-jazzy-unique-identifier-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - pybind11 + run: + - python + - pyyaml + - ros-jazzy-action-msgs + - ros-jazzy-ament-index-python + - ros-jazzy-builtin-interfaces + - ros-jazzy-lifecycle-msgs + - ros-jazzy-rcl + - ros-jazzy-rcl-action + - ros-jazzy-rcl-interfaces + - ros-jazzy-rcl-lifecycle + - ros-jazzy-rcl-logging-interface + - ros-jazzy-rcl-yaml-param-parser + - ros-jazzy-rmw + - ros-jazzy-rmw-implementation + - ros-jazzy-ros-workspace + - ros-jazzy-rosgraph-msgs + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rpyutils + - ros-jazzy-unique-identifier-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} +tests: + - python: + imports: + - rclpy + pip_check: false diff --git a/recipes/ros-jazzy-rcpputils/bld_ament_cmake.bat b/recipes/ros-jazzy-rcpputils/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rcpputils/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rcpputils/build_ament_cmake.sh b/recipes/ros-jazzy-rcpputils/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rcpputils/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rcpputils/recipe.yaml b/recipes/ros-jazzy-rcpputils/recipe.yaml new file mode 100644 index 00000000..69191cae --- /dev/null +++ b/recipes/ros-jazzy-rcpputils/recipe.yaml @@ -0,0 +1,97 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rcpputils + version: 2.11.1 +source: + git: https://github.com/ros2-gbp/rcpputils-release.git + tag: release/jazzy/rcpputils/2.11.1-1 + target_directory: ros-jazzy-rcpputils/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-cppcheck + - ros-jazzy-ament-cmake-cpplint + - ros-jazzy-ament-cmake-flake8 + - ros-jazzy-ament-cmake-gen-version-h + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-pep257 + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-cmake-uncrustify + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rcutils/bld_ament_cmake.bat b/recipes/ros-jazzy-rcutils/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rcutils/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rcutils/build_ament_cmake.sh b/recipes/ros-jazzy-rcutils/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rcutils/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rcutils/recipe.yaml b/recipes/ros-jazzy-rcutils/recipe.yaml new file mode 100644 index 00000000..3a3a0620 --- /dev/null +++ b/recipes/ros-jazzy-rcutils/recipe.yaml @@ -0,0 +1,96 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rcutils + version: 6.7.2 +source: + git: https://github.com/ros2-gbp/rcutils-release.git + tag: release/jazzy/rcutils/6.7.2-1 + target_directory: ros-jazzy-rcutils/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - empy + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-launch + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-mimick-vendor + - ros-jazzy-osrf-testing-tools-cpp + - ros-jazzy-performance-test-fixture + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-realtime-tools/bld_ament_cmake.bat b/recipes/ros-jazzy-realtime-tools/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-realtime-tools/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-realtime-tools/build_ament_cmake.sh b/recipes/ros-jazzy-realtime-tools/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-realtime-tools/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-realtime-tools/patch/ros-jazzy-realtime-tools.osx.patch b/recipes/ros-jazzy-realtime-tools/patch/ros-jazzy-realtime-tools.osx.patch new file mode 100644 index 00000000..b3a1736f --- /dev/null +++ b/recipes/ros-jazzy-realtime-tools/patch/ros-jazzy-realtime-tools.osx.patch @@ -0,0 +1,82 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5a9be70..9141953 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,7 +40,7 @@ target_include_directories(realtime_tools PUBLIC + $ + ) + ament_target_dependencies(realtime_tools PUBLIC ${THIS_PACKAGE_INCLUDE_DEPENDS}) +-if(UNIX) ++if(UNIX AND NOT APPLE) + target_link_libraries(realtime_tools PUBLIC cap) + endif() + +@@ -54,7 +54,7 @@ target_include_directories(thread_priority PUBLIC + $ + ) + ament_target_dependencies(thread_priority PUBLIC ${THIS_PACKAGE_INCLUDE_DEPENDS}) +-if(UNIX) ++if(UNIX AND NOT APPLE) + target_link_libraries(thread_priority PUBLIC cap) + endif() + +diff --git a/src/realtime_helpers.cpp b/src/realtime_helpers.cpp +index e55894c..e75e4c8 100644 +--- a/src/realtime_helpers.cpp ++++ b/src/realtime_helpers.cpp +@@ -30,12 +30,15 @@ + + #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) + #include +-#include + #include + + #include + #endif + ++#if defined(__unix__) ++#include ++#endif ++ + #include + #include + +@@ -56,6 +59,19 @@ bool configure_sched_fifo(int priority) + #ifdef _WIN32 + HANDLE thread = GetCurrentThread(); + return SetThreadPriority(thread, priority); ++#elif defined(__APPLE__) ++ pthread_t thread = pthread_self(); ++ struct sched_param schedp; ++ memset(&schedp, 0, sizeof(schedp)); ++ schedp.sched_priority = priority; ++ ++ int policy = SCHED_FIFO; ++ if (pthread_setschedparam(thread, policy, &schedp) == 0) { ++ return true; ++ } else { ++ // Optionally log strerror(errno) for debugging ++ return false; ++ } + #else + struct sched_param schedp; + memset(&schedp, 0, sizeof(schedp)); +@@ -75,6 +91,8 @@ std::pair lock_memory() + { + #ifdef _WIN32 + return {false, "Memory locking is not supported on Windows."}; ++#elif defined(__APPLE__) ++ return {false, "Memory locking is not supported on MacOS."}; + #else + auto is_capable = [](cap_value_t v) -> bool { + bool rc = false; +@@ -127,6 +145,9 @@ std::pair set_thread_affinity( + #ifdef _WIN32 + message = "Thread affinity is not supported on Windows."; + return std::make_pair(false, message); ++#elif defined(__APPLE__) ++ message = "Memory locking is not supported on MacOS."; ++ return std::make_pair(false, message); + #else + auto set_affinity_result_message = [](int result, std::string & msg) -> bool { + if (result == 0) { diff --git a/recipes/ros-jazzy-realtime-tools/recipe.yaml b/recipes/ros-jazzy-realtime-tools/recipe.yaml new file mode 100644 index 00000000..bf72e4d8 --- /dev/null +++ b/recipes/ros-jazzy-realtime-tools/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-realtime-tools + version: 3.1.0 +source: + git: https://github.com/ros2-gbp/realtime_tools-release.git + tag: release/jazzy/realtime_tools/3.1.0-1 + target_directory: ros-jazzy-realtime-tools/src/work + patches: + - patch/ros-jazzy-realtime-tools.osx.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-lifecycle-msgs + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-resource-retriever/bld_ament_cmake.bat b/recipes/ros-jazzy-resource-retriever/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-resource-retriever/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-resource-retriever/build_ament_cmake.sh b/recipes/ros-jazzy-resource-retriever/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-resource-retriever/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-resource-retriever/recipe.yaml b/recipes/ros-jazzy-resource-retriever/recipe.yaml new file mode 100644 index 00000000..9c6f1e2e --- /dev/null +++ b/recipes/ros-jazzy-resource-retriever/recipe.yaml @@ -0,0 +1,96 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-resource-retriever + version: 3.4.3 +source: + git: https://github.com/ros2-gbp/resource_retriever-release.git + tag: release/jazzy/resource_retriever/3.4.3-1 + target_directory: ros-jazzy-resource-retriever/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-index-cpp + - ros-jazzy-ament-index-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-libcurl-vendor + - ros-jazzy-python-cmake-module + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-index-cpp + - ros-jazzy-ament-index-python + - ros-jazzy-libcurl-vendor + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rmw-connextdds-common/bld_ament_cmake.bat b/recipes/ros-jazzy-rmw-connextdds-common/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rmw-connextdds-common/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rmw-connextdds-common/build_ament_cmake.sh b/recipes/ros-jazzy-rmw-connextdds-common/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rmw-connextdds-common/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rmw-connextdds-common/recipe.yaml b/recipes/ros-jazzy-rmw-connextdds-common/recipe.yaml new file mode 100644 index 00000000..a7fb121e --- /dev/null +++ b/recipes/ros-jazzy-rmw-connextdds-common/recipe.yaml @@ -0,0 +1,114 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rmw-connextdds-common + version: 0.22.0 +source: + git: https://github.com/ros2-gbp/rmw_connextdds-release.git + tag: release/jazzy/rmw_connextdds_common/0.22.0-2 + target_directory: ros-jazzy-rmw-connextdds-common/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-fastcdr + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-dds-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-fastrtps-c + - ros-jazzy-rosidl-typesupport-fastrtps-cpp + - ros-jazzy-rosidl-typesupport-introspection-c + - ros-jazzy-rosidl-typesupport-introspection-cpp + - ros-jazzy-rti-connext-dds-cmake-module + - ros-jazzy-tracetools + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake + - ros-jazzy-fastcdr + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-dds-common + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-fastrtps-c + - ros-jazzy-rosidl-typesupport-fastrtps-cpp + - ros-jazzy-rosidl-typesupport-introspection-c + - ros-jazzy-rosidl-typesupport-introspection-cpp + - ros-jazzy-rti-connext-dds-cmake-module + - ros-jazzy-tracetools + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rmw-connextdds/bld_ament_cmake.bat b/recipes/ros-jazzy-rmw-connextdds/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rmw-connextdds/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rmw-connextdds/build_ament_cmake.sh b/recipes/ros-jazzy-rmw-connextdds/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rmw-connextdds/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rmw-connextdds/recipe.yaml b/recipes/ros-jazzy-rmw-connextdds/recipe.yaml new file mode 100644 index 00000000..c24179cf --- /dev/null +++ b/recipes/ros-jazzy-rmw-connextdds/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rmw-connextdds + version: 0.22.0 +source: + git: https://github.com/ros2-gbp/rmw_connextdds-release.git + tag: release/jazzy/rmw_connextdds/0.22.0-2 + target_directory: ros-jazzy-rmw-connextdds/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rmw-connextdds-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake + - ros-jazzy-rmw-connextdds-common + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rmw-cyclonedds-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-rmw-cyclonedds-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rmw-cyclonedds-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rmw-cyclonedds-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-rmw-cyclonedds-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rmw-cyclonedds-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rmw-cyclonedds-cpp/recipe.yaml b/recipes/ros-jazzy-rmw-cyclonedds-cpp/recipe.yaml new file mode 100644 index 00000000..353da8c3 --- /dev/null +++ b/recipes/ros-jazzy-rmw-cyclonedds-cpp/recipe.yaml @@ -0,0 +1,109 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rmw-cyclonedds-cpp + version: 2.2.2 +source: + git: https://github.com/ros2-gbp/rmw_cyclonedds-release.git + tag: release/jazzy/rmw_cyclonedds_cpp/2.2.2-1 + target_directory: ros-jazzy-rmw-cyclonedds-cpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - if: build_platform != target_platform + then: + - ros-jazzy-cyclonedds + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-cyclonedds + - ros-jazzy-iceoryx-binding-c + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-dds-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-typesupport-introspection-c + - ros-jazzy-rosidl-typesupport-introspection-cpp + - ros-jazzy-tracetools + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-cyclonedds + - ros-jazzy-iceoryx-binding-c + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-dds-common + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-typesupport-introspection-c + - ros-jazzy-rosidl-typesupport-introspection-cpp + - ros-jazzy-tracetools + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rmw-dds-common/bld_ament_cmake.bat b/recipes/ros-jazzy-rmw-dds-common/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rmw-dds-common/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rmw-dds-common/build_ament_cmake.sh b/recipes/ros-jazzy-rmw-dds-common/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rmw-dds-common/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rmw-dds-common/recipe.yaml b/recipes/ros-jazzy-rmw-dds-common/recipe.yaml new file mode 100644 index 00000000..056fb9fb --- /dev/null +++ b/recipes/ros-jazzy-rmw-dds-common/recipe.yaml @@ -0,0 +1,101 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rmw-dds-common + version: 3.1.0 +source: + git: https://github.com/ros2-gbp/rmw_dds_common-release.git + tag: release/jazzy/rmw_dds_common/3.1.0-2 + target_directory: ros-jazzy-rmw-dds-common/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-osrf-testing-tools-cpp + - ros-jazzy-performance-test-fixture + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rmw-fastrtps-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-rmw-fastrtps-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rmw-fastrtps-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rmw-fastrtps-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-rmw-fastrtps-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rmw-fastrtps-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rmw-fastrtps-cpp/recipe.yaml b/recipes/ros-jazzy-rmw-fastrtps-cpp/recipe.yaml new file mode 100644 index 00000000..827104df --- /dev/null +++ b/recipes/ros-jazzy-rmw-fastrtps-cpp/recipe.yaml @@ -0,0 +1,121 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rmw-fastrtps-cpp + version: 8.4.1 +source: + git: https://github.com/ros2-gbp/rmw_fastrtps-release.git + tag: release/jazzy/rmw_fastrtps_cpp/8.4.1-1 + target_directory: ros-jazzy-rmw-fastrtps-cpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-fastcdr + - ros-jazzy-fastrtps + - ros-jazzy-fastrtps-cmake-module + - ros-jazzy-osrf-testing-tools-cpp + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-dds-common + - ros-jazzy-rmw-fastrtps-shared-cpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-dynamic-typesupport + - ros-jazzy-rosidl-dynamic-typesupport-fastrtps + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-fastrtps-c + - ros-jazzy-rosidl-typesupport-fastrtps-cpp + - ros-jazzy-test-msgs + - ros-jazzy-tracetools + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake + - ros-jazzy-fastcdr + - ros-jazzy-fastrtps + - ros-jazzy-fastrtps-cmake-module + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-dds-common + - ros-jazzy-rmw-fastrtps-shared-cpp + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-dynamic-typesupport + - ros-jazzy-rosidl-dynamic-typesupport-fastrtps + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-fastrtps-c + - ros-jazzy-rosidl-typesupport-fastrtps-cpp + - ros-jazzy-tracetools + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rmw-fastrtps-dynamic-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-rmw-fastrtps-dynamic-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rmw-fastrtps-dynamic-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rmw-fastrtps-dynamic-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-rmw-fastrtps-dynamic-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rmw-fastrtps-dynamic-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rmw-fastrtps-dynamic-cpp/recipe.yaml b/recipes/ros-jazzy-rmw-fastrtps-dynamic-cpp/recipe.yaml new file mode 100644 index 00000000..a9bffeb8 --- /dev/null +++ b/recipes/ros-jazzy-rmw-fastrtps-dynamic-cpp/recipe.yaml @@ -0,0 +1,113 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rmw-fastrtps-dynamic-cpp + version: 8.4.1 +source: + git: https://github.com/ros2-gbp/rmw_fastrtps-release.git + tag: release/jazzy/rmw_fastrtps_dynamic_cpp/8.4.1-1 + target_directory: ros-jazzy-rmw-fastrtps-dynamic-cpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-fastcdr + - ros-jazzy-fastrtps + - ros-jazzy-fastrtps-cmake-module + - ros-jazzy-osrf-testing-tools-cpp + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-dds-common + - ros-jazzy-rmw-fastrtps-shared-cpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-typesupport-introspection-c + - ros-jazzy-rosidl-typesupport-introspection-cpp + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake + - ros-jazzy-fastcdr + - ros-jazzy-fastrtps + - ros-jazzy-fastrtps-cmake-module + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-dds-common + - ros-jazzy-rmw-fastrtps-shared-cpp + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-typesupport-introspection-c + - ros-jazzy-rosidl-typesupport-introspection-cpp + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rmw-fastrtps-shared-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-rmw-fastrtps-shared-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rmw-fastrtps-shared-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rmw-fastrtps-shared-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-rmw-fastrtps-shared-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rmw-fastrtps-shared-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rmw-fastrtps-shared-cpp/recipe.yaml b/recipes/ros-jazzy-rmw-fastrtps-shared-cpp/recipe.yaml new file mode 100644 index 00000000..5b1155dd --- /dev/null +++ b/recipes/ros-jazzy-rmw-fastrtps-shared-cpp/recipe.yaml @@ -0,0 +1,112 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rmw-fastrtps-shared-cpp + version: 8.4.1 +source: + git: https://github.com/ros2-gbp/rmw_fastrtps-release.git + tag: release/jazzy/rmw_fastrtps_shared_cpp/8.4.1-1 + target_directory: ros-jazzy-rmw-fastrtps-shared-cpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-fastcdr + - ros-jazzy-fastrtps + - ros-jazzy-fastrtps-cmake-module + - ros-jazzy-osrf-testing-tools-cpp + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-dds-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-dynamic-typesupport + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-typesupport-introspection-c + - ros-jazzy-rosidl-typesupport-introspection-cpp + - ros-jazzy-tracetools + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake + - ros-jazzy-fastcdr + - ros-jazzy-fastrtps + - ros-jazzy-fastrtps-cmake-module + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-dds-common + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-dynamic-typesupport + - ros-jazzy-rosidl-typesupport-introspection-c + - ros-jazzy-rosidl-typesupport-introspection-cpp + - ros-jazzy-tracetools + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rmw-implementation-cmake/bld_ament_cmake.bat b/recipes/ros-jazzy-rmw-implementation-cmake/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rmw-implementation-cmake/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rmw-implementation-cmake/build_ament_cmake.sh b/recipes/ros-jazzy-rmw-implementation-cmake/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rmw-implementation-cmake/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rmw-implementation-cmake/recipe.yaml b/recipes/ros-jazzy-rmw-implementation-cmake/recipe.yaml new file mode 100644 index 00000000..b604a93d --- /dev/null +++ b/recipes/ros-jazzy-rmw-implementation-cmake/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rmw-implementation-cmake + version: 7.3.1 +source: + git: https://github.com/ros2-gbp/rmw-release.git + tag: release/jazzy/rmw_implementation_cmake/7.3.1-1 + target_directory: ros-jazzy-rmw-implementation-cmake/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rmw-implementation/bld_ament_cmake.bat b/recipes/ros-jazzy-rmw-implementation/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rmw-implementation/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rmw-implementation/build_ament_cmake.sh b/recipes/ros-jazzy-rmw-implementation/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rmw-implementation/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rmw-implementation/recipe.yaml b/recipes/ros-jazzy-rmw-implementation/recipe.yaml new file mode 100644 index 00000000..64c26d06 --- /dev/null +++ b/recipes/ros-jazzy-rmw-implementation/recipe.yaml @@ -0,0 +1,105 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rmw-implementation + version: 2.15.4 +source: + git: https://github.com/ros2-gbp/rmw_implementation-release.git + tag: release/jazzy/rmw_implementation/2.15.4-1 + target_directory: ros-jazzy-rmw-implementation/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-index-cpp + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-performance-test-fixture + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-connextdds + - ros-jazzy-rmw-cyclonedds-cpp + - ros-jazzy-rmw-fastrtps-cpp + - ros-jazzy-rmw-fastrtps-dynamic-cpp + - ros-jazzy-rmw-implementation-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-index-cpp + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw-connextdds + - ros-jazzy-rmw-cyclonedds-cpp + - ros-jazzy-rmw-fastrtps-cpp + - ros-jazzy-rmw-fastrtps-dynamic-cpp + - ros-jazzy-rmw-implementation-cmake + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rmw/bld_ament_cmake.bat b/recipes/ros-jazzy-rmw/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rmw/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rmw/build_ament_cmake.sh b/recipes/ros-jazzy-rmw/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rmw/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rmw/recipe.yaml b/recipes/ros-jazzy-rmw/recipe.yaml new file mode 100644 index 00000000..cce24bae --- /dev/null +++ b/recipes/ros-jazzy-rmw/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rmw + version: 7.3.1 +source: + git: https://github.com/ros2-gbp/rmw-release.git + tag: release/jazzy/rmw/7.3.1-1 + target_directory: ros-jazzy-rmw/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-cmake-version + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-osrf-testing-tools-cpp + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-dynamic-typesupport + - ros-jazzy-rosidl-runtime-c + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-dynamic-typesupport + - ros-jazzy-rosidl-runtime-c + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-robot-localization/bld_ament_cmake.bat b/recipes/ros-jazzy-robot-localization/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-robot-localization/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-robot-localization/build_ament_cmake.sh b/recipes/ros-jazzy-robot-localization/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-robot-localization/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-robot-localization/recipe.yaml b/recipes/ros-jazzy-robot-localization/recipe.yaml new file mode 100644 index 00000000..27ab39b4 --- /dev/null +++ b/recipes/ros-jazzy-robot-localization/recipe.yaml @@ -0,0 +1,132 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-robot-localization + version: 3.8.1 +source: + git: https://github.com/ros2-gbp/robot_localization-release.git + tag: release/jazzy/robot_localization/3.8.1-1 + target_directory: ros-jazzy-robot-localization/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - geographiclib-cpp + - libboost-devel + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-angles + - ros-jazzy-builtin-interfaces + - ros-jazzy-diagnostic-msgs + - ros-jazzy-diagnostic-updater + - ros-jazzy-geographic-msgs + - ros-jazzy-geometry-msgs + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-message-filters + - ros-jazzy-nav-msgs + - ros-jazzy-rclcpp + - ros-jazzy-rmw-implementation + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + run: + - eigen + - geographiclib-cpp + - libboost-devel + - python + - ros-jazzy-angles + - ros-jazzy-diagnostic-msgs + - ros-jazzy-diagnostic-updater + - ros-jazzy-geographic-msgs + - ros-jazzy-geometry-msgs + - ros-jazzy-message-filters + - ros-jazzy-nav-msgs + - ros-jazzy-rclcpp + - ros-jazzy-rmw-implementation + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-tf2 + - ros-jazzy-tf2-eigen + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-robot-state-publisher/bld_ament_cmake.bat b/recipes/ros-jazzy-robot-state-publisher/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-robot-state-publisher/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-robot-state-publisher/build_ament_cmake.sh b/recipes/ros-jazzy-robot-state-publisher/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-robot-state-publisher/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-robot-state-publisher/recipe.yaml b/recipes/ros-jazzy-robot-state-publisher/recipe.yaml new file mode 100644 index 00000000..20fecb7c --- /dev/null +++ b/recipes/ros-jazzy-robot-state-publisher/recipe.yaml @@ -0,0 +1,111 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-robot-state-publisher + version: 3.3.3 +source: + git: https://github.com/ros2-gbp/robot_state_publisher-release.git + tag: release/jazzy/robot_state_publisher/3.3.3-3 + target_directory: ros-jazzy-robot-state-publisher/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-kdl-parser + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-orocos-kdl-vendor + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-urdf + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-kdl-parser + - ros-jazzy-orocos-kdl-vendor + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-urdf + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros-base/bld_ament_cmake.bat b/recipes/ros-jazzy-ros-base/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ros-base/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros-base/build_ament_cmake.sh b/recipes/ros-jazzy-ros-base/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ros-base/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ros-base/recipe.yaml b/recipes/ros-jazzy-ros-base/recipe.yaml new file mode 100644 index 00000000..65f92976 --- /dev/null +++ b/recipes/ros-jazzy-ros-base/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros-base + version: 0.11.0 +source: + git: https://github.com/ros2-gbp/variants-release.git + tag: release/jazzy/ros_base/0.11.0-1 + target_directory: ros-jazzy-ros-base/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-geometry2 + - ros-jazzy-kdl-parser + - ros-jazzy-robot-state-publisher + - ros-jazzy-ros-core + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2 + - ros-jazzy-urdf + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros-core/bld_ament_cmake.bat b/recipes/ros-jazzy-ros-core/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ros-core/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros-core/build_ament_cmake.sh b/recipes/ros-jazzy-ros-core/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ros-core/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ros-core/recipe.yaml b/recipes/ros-jazzy-ros-core/recipe.yaml new file mode 100644 index 00000000..bfdcbdd2 --- /dev/null +++ b/recipes/ros-jazzy-ros-core/recipe.yaml @@ -0,0 +1,116 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros-core + version: 0.11.0 +source: + git: https://github.com/ros2-gbp/variants-release.git + tag: release/jazzy/ros_core/0.11.0-1 + target_directory: ros-jazzy-ros-core/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-auto + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-index-cpp + - ros-jazzy-ament-index-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-class-loader + - ros-jazzy-common-interfaces + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-launch-testing-ros + - ros-jazzy-launch-xml + - ros-jazzy-launch-yaml + - ros-jazzy-pluginlib + - ros-jazzy-rcl-lifecycle + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-rclpy + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli-common-extensions + - ros-jazzy-ros2launch + - ros-jazzy-rosidl-default-generators + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-sros2 + - ros-jazzy-sros2-cmake + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros-environment/bld_ament_cmake.bat b/recipes/ros-jazzy-ros-environment/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ros-environment/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros-environment/build_ament_cmake.sh b/recipes/ros-jazzy-ros-environment/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ros-environment/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ros-environment/recipe.yaml b/recipes/ros-jazzy-ros-environment/recipe.yaml new file mode 100644 index 00000000..54f7f7a9 --- /dev/null +++ b/recipes/ros-jazzy-ros-environment/recipe.yaml @@ -0,0 +1,81 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros-environment + version: 4.2.1 +source: + git: https://github.com/ros2-gbp/ros_environment-release.git + tag: release/jazzy/ros_environment/4.2.1-1 + target_directory: ros-jazzy-ros-environment/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros-gz-bridge/bld_ament_cmake.bat b/recipes/ros-jazzy-ros-gz-bridge/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz-bridge/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros-gz-bridge/build_ament_cmake.sh b/recipes/ros-jazzy-ros-gz-bridge/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz-bridge/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ros-gz-bridge/recipe.yaml b/recipes/ros-jazzy-ros-gz-bridge/recipe.yaml new file mode 100644 index 00000000..86ee02c8 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz-bridge/recipe.yaml @@ -0,0 +1,128 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros-gz-bridge + version: 1.0.7 +source: + git: https://github.com/ros2-gbp/ros_ign-release.git + tag: release/jazzy/ros_gz_bridge/1.0.7-1 + target_directory: ros-jazzy-ros-gz-bridge/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pkg-config + - python + - ros-jazzy-actuator-msgs + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-gps-msgs + - ros-jazzy-gz-msgs-vendor + - ros-jazzy-gz-transport-vendor + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-nav-msgs + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-gz-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosgraph-msgs + - ros-jazzy-rosidl-pycommon + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-tf2-msgs + - ros-jazzy-trajectory-msgs + - ros-jazzy-vision-msgs + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-actuator-msgs + - ros-jazzy-geometry-msgs + - ros-jazzy-gps-msgs + - ros-jazzy-gz-msgs-vendor + - ros-jazzy-gz-transport-vendor + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-nav-msgs + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-gz-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosgraph-msgs + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-tf2-msgs + - ros-jazzy-trajectory-msgs + - ros-jazzy-vision-msgs + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros-gz-image/bld_ament_cmake.bat b/recipes/ros-jazzy-ros-gz-image/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz-image/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros-gz-image/build_ament_cmake.sh b/recipes/ros-jazzy-ros-gz-image/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz-image/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ros-gz-image/patch/ros-jazzy-ros-gz-image.patch b/recipes/ros-jazzy-ros-gz-image/patch/ros-jazzy-ros-gz-image.patch new file mode 100644 index 00000000..27945782 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz-image/patch/ros-jazzy-ros-gz-image.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e6e8de26..8e9ea2d3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -10,6 +10,9 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall -Wextra) + endif() + ++find_package(gz-cmake3 REQUIRED 3.5.2) ++gz_find_package(TINYXML2 REQUIRED PRIVATE PRETTY tinyxml2) ++ + find_package(ament_cmake REQUIRED) + find_package(image_transport REQUIRED) + find_package(ros_gz_bridge REQUIRED) diff --git a/recipes/ros-jazzy-ros-gz-image/recipe.yaml b/recipes/ros-jazzy-ros-gz-image/recipe.yaml new file mode 100644 index 00000000..b0d94668 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz-image/recipe.yaml @@ -0,0 +1,101 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros-gz-image + version: 1.0.7 +source: + git: https://github.com/ros2-gbp/ros_ign-release.git + tag: release/jazzy/ros_gz_image/1.0.7-1 + target_directory: ros-jazzy-ros-gz-image/src/work + patches: + - patch/ros-jazzy-ros-gz-image.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pkg-config + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-gz-msgs-vendor + - ros-jazzy-gz-transport-vendor + - ros-jazzy-image-transport + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-gz-bridge + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-gz-msgs-vendor + - ros-jazzy-gz-transport-vendor + - ros-jazzy-image-transport + - ros-jazzy-rclcpp + - ros-jazzy-ros-gz-bridge + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros-gz-interfaces/bld_ament_cmake.bat b/recipes/ros-jazzy-ros-gz-interfaces/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz-interfaces/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros-gz-interfaces/build_ament_cmake.sh b/recipes/ros-jazzy-ros-gz-interfaces/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz-interfaces/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ros-gz-interfaces/recipe.yaml b/recipes/ros-jazzy-ros-gz-interfaces/recipe.yaml new file mode 100644 index 00000000..933dd133 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz-interfaces/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros-gz-interfaces + version: 1.0.7 +source: + git: https://github.com/ros2-gbp/ros_ign-release.git + tag: release/jazzy/ros_gz_interfaces/1.0.7-1 + target_directory: ros-jazzy-ros-gz-interfaces/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-rcl-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-rcl-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros-gz-sim-demos/bld_ament_cmake.bat b/recipes/ros-jazzy-ros-gz-sim-demos/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz-sim-demos/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros-gz-sim-demos/build_ament_cmake.sh b/recipes/ros-jazzy-ros-gz-sim-demos/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz-sim-demos/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ros-gz-sim-demos/recipe.yaml b/recipes/ros-jazzy-ros-gz-sim-demos/recipe.yaml new file mode 100644 index 00000000..100a07fa --- /dev/null +++ b/recipes/ros-jazzy-ros-gz-sim-demos/recipe.yaml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros-gz-sim-demos + version: 1.0.7 +source: + git: https://github.com/ros2-gbp/ros_ign-release.git + tag: release/jazzy/ros_gz_sim_demos/1.0.7-1 + target_directory: ros-jazzy-ros-gz-sim-demos/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-gz-sim-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-gz-sim-vendor + - ros-jazzy-image-transport-plugins + - ros-jazzy-robot-state-publisher + - ros-jazzy-ros-gz-bridge + - ros-jazzy-ros-gz-image + - ros-jazzy-ros-gz-sim + - ros-jazzy-ros-workspace + - ros-jazzy-rqt-image-view + - ros-jazzy-rqt-plot + - ros-jazzy-rqt-topic + - ros-jazzy-rviz2 + - ros-jazzy-sdformat-urdf + - ros-jazzy-xacro + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros-gz-sim/bld_ament_cmake.bat b/recipes/ros-jazzy-ros-gz-sim/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz-sim/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros-gz-sim/build_ament_cmake.sh b/recipes/ros-jazzy-ros-gz-sim/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz-sim/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ros-gz-sim/recipe.yaml b/recipes/ros-jazzy-ros-gz-sim/recipe.yaml new file mode 100644 index 00000000..1b84dcb9 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz-sim/recipe.yaml @@ -0,0 +1,123 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros-gz-sim + version: 1.0.7 +source: + git: https://github.com/ros2-gbp/ros_ign-release.git + tag: release/jazzy/ros_gz_sim/1.0.7-1 + target_directory: ros-jazzy-ros-gz-sim/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - gflags + - numpy + - pip + - pkg-config + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-index-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-msgs-vendor + - ros-jazzy-gz-sim-vendor + - ros-jazzy-gz-transport-vendor + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - gflags + - python + - ros-jazzy-ament-index-python + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-msgs-vendor + - ros-jazzy-gz-sim-vendor + - ros-jazzy-gz-transport-vendor + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-ros-gz/bld_ament_cmake.bat b/recipes/ros-jazzy-ros-gz/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros-gz/build_ament_cmake.sh b/recipes/ros-jazzy-ros-gz/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ros-gz/recipe.yaml b/recipes/ros-jazzy-ros-gz/recipe.yaml new file mode 100644 index 00000000..3508f343 --- /dev/null +++ b/recipes/ros-jazzy-ros-gz/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros-gz + version: 1.0.7 +source: + git: https://github.com/ros2-gbp/ros_ign-release.git + tag: release/jazzy/ros_gz/1.0.7-1 + target_directory: ros-jazzy-ros-gz/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-gz-bridge + - ros-jazzy-ros-gz-image + - ros-jazzy-ros-gz-sim + - ros-jazzy-ros-gz-sim-demos + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros-industrial-cmake-boilerplate/bld_catkin.bat b/recipes/ros-jazzy-ros-industrial-cmake-boilerplate/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-ros-industrial-cmake-boilerplate/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-ros-industrial-cmake-boilerplate/build_catkin.sh b/recipes/ros-jazzy-ros-industrial-cmake-boilerplate/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-ros-industrial-cmake-boilerplate/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-ros-industrial-cmake-boilerplate/recipe.yaml b/recipes/ros-jazzy-ros-industrial-cmake-boilerplate/recipe.yaml new file mode 100644 index 00000000..e481251d --- /dev/null +++ b/recipes/ros-jazzy-ros-industrial-cmake-boilerplate/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros-industrial-cmake-boilerplate + version: 0.5.4 +source: + git: https://github.com/ros2-gbp/ros_industrial_cmake_boilerplate-release.git + tag: release/jazzy/ros_industrial_cmake_boilerplate/0.5.4-3 + target_directory: ros-jazzy-ros-industrial-cmake-boilerplate/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - cppcheck + - gtest + - lcov + - libclang + - numpy + - pip + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros-testing/bld_ament_cmake.bat b/recipes/ros-jazzy-ros-testing/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ros-testing/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros-testing/build_ament_cmake.sh b/recipes/ros-jazzy-ros-testing/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ros-testing/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ros-testing/recipe.yaml b/recipes/ros-jazzy-ros-testing/recipe.yaml new file mode 100644 index 00000000..0c9088a4 --- /dev/null +++ b/recipes/ros-jazzy-ros-testing/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros-testing + version: 0.6.0 +source: + git: https://github.com/ros2-gbp/ros_testing-release.git + tag: release/jazzy/ros_testing/0.6.0-3 + target_directory: ros-jazzy-ros-testing/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-export-dependencies + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-launch-testing-ros + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-ros2test + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-launch-testing-ros + - ros-jazzy-ros-workspace + - ros-jazzy-ros2test + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros-workspace/activate.bat b/recipes/ros-jazzy-ros-workspace/activate.bat new file mode 100644 index 00000000..48ff1d71 --- /dev/null +++ b/recipes/ros-jazzy-ros-workspace/activate.bat @@ -0,0 +1,15 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +@if not defined CONDA_PREFIX goto:eof + +@REM Don't do anything when we are in conda build. +@if defined SYS_PREFIX exit /b 0 + +@set "QT_PLUGIN_PATH=%CONDA_PREFIX%\Library\plugins" + +@call "%CONDA_PREFIX%\Library\local_setup.bat" +@set PYTHONHOME= +@set "ROS_OS_OVERRIDE=conda:win64" +@set "ROS_ETC_DIR=%CONDA_PREFIX%\Library\etc\ros" +@set "AMENT_PREFIX_PATH=%CONDA_PREFIX%\Library" +@set "AMENT_PYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe" diff --git a/recipes/ros-jazzy-ros-workspace/activate.ps1 b/recipes/ros-jazzy-ros-workspace/activate.ps1 new file mode 100644 index 00000000..137e67ae --- /dev/null +++ b/recipes/ros-jazzy-ros-workspace/activate.ps1 @@ -0,0 +1,16 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! +if ($null -eq ${env:CONDA_PREFIX}) { Exit } + +# Don't do anything when we are in conda build. +if ($null -ne ${env:SYS_PREFIX}) { Exit 0 } + +$Env:QT_PLUGIN_PATH="${env:CONDA_PREFIX}\Library\plugins" + +& "${env:CONDA_PREFIX}\Library\local_setup.ps1" + +$Env:PYTHONHOME='' +$Env:ROS_OS_OVERRIDE='conda:win64' +$Env:ROS_ETC_DIR="${env:CONDA_PREFIX}\Library\etc\ros" +$Env:AMENT_PREFIX_PATH="${env:CONDA_PREFIX}\Library" +$Env:AMENT_PYTHON_EXECUTABLE="${env:CONDA_PREFIX}\python.exe" diff --git a/recipes/ros-jazzy-ros-workspace/activate.sh b/recipes/ros-jazzy-ros-workspace/activate.sh new file mode 100644 index 00000000..aece9708 --- /dev/null +++ b/recipes/ros-jazzy-ros-workspace/activate.sh @@ -0,0 +1,26 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! +# if [ -z "${CONDA_PREFIX}" ]; then +# exit 0; +# fi + +# Not sure if this is necessary on UNIX? +# export QT_PLUGIN_PATH=$CONDA_PREFIX\plugins + +if [ "$CONDA_BUILD" = "1" -a "$target_platform" != "$build_platform" ]; then + # ignore sourcing + echo "Not activating ROS when cross-compiling"; +else + source $CONDA_PREFIX/setup.sh +fi + +case "$OSTYPE" in + darwin*) export ROS_OS_OVERRIDE="conda:osx"; export RMW_IMPLEMENTATION="rmw_cyclonedds_cpp";; + linux*) export ROS_OS_OVERRIDE="conda:linux";; +esac + +export ROS_ETC_DIR=$CONDA_PREFIX/etc/ros +export AMENT_PREFIX_PATH=$CONDA_PREFIX + +# Looks unnecessary for UNIX +# unset PYTHONHOME= diff --git a/recipes/ros-jazzy-ros-workspace/bld_catkin.bat b/recipes/ros-jazzy-ros-workspace/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-ros-workspace/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-ros-workspace/build_catkin.sh b/recipes/ros-jazzy-ros-workspace/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-ros-workspace/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-ros-workspace/deactivate.bat b/recipes/ros-jazzy-ros-workspace/deactivate.bat new file mode 100644 index 00000000..6de79cca --- /dev/null +++ b/recipes/ros-jazzy-ros-workspace/deactivate.bat @@ -0,0 +1,18 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +@if not defined CONDA_PREFIX goto:eof + +@set ROS_OS_OVERRIDE= +@set ROS_DISTRO= +@set ROS_ETC_DIR= +@set ROS_PACKAGE_PATH= +@set ROS_PYTHON_VERSION= +@set ROS_VERSION= +@set PYTHONHOME= +@set PYTHONPATH= +@set CMAKE_PREFIX_PATH= +@set AMENT_PREFIX_PATH= +@set COLCON_PREFIX_PATH= +@set QT_PLUGIN_PATH= +@set ROS_LOCALHOST_ONLY= +@set ament_python_executable= diff --git a/recipes/ros-jazzy-ros-workspace/deactivate.ps1 b/recipes/ros-jazzy-ros-workspace/deactivate.ps1 new file mode 100644 index 00000000..9db51e1c --- /dev/null +++ b/recipes/ros-jazzy-ros-workspace/deactivate.ps1 @@ -0,0 +1,18 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! +if ($null -eq ${env:CONDA_PREFIX}) { Exit } + +$Env:ROS_OS_OVERRIDE='' +$Env:ROS_DISTRO='' +$Env:ROS_ETC_DIR='' +$Env:ROS_PACKAGE_PATH='' +$Env:ROS_PYTHON_VERSION='' +$Env:ROS_VERSION='' +$Env:PYTHONHOME='' +$Env:PYTHONPATH='' +$Env:CMAKE_PREFIX_PATH='' +$Env:AMENT_PREFIX_PATH='' +$Env:COLCON_PREFIX_PATH='' +$Env:QT_PLUGIN_PATH='' +$Env:ROS_LOCALHOST_ONLY='' +$Env:ament_python_executable='' diff --git a/recipes/ros-jazzy-ros-workspace/deactivate.sh b/recipes/ros-jazzy-ros-workspace/deactivate.sh new file mode 100644 index 00000000..87d4d835 --- /dev/null +++ b/recipes/ros-jazzy-ros-workspace/deactivate.sh @@ -0,0 +1,21 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! +if [ -z "${CONDA_PREFIX}" ]; then + exit 0 +fi + +unset ROS_DISTRO +unset ROS_ETC_DIR +unset ROS_PACKAGE_PATH +unset ROS_PYTHON_VERSION +unset CMAKE_PREFIX_PATH +unset AMENT_PREFIX_PATH +unset COLCON_PREFIX_PATH +unset ROS_VERSION +unset ROS_OS_OVERRIDE +# unset PYTHONPATH +# unset PYTHONHOME +# unset QT_PLUGIN_PATH +unset ROS_LOCALHOST_ONLY +unset ament_python_executable +unset RMW_IMPLEMENTATION diff --git a/recipes/ros-jazzy-ros-workspace/recipe.yaml b/recipes/ros-jazzy-ros-workspace/recipe.yaml new file mode 100644 index 00000000..77524cec --- /dev/null +++ b/recipes/ros-jazzy-ros-workspace/recipe.yaml @@ -0,0 +1,82 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros-workspace + version: 1.0.3 +source: + git: https://github.com/ros2-gbp/ros_workspace-release.git + tag: release/jazzy/ros_workspace/1.0.3-7 + target_directory: ros-jazzy-ros-workspace/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-package + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2-control-test-assets/bld_ament_cmake.bat b/recipes/ros-jazzy-ros2-control-test-assets/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ros2-control-test-assets/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2-control-test-assets/build_ament_cmake.sh b/recipes/ros-jazzy-ros2-control-test-assets/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ros2-control-test-assets/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ros2-control-test-assets/recipe.yaml b/recipes/ros-jazzy-ros2-control-test-assets/recipe.yaml new file mode 100644 index 00000000..2fc1f0b3 --- /dev/null +++ b/recipes/ros-jazzy-ros2-control-test-assets/recipe.yaml @@ -0,0 +1,84 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2-control-test-assets + version: 4.23.0 +source: + git: https://github.com/ros2-gbp/ros2_control-release.git + tag: release/jazzy/ros2_control_test_assets/4.23.0-1 + target_directory: ros-jazzy-ros2-control-test-assets/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2action/bld_ament_python.bat b/recipes/ros-jazzy-ros2action/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ros2action/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2action/build_ament_python.sh b/recipes/ros-jazzy-ros2action/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ros2action/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ros2action/recipe.yaml b/recipes/ros-jazzy-ros2action/recipe.yaml new file mode 100644 index 00000000..82d5b1f4 --- /dev/null +++ b/recipes/ros-jazzy-ros2action/recipe.yaml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2action + version: 0.32.2 +source: + git: https://github.com/ros2-gbp/ros2cli-release.git + tag: release/jazzy/ros2action/0.32.2-1 + target_directory: ros-jazzy-ros2action/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - pytest-timeout + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-xmllint + - ros-jazzy-launch + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ros + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-action-msgs + - ros-jazzy-ament-index-python + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros-jazzy-rosidl-runtime-py + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2bag/bld_ament_python.bat b/recipes/ros-jazzy-ros2bag/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ros2bag/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2bag/build_ament_python.sh b/recipes/ros-jazzy-ros2bag/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ros2bag/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ros2bag/recipe.yaml b/recipes/ros-jazzy-ros2bag/recipe.yaml new file mode 100644 index 00000000..658d70ad --- /dev/null +++ b/recipes/ros-jazzy-ros2bag/recipe.yaml @@ -0,0 +1,97 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2bag + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/ros2bag/0.26.6-1 + target_directory: ros-jazzy-ros2bag/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ros + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-storage-default-plugins + - ros-jazzy-rosbag2-test-common + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - pyyaml + - ros-jazzy-ament-index-python + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros-jazzy-rosbag2-py + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2cli-common-extensions/bld_ament_cmake.bat b/recipes/ros-jazzy-ros2cli-common-extensions/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ros2cli-common-extensions/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2cli-common-extensions/build_ament_cmake.sh b/recipes/ros-jazzy-ros2cli-common-extensions/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ros2cli-common-extensions/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ros2cli-common-extensions/recipe.yaml b/recipes/ros-jazzy-ros2cli-common-extensions/recipe.yaml new file mode 100644 index 00000000..62bb6ad4 --- /dev/null +++ b/recipes/ros-jazzy-ros2cli-common-extensions/recipe.yaml @@ -0,0 +1,103 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2cli-common-extensions + version: 0.3.0 +source: + git: https://github.com/ros2-gbp/ros2cli_common_extensions-release.git + tag: release/jazzy/ros2cli_common_extensions/0.3.0-3 + target_directory: ros-jazzy-ros2cli-common-extensions/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-launch-xml + - ros-jazzy-launch-yaml + - ros-jazzy-ros-workspace + - ros-jazzy-ros2action + - ros-jazzy-ros2cli + - ros-jazzy-ros2component + - ros-jazzy-ros2doctor + - ros-jazzy-ros2interface + - ros-jazzy-ros2launch + - ros-jazzy-ros2lifecycle + - ros-jazzy-ros2multicast + - ros-jazzy-ros2node + - ros-jazzy-ros2param + - ros-jazzy-ros2pkg + - ros-jazzy-ros2run + - ros-jazzy-ros2service + - ros-jazzy-ros2topic + - ros-jazzy-sros2 + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2cli-test-interfaces/bld_ament_cmake.bat b/recipes/ros-jazzy-ros2cli-test-interfaces/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ros2cli-test-interfaces/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2cli-test-interfaces/build_ament_cmake.sh b/recipes/ros-jazzy-ros2cli-test-interfaces/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ros2cli-test-interfaces/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ros2cli-test-interfaces/recipe.yaml b/recipes/ros-jazzy-ros2cli-test-interfaces/recipe.yaml new file mode 100644 index 00000000..aac0ac58 --- /dev/null +++ b/recipes/ros-jazzy-ros2cli-test-interfaces/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2cli-test-interfaces + version: 0.32.2 +source: + git: https://github.com/ros2-gbp/ros2cli-release.git + tag: release/jazzy/ros2cli_test_interfaces/0.32.2-1 + target_directory: ros-jazzy-ros2cli-test-interfaces/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2cli/bld_ament_python.bat b/recipes/ros-jazzy-ros2cli/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ros2cli/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2cli/build_ament_python.sh b/recipes/ros-jazzy-ros2cli/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ros2cli/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ros2cli/recipe.yaml b/recipes/ros-jazzy-ros2cli/recipe.yaml new file mode 100644 index 00000000..0a1604ff --- /dev/null +++ b/recipes/ros-jazzy-ros2cli/recipe.yaml @@ -0,0 +1,96 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2cli + version: 0.32.2 +source: + git: https://github.com/ros2-gbp/ros2cli-release.git + tag: release/jazzy/ros2cli/0.32.2-1 + target_directory: ros-jazzy-ros2cli/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - pytest-timeout + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-xmllint + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - argcomplete + - importlib-metadata + - packaging + - psutil + - python + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2component/bld_ament_python.bat b/recipes/ros-jazzy-ros2component/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ros2component/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2component/build_ament_python.sh b/recipes/ros-jazzy-ros2component/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ros2component/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ros2component/recipe.yaml b/recipes/ros-jazzy-ros2component/recipe.yaml new file mode 100644 index 00000000..80c0f3c7 --- /dev/null +++ b/recipes/ros-jazzy-ros2component/recipe.yaml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2component + version: 0.32.2 +source: + git: https://github.com/ros2-gbp/ros2cli-release.git + tag: release/jazzy/ros2component/0.32.2-1 + target_directory: ros-jazzy-ros2component/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - pytest-timeout + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-xmllint + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ament-index-python + - ros-jazzy-composition-interfaces + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp-components + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros-jazzy-ros2node + - ros-jazzy-ros2param + - ros-jazzy-ros2pkg + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2doctor/bld_ament_python.bat b/recipes/ros-jazzy-ros2doctor/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ros2doctor/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2doctor/build_ament_python.sh b/recipes/ros-jazzy-ros2doctor/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ros2doctor/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ros2doctor/recipe.yaml b/recipes/ros-jazzy-ros2doctor/recipe.yaml new file mode 100644 index 00000000..5855cd76 --- /dev/null +++ b/recipes/ros-jazzy-ros2doctor/recipe.yaml @@ -0,0 +1,104 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2doctor + version: 0.32.2 +source: + git: https://github.com/ros2-gbp/ros2cli-release.git + tag: release/jazzy/ros2doctor/0.32.2-1 + target_directory: ros-jazzy-ros2doctor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - pytest-timeout + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-xmllint + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ros + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - catkin_pkg + - importlib-metadata + - psutil + - python + - ros-jazzy-ament-index-python + - ros-jazzy-rclpy + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - rosdistro + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2interface/bld_ament_python.bat b/recipes/ros-jazzy-ros2interface/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ros2interface/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2interface/build_ament_python.sh b/recipes/ros-jazzy-ros2interface/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ros2interface/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ros2interface/recipe.yaml b/recipes/ros-jazzy-ros2interface/recipe.yaml new file mode 100644 index 00000000..aeb5ab59 --- /dev/null +++ b/recipes/ros-jazzy-ros2interface/recipe.yaml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2interface + version: 0.32.2 +source: + git: https://github.com/ros2-gbp/ros2cli-release.git + tag: release/jazzy/ros2interface/0.32.2-1 + target_directory: ros-jazzy-ros2interface/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - pytest-timeout + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-xmllint + - ros-jazzy-launch + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ros + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli-test-interfaces + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ament-index-python + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros-jazzy-rosidl-adapter + - ros-jazzy-rosidl-runtime-py + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2launch/bld_ament_python.bat b/recipes/ros-jazzy-ros2launch/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ros2launch/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2launch/build_ament_python.sh b/recipes/ros-jazzy-ros2launch/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ros2launch/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ros2launch/recipe.yaml b/recipes/ros-jazzy-ros2launch/recipe.yaml new file mode 100644 index 00000000..2ff60d0a --- /dev/null +++ b/recipes/ros-jazzy-ros2launch/recipe.yaml @@ -0,0 +1,102 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2launch + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/launch_ros-release.git + tag: release/jazzy/ros2launch/0.26.6-1 + target_directory: ros-jazzy-ros2launch/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-index-python + - ros-jazzy-ament-pep257 + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-xml + - ros-jazzy-launch-yaml + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros-jazzy-ros2pkg + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ament-index-python + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-xml + - ros-jazzy-launch-yaml + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros-jazzy-ros2pkg + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2lifecycle-test-fixtures/bld_ament_cmake.bat b/recipes/ros-jazzy-ros2lifecycle-test-fixtures/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-ros2lifecycle-test-fixtures/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2lifecycle-test-fixtures/build_ament_cmake.sh b/recipes/ros-jazzy-ros2lifecycle-test-fixtures/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-ros2lifecycle-test-fixtures/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-ros2lifecycle-test-fixtures/recipe.yaml b/recipes/ros-jazzy-ros2lifecycle-test-fixtures/recipe.yaml new file mode 100644 index 00000000..c70b16f5 --- /dev/null +++ b/recipes/ros-jazzy-ros2lifecycle-test-fixtures/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2lifecycle-test-fixtures + version: 0.32.2 +source: + git: https://github.com/ros2-gbp/ros2cli-release.git + tag: release/jazzy/ros2lifecycle_test_fixtures/0.32.2-1 + target_directory: ros-jazzy-ros2lifecycle-test-fixtures/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2lifecycle/bld_ament_python.bat b/recipes/ros-jazzy-ros2lifecycle/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ros2lifecycle/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2lifecycle/build_ament_python.sh b/recipes/ros-jazzy-ros2lifecycle/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ros2lifecycle/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ros2lifecycle/recipe.yaml b/recipes/ros-jazzy-ros2lifecycle/recipe.yaml new file mode 100644 index 00000000..d4da643e --- /dev/null +++ b/recipes/ros-jazzy-ros2lifecycle/recipe.yaml @@ -0,0 +1,100 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2lifecycle + version: 0.32.2 +source: + git: https://github.com/ros2-gbp/ros2cli-release.git + tag: release/jazzy/ros2lifecycle/0.32.2-1 + target_directory: ros-jazzy-ros2lifecycle/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - pytest-timeout + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-xmllint + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ros + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-ros2lifecycle-test-fixtures + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-lifecycle-msgs + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros-jazzy-ros2node + - ros-jazzy-ros2service + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2multicast/bld_ament_python.bat b/recipes/ros-jazzy-ros2multicast/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ros2multicast/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2multicast/build_ament_python.sh b/recipes/ros-jazzy-ros2multicast/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ros2multicast/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ros2multicast/recipe.yaml b/recipes/ros-jazzy-ros2multicast/recipe.yaml new file mode 100644 index 00000000..76f73afa --- /dev/null +++ b/recipes/ros-jazzy-ros2multicast/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2multicast + version: 0.32.2 +source: + git: https://github.com/ros2-gbp/ros2cli-release.git + tag: release/jazzy/ros2multicast/0.32.2-1 + target_directory: ros-jazzy-ros2multicast/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - pytest-timeout + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-xmllint + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2node/bld_ament_python.bat b/recipes/ros-jazzy-ros2node/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ros2node/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2node/build_ament_python.sh b/recipes/ros-jazzy-ros2node/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ros2node/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ros2node/recipe.yaml b/recipes/ros-jazzy-ros2node/recipe.yaml new file mode 100644 index 00000000..f64627c8 --- /dev/null +++ b/recipes/ros-jazzy-ros2node/recipe.yaml @@ -0,0 +1,98 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2node + version: 0.32.2 +source: + git: https://github.com/ros2-gbp/ros2cli-release.git + tag: release/jazzy/ros2node/0.32.2-1 + target_directory: ros-jazzy-ros2node/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - pytest-timeout + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-xmllint + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ros + - ros-jazzy-rclpy + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2param/bld_ament_python.bat b/recipes/ros-jazzy-ros2param/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ros2param/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2param/build_ament_python.sh b/recipes/ros-jazzy-ros2param/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ros2param/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ros2param/recipe.yaml b/recipes/ros-jazzy-ros2param/recipe.yaml new file mode 100644 index 00000000..87ac5747 --- /dev/null +++ b/recipes/ros-jazzy-ros2param/recipe.yaml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2param + version: 0.32.2 +source: + git: https://github.com/ros2-gbp/ros2cli-release.git + tag: release/jazzy/ros2param/0.32.2-1 + target_directory: ros-jazzy-ros2param/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - pytest-timeout + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-xmllint + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ros + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros-jazzy-ros2node + - ros-jazzy-ros2service + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2pkg/bld_ament_python.bat b/recipes/ros-jazzy-ros2pkg/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ros2pkg/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2pkg/build_ament_python.sh b/recipes/ros-jazzy-ros2pkg/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ros2pkg/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ros2pkg/recipe.yaml b/recipes/ros-jazzy-ros2pkg/recipe.yaml new file mode 100644 index 00000000..c35c441c --- /dev/null +++ b/recipes/ros-jazzy-ros2pkg/recipe.yaml @@ -0,0 +1,98 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2pkg + version: 0.32.2 +source: + git: https://github.com/ros2-gbp/ros2cli-release.git + tag: release/jazzy/ros2pkg/0.32.2-1 + target_directory: ros-jazzy-ros2pkg/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - pytest-timeout + - python + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-xmllint + - ros-jazzy-launch + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ros + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - catkin_pkg + - empy + - importlib_resources + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-index-python + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2run/bld_ament_python.bat b/recipes/ros-jazzy-ros2run/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ros2run/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2run/build_ament_python.sh b/recipes/ros-jazzy-ros2run/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ros2run/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ros2run/recipe.yaml b/recipes/ros-jazzy-ros2run/recipe.yaml new file mode 100644 index 00000000..b5b8dd05 --- /dev/null +++ b/recipes/ros-jazzy-ros2run/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2run + version: 0.32.2 +source: + git: https://github.com/ros2-gbp/ros2cli-release.git + tag: release/jazzy/ros2run/0.32.2-1 + target_directory: ros-jazzy-ros2run/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - pytest-timeout + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-xmllint + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros-jazzy-ros2pkg + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2service/bld_ament_python.bat b/recipes/ros-jazzy-ros2service/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ros2service/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2service/build_ament_python.sh b/recipes/ros-jazzy-ros2service/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ros2service/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ros2service/recipe.yaml b/recipes/ros-jazzy-ros2service/recipe.yaml new file mode 100644 index 00000000..134b3e88 --- /dev/null +++ b/recipes/ros-jazzy-ros2service/recipe.yaml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2service + version: 0.32.2 +source: + git: https://github.com/ros2-gbp/ros2cli-release.git + tag: release/jazzy/ros2service/0.32.2-1 + target_directory: ros-jazzy-ros2service/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - pytest-timeout + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-xmllint + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ros + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - pyyaml + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros-jazzy-rosidl-runtime-py + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2test/bld_ament_python.bat b/recipes/ros-jazzy-ros2test/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ros2test/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2test/build_ament_python.sh b/recipes/ros-jazzy-ros2test/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ros2test/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ros2test/recipe.yaml b/recipes/ros-jazzy-ros2test/recipe.yaml new file mode 100644 index 00000000..95670f54 --- /dev/null +++ b/recipes/ros-jazzy-ros2test/recipe.yaml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2test + version: 0.6.0 +source: + git: https://github.com/ros2-gbp/ros_testing-release.git + tag: release/jazzy/ros2test/0.6.0-3 + target_directory: ros-jazzy-ros2test/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ros + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-domain-coordinator + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ros + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ros2topic/bld_ament_python.bat b/recipes/ros-jazzy-ros2topic/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-ros2topic/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-ros2topic/build_ament_python.sh b/recipes/ros-jazzy-ros2topic/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-ros2topic/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-ros2topic/recipe.yaml b/recipes/ros-jazzy-ros2topic/recipe.yaml new file mode 100644 index 00000000..a2b799e7 --- /dev/null +++ b/recipes/ros-jazzy-ros2topic/recipe.yaml @@ -0,0 +1,103 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ros2topic + version: 0.32.2 +source: + git: https://github.com/ros2-gbp/ros2cli-release.git + tag: release/jazzy/ros2topic/0.32.2-1 + target_directory: ros-jazzy-ros2topic/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - pytest-timeout + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-xmllint + - ros-jazzy-geometry-msgs + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ros + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosgraph-msgs + - ros-jazzy-std-msgs + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - numpy + - python + - pyyaml + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros-jazzy-rosidl-runtime-py + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosbag2-compression-zstd/bld_ament_cmake.bat b/recipes/ros-jazzy-rosbag2-compression-zstd/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-compression-zstd/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosbag2-compression-zstd/build_ament_cmake.sh b/recipes/ros-jazzy-rosbag2-compression-zstd/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-compression-zstd/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosbag2-compression-zstd/recipe.yaml b/recipes/ros-jazzy-rosbag2-compression-zstd/recipe.yaml new file mode 100644 index 00000000..9e86a6d3 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-compression-zstd/recipe.yaml @@ -0,0 +1,97 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosbag2-compression-zstd + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/rosbag2_compression_zstd/0.26.6-1 + target_directory: ros-jazzy-rosbag2-compression-zstd/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-compression + - ros-jazzy-rosbag2-test-common + - ros-jazzy-zstd-vendor + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-pluginlib + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-compression + - ros-jazzy-zstd-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosbag2-compression/bld_ament_cmake.bat b/recipes/ros-jazzy-rosbag2-compression/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-compression/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosbag2-compression/build_ament_cmake.sh b/recipes/ros-jazzy-rosbag2-compression/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-compression/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosbag2-compression/recipe.yaml b/recipes/ros-jazzy-rosbag2-compression/recipe.yaml new file mode 100644 index 00000000..7651f54b --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-compression/recipe.yaml @@ -0,0 +1,98 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosbag2-compression + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/rosbag2_compression/0.26.6-1 + target_directory: ros-jazzy-rosbag2-compression/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rclcpp + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-cpp + - ros-jazzy-rosbag2-storage + - ros-jazzy-rosbag2-test-common + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-cpp + - ros-jazzy-rosbag2-storage + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosbag2-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-rosbag2-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosbag2-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-rosbag2-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosbag2-cpp/recipe.yaml b/recipes/ros-jazzy-rosbag2-cpp/recipe.yaml new file mode 100644 index 00000000..081801ff --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-cpp/recipe.yaml @@ -0,0 +1,117 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosbag2-cpp + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/rosbag2_cpp/0.26.6-1 + target_directory: ros-jazzy-rosbag2-cpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-index-cpp + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-implementation + - ros-jazzy-rmw-implementation-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-storage + - ros-jazzy-rosbag2-storage-default-plugins + - ros-jazzy-rosbag2-test-common + - ros-jazzy-rosbag2-test-msgdefs + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-cpp + - ros-jazzy-rosidl-typesupport-introspection-cpp + - ros-jazzy-std-msgs + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-index-cpp + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-implementation + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-storage + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-cpp + - ros-jazzy-rosidl-typesupport-introspection-cpp + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosbag2-interfaces/bld_ament_cmake.bat b/recipes/ros-jazzy-rosbag2-interfaces/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-interfaces/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosbag2-interfaces/build_ament_cmake.sh b/recipes/ros-jazzy-rosbag2-interfaces/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-interfaces/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosbag2-interfaces/recipe.yaml b/recipes/ros-jazzy-rosbag2-interfaces/recipe.yaml new file mode 100644 index 00000000..488ba1a2 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-interfaces/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosbag2-interfaces + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/rosbag2_interfaces/0.26.6-1 + target_directory: ros-jazzy-rosbag2-interfaces/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosbag2-py/bld_ament_cmake.bat b/recipes/ros-jazzy-rosbag2-py/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-py/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosbag2-py/build_ament_cmake.sh b/recipes/ros-jazzy-rosbag2-py/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-py/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosbag2-py/patch/ros-jazzy-rosbag2-py.osx.patch b/recipes/ros-jazzy-rosbag2-py/patch/ros-jazzy-rosbag2-py.osx.patch new file mode 100644 index 00000000..d7564996 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-py/patch/ros-jazzy-rosbag2-py.osx.patch @@ -0,0 +1,74 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index feb07925f..6000ec43e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,21 +41,21 @@ find_package(pybind11 REQUIRED) + + ament_python_install_package(${PROJECT_NAME}) + +-pybind11_add_module(_compression_options SHARED ++pybind11_add_module(_compression_options MODULE + src/rosbag2_py/_compression_options.cpp + ) + target_link_libraries(_compression_options PUBLIC + rosbag2_compression::rosbag2_compression + ) + +-pybind11_add_module(_message_definitions SHARED ++pybind11_add_module(_message_definitions MODULE + src/rosbag2_py/_message_definitions.cpp + ) + target_link_libraries(_message_definitions PUBLIC + rosbag2_cpp::rosbag2_cpp + ) + +-pybind11_add_module(_reader SHARED ++pybind11_add_module(_reader MODULE + src/rosbag2_py/_reader.cpp + ) + target_link_libraries(_reader PUBLIC +@@ -64,7 +64,7 @@ target_link_libraries(_reader PUBLIC + rosbag2_storage::rosbag2_storage + ) + +-pybind11_add_module(_storage SHARED ++pybind11_add_module(_storage MODULE + src/rosbag2_py/_storage.cpp + src/rosbag2_py/format_bag_metadata.cpp + ) +@@ -73,7 +73,7 @@ target_link_libraries(_storage PUBLIC + rosbag2_storage::rosbag2_storage + ) + +-pybind11_add_module(_writer SHARED ++pybind11_add_module(_writer MODULE + src/rosbag2_py/_writer.cpp + ) + target_link_libraries(_writer PUBLIC +@@ -82,7 +82,7 @@ target_link_libraries(_writer PUBLIC + rosbag2_storage::rosbag2_storage + ) + +-pybind11_add_module(_info SHARED ++pybind11_add_module(_info MODULE + src/rosbag2_py/_info.cpp + src/rosbag2_py/format_bag_metadata.cpp + src/rosbag2_py/format_service_info.cpp +@@ -92,7 +92,7 @@ target_link_libraries(_info PUBLIC + rosbag2_storage::rosbag2_storage + ) + +-pybind11_add_module(_transport SHARED ++pybind11_add_module(_transport MODULE + src/rosbag2_py/_transport.cpp + ) + target_link_libraries(_transport PUBLIC +@@ -102,7 +102,7 @@ target_link_libraries(_transport PUBLIC + rosbag2_transport::rosbag2_transport + ) + +-pybind11_add_module(_reindexer SHARED ++pybind11_add_module(_reindexer MODULE + src/rosbag2_py/_reindexer.cpp + ) + target_link_libraries(_reindexer PUBLIC diff --git a/recipes/ros-jazzy-rosbag2-py/recipe.yaml b/recipes/ros-jazzy-rosbag2-py/recipe.yaml new file mode 100644 index 00000000..50059cb4 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-py/recipe.yaml @@ -0,0 +1,114 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosbag2-py + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/rosbag2_py/0.26.6-1 + target_directory: ros-jazzy-rosbag2-py/src/work + patches: + - patch/ros-jazzy-rosbag2-py.osx.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - if: build_platform != target_platform + then: + - pybind11 + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-pybind11-vendor + - ros-jazzy-python-cmake-module + - ros-jazzy-rcl-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-compression + - ros-jazzy-rosbag2-compression-zstd + - ros-jazzy-rosbag2-cpp + - ros-jazzy-rosbag2-storage + - ros-jazzy-rosbag2-storage-default-plugins + - ros-jazzy-rosbag2-test-common + - ros-jazzy-rosbag2-test-msgdefs + - ros-jazzy-rosbag2-transport + - ros-jazzy-rosidl-runtime-py + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - pybind11 + run: + - python + - ros-jazzy-pybind11-vendor + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-compression + - ros-jazzy-rosbag2-cpp + - ros-jazzy-rosbag2-storage + - ros-jazzy-rosbag2-transport + - ros-jazzy-rpyutils + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosbag2-storage-default-plugins/bld_ament_cmake.bat b/recipes/ros-jazzy-rosbag2-storage-default-plugins/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-storage-default-plugins/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosbag2-storage-default-plugins/build_ament_cmake.sh b/recipes/ros-jazzy-rosbag2-storage-default-plugins/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-storage-default-plugins/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosbag2-storage-default-plugins/recipe.yaml b/recipes/ros-jazzy-rosbag2-storage-default-plugins/recipe.yaml new file mode 100644 index 00000000..aa48c5ca --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-storage-default-plugins/recipe.yaml @@ -0,0 +1,86 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosbag2-storage-default-plugins + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/rosbag2_storage_default_plugins/0.26.6-1 + target_directory: ros-jazzy-rosbag2-storage-default-plugins/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-storage-mcap + - ros-jazzy-rosbag2-storage-sqlite3 + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosbag2-storage-mcap/bld_ament_cmake.bat b/recipes/ros-jazzy-rosbag2-storage-mcap/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-storage-mcap/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosbag2-storage-mcap/build_ament_cmake.sh b/recipes/ros-jazzy-rosbag2-storage-mcap/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-storage-mcap/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosbag2-storage-mcap/recipe.yaml b/recipes/ros-jazzy-rosbag2-storage-mcap/recipe.yaml new file mode 100644 index 00000000..e5eac0c3 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-storage-mcap/recipe.yaml @@ -0,0 +1,103 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosbag2-storage-mcap + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/rosbag2_storage_mcap/0.26.6-1 + target_directory: ros-jazzy-rosbag2-storage-mcap/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-clang-format + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-index-cpp + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-mcap-vendor + - ros-jazzy-pluginlib + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-storage + - ros-jazzy-rosbag2-test-common + - ros-jazzy-std-msgs + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-index-cpp + - ros-jazzy-mcap-vendor + - ros-jazzy-pluginlib + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-storage + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosbag2-storage-sqlite3/bld_ament_cmake.bat b/recipes/ros-jazzy-rosbag2-storage-sqlite3/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-storage-sqlite3/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosbag2-storage-sqlite3/build_ament_cmake.sh b/recipes/ros-jazzy-rosbag2-storage-sqlite3/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-storage-sqlite3/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosbag2-storage-sqlite3/recipe.yaml b/recipes/ros-jazzy-rosbag2-storage-sqlite3/recipe.yaml new file mode 100644 index 00000000..896fcbe1 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-storage-sqlite3/recipe.yaml @@ -0,0 +1,102 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosbag2-storage-sqlite3 + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/rosbag2_storage_sqlite3/0.26.6-1 + target_directory: ros-jazzy-rosbag2-storage-sqlite3/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-pluginlib + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-storage + - ros-jazzy-rosbag2-test-common + - ros-jazzy-sqlite3-vendor + - ros-jazzy-std-msgs + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-pluginlib + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-storage + - ros-jazzy-sqlite3-vendor + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosbag2-storage/bld_ament_cmake.bat b/recipes/ros-jazzy-rosbag2-storage/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-storage/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosbag2-storage/build_ament_cmake.sh b/recipes/ros-jazzy-rosbag2-storage/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-storage/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosbag2-storage/recipe.yaml b/recipes/ros-jazzy-rosbag2-storage/recipe.yaml new file mode 100644 index 00000000..9bd5761e --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-storage/recipe.yaml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosbag2-storage + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/rosbag2_storage/0.26.6-1 + target_directory: ros-jazzy-rosbag2-storage/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-test-common + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-workspace + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosbag2-test-common/bld_ament_cmake.bat b/recipes/ros-jazzy-rosbag2-test-common/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-test-common/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosbag2-test-common/build_ament_cmake.sh b/recipes/ros-jazzy-rosbag2-test-common/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-test-common/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosbag2-test-common/recipe.yaml b/recipes/ros-jazzy-rosbag2-test-common/recipe.yaml new file mode 100644 index 00000000..bef1fffb --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-test-common/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosbag2-test-common + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/rosbag2_test_common/0.26.6-1 + target_directory: ros-jazzy-rosbag2-test-common/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-python-cmake-module + - ros-jazzy-rclcpp + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rclcpp + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosbag2-test-msgdefs/bld_ament_cmake.bat b/recipes/ros-jazzy-rosbag2-test-msgdefs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-test-msgdefs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosbag2-test-msgdefs/build_ament_cmake.sh b/recipes/ros-jazzy-rosbag2-test-msgdefs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-test-msgdefs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosbag2-test-msgdefs/recipe.yaml b/recipes/ros-jazzy-rosbag2-test-msgdefs/recipe.yaml new file mode 100644 index 00000000..b566a5e0 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-test-msgdefs/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosbag2-test-msgdefs + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/rosbag2_test_msgdefs/0.26.6-1 + target_directory: ros-jazzy-rosbag2-test-msgdefs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosbag2-tests/bld_ament_cmake.bat b/recipes/ros-jazzy-rosbag2-tests/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-tests/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosbag2-tests/build_ament_cmake.sh b/recipes/ros-jazzy-rosbag2-tests/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-tests/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosbag2-tests/recipe.yaml b/recipes/ros-jazzy-rosbag2-tests/recipe.yaml new file mode 100644 index 00000000..d5d143f8 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-tests/recipe.yaml @@ -0,0 +1,102 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosbag2-tests + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/rosbag2_tests/0.26.6-1 + target_directory: ros-jazzy-rosbag2-tests/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-index-cpp + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rclcpp + - ros-jazzy-rcpputils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-ros2bag + - ros-jazzy-rosbag2-compression + - ros-jazzy-rosbag2-compression-zstd + - ros-jazzy-rosbag2-cpp + - ros-jazzy-rosbag2-interfaces + - ros-jazzy-rosbag2-storage + - ros-jazzy-rosbag2-storage-default-plugins + - ros-jazzy-rosbag2-test-common + - ros-jazzy-rosbag2-transport + - ros-jazzy-std-msgs + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-index-cpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosbag2-transport/bld_ament_cmake.bat b/recipes/ros-jazzy-rosbag2-transport/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-transport/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosbag2-transport/build_ament_cmake.sh b/recipes/ros-jazzy-rosbag2-transport/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-transport/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosbag2-transport/recipe.yaml b/recipes/ros-jazzy-rosbag2-transport/recipe.yaml new file mode 100644 index 00000000..7367e949 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2-transport/recipe.yaml @@ -0,0 +1,116 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosbag2-transport + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/rosbag2_transport/0.26.6-1 + target_directory: ros-jazzy-rosbag2-transport/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-index-cpp + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-composition-interfaces + - ros-jazzy-keyboard-handler + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-rmw-implementation-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-compression + - ros-jazzy-rosbag2-compression-zstd + - ros-jazzy-rosbag2-cpp + - ros-jazzy-rosbag2-interfaces + - ros-jazzy-rosbag2-storage + - ros-jazzy-rosbag2-storage-default-plugins + - ros-jazzy-rosbag2-test-common + - ros-jazzy-test-msgs + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-keyboard-handler + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-compression + - ros-jazzy-rosbag2-cpp + - ros-jazzy-rosbag2-interfaces + - ros-jazzy-rosbag2-storage + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosbag2/bld_ament_cmake.bat b/recipes/ros-jazzy-rosbag2/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosbag2/build_ament_cmake.sh b/recipes/ros-jazzy-rosbag2/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosbag2/recipe.yaml b/recipes/ros-jazzy-rosbag2/recipe.yaml new file mode 100644 index 00000000..d1959ba3 --- /dev/null +++ b/recipes/ros-jazzy-rosbag2/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosbag2 + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/rosbag2/0.26.6-1 + target_directory: ros-jazzy-rosbag2/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-test-common + - ros-jazzy-rosbag2-tests + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-ros2bag + - ros-jazzy-rosbag2-compression + - ros-jazzy-rosbag2-compression-zstd + - ros-jazzy-rosbag2-cpp + - ros-jazzy-rosbag2-py + - ros-jazzy-rosbag2-storage + - ros-jazzy-rosbag2-storage-default-plugins + - ros-jazzy-rosbag2-transport + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosgraph-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-rosgraph-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosgraph-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosgraph-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-rosgraph-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosgraph-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosgraph-msgs/recipe.yaml b/recipes/ros-jazzy-rosgraph-msgs/recipe.yaml new file mode 100644 index 00000000..76eb5176 --- /dev/null +++ b/recipes/ros-jazzy-rosgraph-msgs/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosgraph-msgs + version: 2.0.2 +source: + git: https://github.com/ros2-gbp/rcl_interfaces-release.git + tag: release/jazzy/rosgraph_msgs/2.0.2-2 + target_directory: ros-jazzy-rosgraph-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-adapter/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-adapter/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-adapter/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-adapter/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-adapter/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-adapter/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-adapter/recipe.yaml b/recipes/ros-jazzy-rosidl-adapter/recipe.yaml new file mode 100644 index 00000000..8342c382 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-adapter/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-adapter + version: 4.6.5 +source: + git: https://github.com/ros2-gbp/rosidl-release.git + tag: release/jazzy/rosidl_adapter/4.6.5-1 + target_directory: ros-jazzy-rosidl-adapter/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - empy + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cli + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-cli/bld_ament_python.bat b/recipes/ros-jazzy-rosidl-cli/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rosidl-cli/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-cli/build_ament_python.sh b/recipes/ros-jazzy-rosidl-cli/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rosidl-cli/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rosidl-cli/recipe.yaml b/recipes/ros-jazzy-rosidl-cli/recipe.yaml new file mode 100644 index 00000000..b77b56bf --- /dev/null +++ b/recipes/ros-jazzy-rosidl-cli/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-cli + version: 4.6.5 +source: + git: https://github.com/ros2-gbp/rosidl-release.git + tag: release/jazzy/rosidl_cli/4.6.5-1 + target_directory: ros-jazzy-rosidl-cli/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-xmllint + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - argcomplete + - importlib-metadata + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-cmake/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-cmake/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-cmake/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-cmake/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-cmake/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-cmake/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-cmake/recipe.yaml b/recipes/ros-jazzy-rosidl-cmake/recipe.yaml new file mode 100644 index 00000000..6508bfdb --- /dev/null +++ b/recipes/ros-jazzy-rosidl-cmake/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-cmake + version: 4.6.5 +source: + git: https://github.com/ros2-gbp/rosidl-release.git + tag: release/jazzy/rosidl_cmake/4.6.5-1 + target_directory: ros-jazzy-rosidl-cmake/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - empy + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - empy + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-pycommon + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-core-generators/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-core-generators/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-core-generators/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-core-generators/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-core-generators/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-core-generators/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-core-generators/recipe.yaml b/recipes/ros-jazzy-rosidl-core-generators/recipe.yaml new file mode 100644 index 00000000..e1983f47 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-core-generators/recipe.yaml @@ -0,0 +1,110 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-core-generators + version: 0.2.0 +source: + git: https://github.com/ros2-gbp/rosidl_core-release.git + tag: release/jazzy/rosidl_core_generators/0.2.0-3 + target_directory: ros-jazzy-rosidl-core-generators/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cmake + - ros-jazzy-rosidl-generator-c + - ros-jazzy-rosidl-generator-cpp + - ros-jazzy-rosidl-generator-py + - ros-jazzy-rosidl-generator-type-description + - ros-jazzy-rosidl-typesupport-c + - ros-jazzy-rosidl-typesupport-cpp + - ros-jazzy-rosidl-typesupport-fastrtps-c + - ros-jazzy-rosidl-typesupport-fastrtps-cpp + - ros-jazzy-rosidl-typesupport-introspection-c + - ros-jazzy-rosidl-typesupport-introspection-cpp + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cmake + - ros-jazzy-rosidl-generator-c + - ros-jazzy-rosidl-generator-cpp + - ros-jazzy-rosidl-generator-py + - ros-jazzy-rosidl-generator-type-description + - ros-jazzy-rosidl-typesupport-c + - ros-jazzy-rosidl-typesupport-cpp + - ros-jazzy-rosidl-typesupport-fastrtps-c + - ros-jazzy-rosidl-typesupport-fastrtps-cpp + - ros-jazzy-rosidl-typesupport-introspection-c + - ros-jazzy-rosidl-typesupport-introspection-cpp + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-core-runtime/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-core-runtime/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-core-runtime/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-core-runtime/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-core-runtime/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-core-runtime/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-core-runtime/recipe.yaml b/recipes/ros-jazzy-rosidl-core-runtime/recipe.yaml new file mode 100644 index 00000000..c028a906 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-core-runtime/recipe.yaml @@ -0,0 +1,104 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-core-runtime + version: 0.2.0 +source: + git: https://github.com/ros2-gbp/rosidl_core-release.git + tag: release/jazzy/rosidl_core_runtime/0.2.0-3 + target_directory: ros-jazzy-rosidl-core-runtime/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-generator-py + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-c + - ros-jazzy-rosidl-typesupport-cpp + - ros-jazzy-rosidl-typesupport-fastrtps-c + - ros-jazzy-rosidl-typesupport-fastrtps-cpp + - ros-jazzy-rosidl-typesupport-introspection-c + - ros-jazzy-rosidl-typesupport-introspection-cpp + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-generator-py + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-c + - ros-jazzy-rosidl-typesupport-cpp + - ros-jazzy-rosidl-typesupport-fastrtps-c + - ros-jazzy-rosidl-typesupport-fastrtps-cpp + - ros-jazzy-rosidl-typesupport-introspection-c + - ros-jazzy-rosidl-typesupport-introspection-cpp + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-default-generators/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-default-generators/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-default-generators/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-default-generators/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-default-generators/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-default-generators/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-default-generators/recipe.yaml b/recipes/ros-jazzy-rosidl-default-generators/recipe.yaml new file mode 100644 index 00000000..7cdc6dd4 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-default-generators/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-default-generators + version: 1.6.0 +source: + git: https://github.com/ros2-gbp/rosidl_defaults-release.git + tag: release/jazzy/rosidl_default_generators/1.6.0-3 + target_directory: ros-jazzy-rosidl-default-generators/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-action-msgs + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-core-generators + - ros-jazzy-service-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-action-msgs + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-core-generators + - ros-jazzy-service-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-default-runtime/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-default-runtime/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-default-runtime/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-default-runtime/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-default-runtime/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-default-runtime/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-default-runtime/recipe.yaml b/recipes/ros-jazzy-rosidl-default-runtime/recipe.yaml new file mode 100644 index 00000000..039816c8 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-default-runtime/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-default-runtime + version: 1.6.0 +source: + git: https://github.com/ros2-gbp/rosidl_defaults-release.git + tag: release/jazzy/rosidl_default_runtime/1.6.0-3 + target_directory: ros-jazzy-rosidl-default-runtime/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-core-runtime + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-action-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-core-runtime + - ros-jazzy-service-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-dynamic-typesupport-fastrtps/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-dynamic-typesupport-fastrtps/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-dynamic-typesupport-fastrtps/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-dynamic-typesupport-fastrtps/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-dynamic-typesupport-fastrtps/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-dynamic-typesupport-fastrtps/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-dynamic-typesupport-fastrtps/recipe.yaml b/recipes/ros-jazzy-rosidl-dynamic-typesupport-fastrtps/recipe.yaml new file mode 100644 index 00000000..a13669e8 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-dynamic-typesupport-fastrtps/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-dynamic-typesupport-fastrtps + version: 0.1.0 +source: + git: https://github.com/ros2-gbp/rosidl_dynamic_typesupport_fastrtps-release.git + tag: release/jazzy/rosidl_dynamic_typesupport_fastrtps/0.1.0-3 + target_directory: ros-jazzy-rosidl-dynamic-typesupport-fastrtps/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-fastcdr + - ros-jazzy-fastrtps + - ros-jazzy-fastrtps-cmake-module + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-dynamic-typesupport + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-fastcdr + - ros-jazzy-fastrtps + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-dynamic-typesupport + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-dynamic-typesupport/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-dynamic-typesupport/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-dynamic-typesupport/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-dynamic-typesupport/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-dynamic-typesupport/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-dynamic-typesupport/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-dynamic-typesupport/recipe.yaml b/recipes/ros-jazzy-rosidl-dynamic-typesupport/recipe.yaml new file mode 100644 index 00000000..955881c9 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-dynamic-typesupport/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-dynamic-typesupport + version: 0.1.2 +source: + git: https://github.com/ros2-gbp/rosidl_dynamic_typesupport-release.git + tag: release/jazzy/rosidl_dynamic_typesupport/0.1.2-3 + target_directory: ros-jazzy-rosidl-dynamic-typesupport/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-generator-c/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-generator-c/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-generator-c/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-generator-c/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-generator-c/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-generator-c/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-generator-c/recipe.yaml b/recipes/ros-jazzy-rosidl-generator-c/recipe.yaml new file mode 100644 index 00000000..b8854017 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-generator-c/recipe.yaml @@ -0,0 +1,102 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-generator-c + version: 4.6.5 +source: + git: https://github.com/ros2-gbp/rosidl-release.git + tag: release/jazzy/rosidl_generator_c/4.6.5-1 + target_directory: ros-jazzy-rosidl-generator-c/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cmake + - ros-jazzy-rosidl-generator-type-description + - ros-jazzy-rosidl-pycommon + - ros-jazzy-rosidl-typesupport-interface + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-index-python + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cli + - ros-jazzy-rosidl-cmake + - ros-jazzy-rosidl-generator-type-description + - ros-jazzy-rosidl-parser + - ros-jazzy-rosidl-pycommon + - ros-jazzy-rosidl-typesupport-interface + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-generator-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-generator-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-generator-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-generator-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-generator-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-generator-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-generator-cpp/recipe.yaml b/recipes/ros-jazzy-rosidl-generator-cpp/recipe.yaml new file mode 100644 index 00000000..6dc599a8 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-generator-cpp/recipe.yaml @@ -0,0 +1,100 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-generator-cpp + version: 4.6.5 +source: + git: https://github.com/ros2-gbp/rosidl-release.git + tag: release/jazzy/rosidl_generator_cpp/4.6.5-1 + target_directory: ros-jazzy-rosidl-generator-cpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cmake + - ros-jazzy-rosidl-generator-c + - ros-jazzy-rosidl-pycommon + - ros-jazzy-rosidl-runtime-cpp + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-index-python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cli + - ros-jazzy-rosidl-cmake + - ros-jazzy-rosidl-generator-c + - ros-jazzy-rosidl-generator-type-description + - ros-jazzy-rosidl-parser + - ros-jazzy-rosidl-pycommon + - ros-jazzy-rosidl-runtime-cpp + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-generator-py/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-generator-py/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-generator-py/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-generator-py/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-generator-py/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-generator-py/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-generator-py/patch/ros-jazzy-rosidl-generator-py.osx.patch b/recipes/ros-jazzy-rosidl-generator-py/patch/ros-jazzy-rosidl-generator-py.osx.patch new file mode 100644 index 00000000..cde64b21 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-generator-py/patch/ros-jazzy-rosidl-generator-py.osx.patch @@ -0,0 +1,69 @@ +diff --git a/cmake/rosidl_generator_py_generate_interfaces.cmake b/cmake/rosidl_generator_py_generate_interfaces.cmake +index cfc424a..cddd23d 100644 +--- a/cmake/rosidl_generator_py_generate_interfaces.cmake ++++ b/cmake/rosidl_generator_py_generate_interfaces.cmake +@@ -138,7 +139,7 @@ set_property( + + set(_target_name_lib "${rosidl_generate_interfaces_TARGET}__rosidl_generator_py") + add_library(${_target_name_lib} SHARED ${_generated_c_files}) +-target_link_libraries(${_target_name_lib} PRIVATE ++target_link_libraries(${_target_name_lib} PUBLIC + ${rosidl_generate_interfaces_TARGET}__rosidl_generator_c) + add_dependencies( + ${_target_name_lib} +@@ -146,11 +147,6 @@ add_dependencies( + ${rosidl_generate_interfaces_TARGET}__rosidl_typesupport_c + ) + +-target_link_libraries( +- ${_target_name_lib} PRIVATE +- Python3::NumPy +- Python3::Python +-) + target_include_directories(${_target_name_lib} + PRIVATE + ${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_c +@@ -162,8 +158,15 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(_extension_compile_flags -Wall -Wextra) + endif() + ++if(APPLE) ++ set_target_properties(${_target_name_lib} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") ++ target_include_directories(${_target_name_lib} PUBLIC ${Python3_INCLUDE_DIRS} ${Python3_NumPy_INCLUDE_DIRS}) ++else() ++ target_link_libraries(${_target_name_lib} PUBLIC Python3::NumPy Python3::Python) ++endif() ++ + rosidl_get_typesupport_target(c_typesupport_target "${rosidl_generate_interfaces_TARGET}" "rosidl_typesupport_c") +-target_link_libraries(${_target_name_lib} PRIVATE ${c_typesupport_target}) ++target_link_libraries(${_target_name_lib} PUBLIC ${c_typesupport_target}) + + foreach(_typesupport_impl ${_typesupport_impls}) + find_package(${_typesupport_impl} REQUIRED) +@@ -194,7 +197,7 @@ foreach(_typesupport_impl ${_typesupport_impls}) + RUNTIME_OUTPUT_DIRECTORY ${_output_path}) + + target_link_libraries( +- ${_target_name} PRIVATE ++ ${_target_name} PUBLIC + ${_target_name_lib} + ${rosidl_generate_interfaces_TARGET}__${_typesupport_impl} + ${c_typesupport_target} +@@ -210,7 +213,7 @@ foreach(_typesupport_impl ${_typesupport_impls}) + ) + + foreach(_pkg_name ${rosidl_generate_interfaces_DEPENDENCY_PACKAGE_NAMES}) +- target_link_libraries(${_target_name} PRIVATE ${${_pkg_name}__TARGETS}) ++ target_link_libraries(${_target_name} PUBLIC ${${_pkg_name}__TARGETS}) + endforeach() + + add_dependencies(${_target_name} +@@ -231,7 +234,7 @@ endforeach() + + # Depend on rosidl_generator_py generated targets from our dependencies + foreach(_pkg_name ${rosidl_generate_interfaces_DEPENDENCY_PACKAGE_NAMES}) +- target_link_libraries(${_target_name_lib} PRIVATE ${${_pkg_name}_TARGETS${rosidl_generator_py_suffix}}) ++ target_link_libraries(${_target_name_lib} PUBLIC ${${_pkg_name}_TARGETS${rosidl_generator_py_suffix}}) + endforeach() + + set_target_properties(${_target_name_lib} PROPERTIES COMPILE_OPTIONS "${_extension_compile_flags}") diff --git a/recipes/ros-jazzy-rosidl-generator-py/recipe.yaml b/recipes/ros-jazzy-rosidl-generator-py/recipe.yaml new file mode 100644 index 00000000..3eeb1788 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-generator-py/recipe.yaml @@ -0,0 +1,123 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-generator-py + version: 0.22.0 +source: + git: https://github.com/ros2-gbp/rosidl_python-release.git + tag: release/jazzy/rosidl_generator_py/0.22.0-2 + target_directory: ros-jazzy-rosidl-generator-py/src/work + patches: + - patch/ros-jazzy-rosidl-generator-py.osx.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-index-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-python-cmake-module + - ros-jazzy-rmw + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cmake + - ros-jazzy-rosidl-generator-c + - ros-jazzy-rosidl-generator-cpp + - ros-jazzy-rosidl-parser + - ros-jazzy-rosidl-pycommon + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-typesupport-c + - ros-jazzy-rosidl-typesupport-fastrtps-c + - ros-jazzy-rosidl-typesupport-interface + - ros-jazzy-rosidl-typesupport-introspection-c + - ros-jazzy-rpyutils + - ros-jazzy-test-interface-files + - ros2-distro-mutex 0.6.* jazzy_* + run: + - numpy + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-cppcheck + - ros-jazzy-ament-cmake-cpplint + - ros-jazzy-ament-cmake-flake8 + - ros-jazzy-ament-cmake-pep257 + - ros-jazzy-ament-cmake-uncrustify + - ros-jazzy-ament-index-python + - ros-jazzy-python-cmake-module + - ros-jazzy-rmw + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cli + - ros-jazzy-rosidl-generator-c + - ros-jazzy-rosidl-parser + - ros-jazzy-rosidl-pycommon + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-typesupport-c + - ros-jazzy-rosidl-typesupport-interface + - ros-jazzy-rpyutils + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-generator-type-description/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-generator-type-description/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-generator-type-description/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-generator-type-description/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-generator-type-description/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-generator-type-description/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-generator-type-description/recipe.yaml b/recipes/ros-jazzy-rosidl-generator-type-description/recipe.yaml new file mode 100644 index 00000000..e5182d6e --- /dev/null +++ b/recipes/ros-jazzy-rosidl-generator-type-description/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-generator-type-description + version: 4.6.5 +source: + git: https://github.com/ros2-gbp/rosidl-release.git + tag: release/jazzy/rosidl_generator_type_description/4.6.5-1 + target_directory: ros-jazzy-rosidl-generator-type-description/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-index-python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cli + - ros-jazzy-rosidl-parser + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-parser/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-parser/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-parser/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-parser/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-parser/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-parser/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-parser/recipe.yaml b/recipes/ros-jazzy-rosidl-parser/recipe.yaml new file mode 100644 index 00000000..d9a5803b --- /dev/null +++ b/recipes/ros-jazzy-rosidl-parser/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-parser + version: 4.6.5 +source: + git: https://github.com/ros2-gbp/rosidl-release.git + tag: release/jazzy/rosidl_parser/4.6.5-1 + target_directory: ros-jazzy-rosidl-parser/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - lark-parser + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-adapter + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-pycommon/bld_ament_python.bat b/recipes/ros-jazzy-rosidl-pycommon/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rosidl-pycommon/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-pycommon/build_ament_python.sh b/recipes/ros-jazzy-rosidl-pycommon/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rosidl-pycommon/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rosidl-pycommon/recipe.yaml b/recipes/ros-jazzy-rosidl-pycommon/recipe.yaml new file mode 100644 index 00000000..e78e3855 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-pycommon/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-pycommon + version: 4.6.5 +source: + git: https://github.com/ros2-gbp/rosidl-release.git + tag: release/jazzy/rosidl_pycommon/4.6.5-1 + target_directory: ros-jazzy-rosidl-pycommon/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-parser + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-runtime-c/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-runtime-c/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-runtime-c/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-runtime-c/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-runtime-c/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-runtime-c/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-runtime-c/recipe.yaml b/recipes/ros-jazzy-rosidl-runtime-c/recipe.yaml new file mode 100644 index 00000000..4d55a202 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-runtime-c/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-runtime-c + version: 4.6.5 +source: + git: https://github.com/ros2-gbp/rosidl-release.git + tag: release/jazzy/rosidl_runtime_c/4.6.5-1 + target_directory: ros-jazzy-rosidl-runtime-c/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-performance-test-fixture + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-typesupport-interface + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-typesupport-interface + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-runtime-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-runtime-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-runtime-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-runtime-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-runtime-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-runtime-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-runtime-cpp/recipe.yaml b/recipes/ros-jazzy-rosidl-runtime-cpp/recipe.yaml new file mode 100644 index 00000000..344ab00a --- /dev/null +++ b/recipes/ros-jazzy-rosidl-runtime-cpp/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-runtime-cpp + version: 4.6.5 +source: + git: https://github.com/ros2-gbp/rosidl-release.git + tag: release/jazzy/rosidl_runtime_cpp/4.6.5-1 + target_directory: ros-jazzy-rosidl-runtime-cpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-performance-test-fixture + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-runtime-py/bld_ament_python.bat b/recipes/ros-jazzy-rosidl-runtime-py/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rosidl-runtime-py/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-runtime-py/build_ament_python.sh b/recipes/ros-jazzy-rosidl-runtime-py/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rosidl-runtime-py/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rosidl-runtime-py/recipe.yaml b/recipes/ros-jazzy-rosidl-runtime-py/recipe.yaml new file mode 100644 index 00000000..27a2e5eb --- /dev/null +++ b/recipes/ros-jazzy-rosidl-runtime-py/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-runtime-py + version: 0.13.1 +source: + git: https://github.com/ros2-gbp/rosidl_runtime_py-release.git + tag: release/jazzy/rosidl_runtime_py/0.13.1-2 + target_directory: ros-jazzy-rosidl-runtime-py/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-xmllint + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - numpy + - python + - pyyaml + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-parser + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-typesupport-c/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-typesupport-c/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-c/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-typesupport-c/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-typesupport-c/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-c/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-typesupport-c/recipe.yaml b/recipes/ros-jazzy-rosidl-typesupport-c/recipe.yaml new file mode 100644 index 00000000..d6c1f366 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-c/recipe.yaml @@ -0,0 +1,105 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-typesupport-c + version: 3.2.2 +source: + git: https://github.com/ros2-gbp/rosidl_typesupport-release.git + tag: release/jazzy/rosidl_typesupport_c/3.2.2-1 + target_directory: ros-jazzy-rosidl-typesupport-c/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-mimick-vendor + - ros-jazzy-performance-test-fixture + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-typesupport-fastrtps-c + - ros-jazzy-rosidl-typesupport-introspection-c + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-index-python + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cli + - ros-jazzy-rosidl-generator-c + - ros-jazzy-rosidl-pycommon + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-typesupport-fastrtps-c + - ros-jazzy-rosidl-typesupport-interface + - ros-jazzy-rosidl-typesupport-introspection-c + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-typesupport-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-typesupport-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-typesupport-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-typesupport-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-typesupport-cpp/recipe.yaml b/recipes/ros-jazzy-rosidl-typesupport-cpp/recipe.yaml new file mode 100644 index 00000000..3d779bea --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-cpp/recipe.yaml @@ -0,0 +1,109 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-typesupport-cpp + version: 3.2.2 +source: + git: https://github.com/ros2-gbp/rosidl_typesupport-release.git + tag: release/jazzy/rosidl_typesupport_cpp/3.2.2-1 + target_directory: ros-jazzy-rosidl-typesupport-cpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-performance-test-fixture + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-c + - ros-jazzy-rosidl-typesupport-fastrtps-cpp + - ros-jazzy-rosidl-typesupport-introspection-cpp + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-index-python + - ros-jazzy-rcpputils + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cli + - ros-jazzy-rosidl-generator-c + - ros-jazzy-rosidl-generator-type-description + - ros-jazzy-rosidl-pycommon + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-c + - ros-jazzy-rosidl-typesupport-fastrtps-cpp + - ros-jazzy-rosidl-typesupport-interface + - ros-jazzy-rosidl-typesupport-introspection-cpp + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-typesupport-fastrtps-c/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-typesupport-fastrtps-c/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-fastrtps-c/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-typesupport-fastrtps-c/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-typesupport-fastrtps-c/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-fastrtps-c/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-typesupport-fastrtps-c/recipe.yaml b/recipes/ros-jazzy-rosidl-typesupport-fastrtps-c/recipe.yaml new file mode 100644 index 00000000..79946d72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-fastrtps-c/recipe.yaml @@ -0,0 +1,114 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-typesupport-fastrtps-c + version: 3.6.1 +source: + git: https://github.com/ros2-gbp/rosidl_typesupport_fastrtps-release.git + tag: release/jazzy/rosidl_typesupport_fastrtps_c/3.6.1-1 + target_directory: ros-jazzy-rosidl-typesupport-fastrtps-c/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-index-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-fastcdr + - ros-jazzy-fastrtps-cmake-module + - ros-jazzy-osrf-testing-tools-cpp + - ros-jazzy-performance-test-fixture + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cli + - ros-jazzy-rosidl-generator-c + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-fastrtps-cpp + - ros-jazzy-rosidl-typesupport-interface + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-index-python + - ros-jazzy-fastcdr + - ros-jazzy-fastrtps-cmake-module + - ros-jazzy-rmw + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cli + - ros-jazzy-rosidl-generator-c + - ros-jazzy-rosidl-pycommon + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-fastrtps-cpp + - ros-jazzy-rosidl-typesupport-interface + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-typesupport-fastrtps-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-typesupport-fastrtps-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-fastrtps-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-typesupport-fastrtps-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-typesupport-fastrtps-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-fastrtps-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-typesupport-fastrtps-cpp/recipe.yaml b/recipes/ros-jazzy-rosidl-typesupport-fastrtps-cpp/recipe.yaml new file mode 100644 index 00000000..f579814c --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-fastrtps-cpp/recipe.yaml @@ -0,0 +1,114 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-typesupport-fastrtps-cpp + version: 3.6.1 +source: + git: https://github.com/ros2-gbp/rosidl_typesupport_fastrtps-release.git + tag: release/jazzy/rosidl_typesupport_fastrtps_cpp/3.6.1-1 + target_directory: ros-jazzy-rosidl-typesupport-fastrtps-cpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-index-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-fastcdr + - ros-jazzy-fastrtps-cmake-module + - ros-jazzy-osrf-testing-tools-cpp + - ros-jazzy-performance-test-fixture + - ros-jazzy-rcutils + - ros-jazzy-rmw + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cli + - ros-jazzy-rosidl-generator-c + - ros-jazzy-rosidl-generator-cpp + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-interface + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-index-python + - ros-jazzy-fastcdr + - ros-jazzy-fastrtps-cmake-module + - ros-jazzy-rmw + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cli + - ros-jazzy-rosidl-generator-c + - ros-jazzy-rosidl-generator-cpp + - ros-jazzy-rosidl-pycommon + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-interface + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-typesupport-interface/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-typesupport-interface/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-interface/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-typesupport-interface/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-typesupport-interface/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-interface/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-typesupport-interface/recipe.yaml b/recipes/ros-jazzy-rosidl-typesupport-interface/recipe.yaml new file mode 100644 index 00000000..31fd3a1c --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-interface/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-typesupport-interface + version: 4.6.5 +source: + git: https://github.com/ros2-gbp/rosidl-release.git + tag: release/jazzy/rosidl_typesupport_interface/4.6.5-1 + target_directory: ros-jazzy-rosidl-typesupport-interface/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-typesupport-introspection-c/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-typesupport-introspection-c/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-introspection-c/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-typesupport-introspection-c/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-typesupport-introspection-c/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-introspection-c/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-typesupport-introspection-c/recipe.yaml b/recipes/ros-jazzy-rosidl-typesupport-introspection-c/recipe.yaml new file mode 100644 index 00000000..10279f75 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-introspection-c/recipe.yaml @@ -0,0 +1,101 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-typesupport-introspection-c + version: 4.6.5 +source: + git: https://github.com/ros2-gbp/rosidl-release.git + tag: release/jazzy/rosidl_typesupport_introspection_c/4.6.5-1 + target_directory: ros-jazzy-rosidl-typesupport-introspection-c/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cmake + - ros-jazzy-rosidl-generator-c + - ros-jazzy-rosidl-pycommon + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-typesupport-interface + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-index-python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cli + - ros-jazzy-rosidl-cmake + - ros-jazzy-rosidl-generator-c + - ros-jazzy-rosidl-parser + - ros-jazzy-rosidl-pycommon + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-typesupport-interface + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rosidl-typesupport-introspection-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-rosidl-typesupport-introspection-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-introspection-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rosidl-typesupport-introspection-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-rosidl-typesupport-introspection-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-introspection-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rosidl-typesupport-introspection-cpp/recipe.yaml b/recipes/ros-jazzy-rosidl-typesupport-introspection-cpp/recipe.yaml new file mode 100644 index 00000000..e0dc48af --- /dev/null +++ b/recipes/ros-jazzy-rosidl-typesupport-introspection-cpp/recipe.yaml @@ -0,0 +1,106 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rosidl-typesupport-introspection-cpp + version: 4.6.5 +source: + git: https://github.com/ros2-gbp/rosidl-release.git + tag: release/jazzy/rosidl_typesupport_introspection_cpp/4.6.5-1 + target_directory: ros-jazzy-rosidl-typesupport-introspection-cpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cmake + - ros-jazzy-rosidl-generator-c + - ros-jazzy-rosidl-generator-cpp + - ros-jazzy-rosidl-pycommon + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-introspection-c + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-index-python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cli + - ros-jazzy-rosidl-cmake + - ros-jazzy-rosidl-generator-c + - ros-jazzy-rosidl-generator-cpp + - ros-jazzy-rosidl-parser + - ros-jazzy-rosidl-pycommon + - ros-jazzy-rosidl-runtime-c + - ros-jazzy-rosidl-runtime-cpp + - ros-jazzy-rosidl-typesupport-interface + - ros-jazzy-rosidl-typesupport-introspection-c + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rpyutils/bld_ament_python.bat b/recipes/ros-jazzy-rpyutils/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rpyutils/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rpyutils/build_ament_python.sh b/recipes/ros-jazzy-rpyutils/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rpyutils/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rpyutils/recipe.yaml b/recipes/ros-jazzy-rpyutils/recipe.yaml new file mode 100644 index 00000000..c0166700 --- /dev/null +++ b/recipes/ros-jazzy-rpyutils/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rpyutils + version: 0.4.1 +source: + git: https://github.com/ros2-gbp/rpyutils-release.git + tag: release/jazzy/rpyutils/0.4.1-3 + target_directory: ros-jazzy-rpyutils/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ament-xmllint + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-action/bld_ament_python.bat b/recipes/ros-jazzy-rqt-action/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rqt-action/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-action/build_ament_python.sh b/recipes/ros-jazzy-rqt-action/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rqt-action/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rqt-action/recipe.yaml b/recipes/ros-jazzy-rqt-action/recipe.yaml new file mode 100644 index 00000000..1c31f06f --- /dev/null +++ b/recipes/ros-jazzy-rqt-action/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-action + version: 2.2.0 +source: + git: https://github.com/ros2-gbp/rqt_action-release.git + tag: release/jazzy/rqt_action/2.2.0-3 + target_directory: ros-jazzy-rqt-action/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-xmllint + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rqt-gui + - ros-jazzy-rqt-gui-py + - ros-jazzy-rqt-msg + - ros-jazzy-rqt-py-common + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-bag-plugins/bld_ament_python.bat b/recipes/ros-jazzy-rqt-bag-plugins/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rqt-bag-plugins/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-bag-plugins/build_ament_python.sh b/recipes/ros-jazzy-rqt-bag-plugins/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rqt-bag-plugins/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rqt-bag-plugins/recipe.yaml b/recipes/ros-jazzy-rqt-bag-plugins/recipe.yaml new file mode 100644 index 00000000..002b3469 --- /dev/null +++ b/recipes/ros-jazzy-rqt-bag-plugins/recipe.yaml @@ -0,0 +1,96 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-bag-plugins + version: 1.5.4 +source: + git: https://github.com/ros2-gbp/rqt_bag-release.git + tag: release/jazzy/rqt_bag_plugins/1.5.4-1 + target_directory: ros-jazzy-rqt-bag-plugins/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - pillow + - pycairo + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2 + - ros-jazzy-rqt-bag + - ros-jazzy-rqt-gui + - ros-jazzy-rqt-gui-py + - ros-jazzy-rqt-plot + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-bag/bld_ament_python.bat b/recipes/ros-jazzy-rqt-bag/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rqt-bag/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-bag/build_ament_python.sh b/recipes/ros-jazzy-rqt-bag/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rqt-bag/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rqt-bag/recipe.yaml b/recipes/ros-jazzy-rqt-bag/recipe.yaml new file mode 100644 index 00000000..759824c9 --- /dev/null +++ b/recipes/ros-jazzy-rqt-bag/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-bag + version: 1.5.4 +source: + git: https://github.com/ros2-gbp/rqt_bag-release.git + tag: release/jazzy/rqt_bag/1.5.4-1 + target_directory: ros-jazzy-rqt-bag/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-python-qt-binding + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-rosbag2-py + - ros-jazzy-rqt-gui + - ros-jazzy-rqt-gui-py + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-common-plugins/bld_ament_cmake.bat b/recipes/ros-jazzy-rqt-common-plugins/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rqt-common-plugins/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-common-plugins/build_ament_cmake.sh b/recipes/ros-jazzy-rqt-common-plugins/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rqt-common-plugins/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rqt-common-plugins/recipe.yaml b/recipes/ros-jazzy-rqt-common-plugins/recipe.yaml new file mode 100644 index 00000000..bac7fe52 --- /dev/null +++ b/recipes/ros-jazzy-rqt-common-plugins/recipe.yaml @@ -0,0 +1,100 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-common-plugins + version: 1.2.0 +source: + git: https://github.com/ros2-gbp/rqt_common_plugins-release.git + tag: release/jazzy/rqt_common_plugins/1.2.0-4 + target_directory: ros-jazzy-rqt-common-plugins/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rqt-action + - ros-jazzy-rqt-bag + - ros-jazzy-rqt-bag-plugins + - ros-jazzy-rqt-console + - ros-jazzy-rqt-graph + - ros-jazzy-rqt-image-view + - ros-jazzy-rqt-msg + - ros-jazzy-rqt-plot + - ros-jazzy-rqt-publisher + - ros-jazzy-rqt-py-common + - ros-jazzy-rqt-py-console + - ros-jazzy-rqt-reconfigure + - ros-jazzy-rqt-service-caller + - ros-jazzy-rqt-shell + - ros-jazzy-rqt-srv + - ros-jazzy-rqt-topic + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-console/bld_ament_python.bat b/recipes/ros-jazzy-rqt-console/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rqt-console/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-console/build_ament_python.sh b/recipes/ros-jazzy-rqt-console/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rqt-console/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rqt-console/recipe.yaml b/recipes/ros-jazzy-rqt-console/recipe.yaml new file mode 100644 index 00000000..27d1f874 --- /dev/null +++ b/recipes/ros-jazzy-rqt-console/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-console + version: 2.2.1 +source: + git: https://github.com/ros2-gbp/rqt_console-release.git + tag: release/jazzy/rqt_console/2.2.1-3 + target_directory: ros-jazzy-rqt-console/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ament-index-python + - ros-jazzy-python-qt-binding + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-rqt-gui + - ros-jazzy-rqt-gui-py + - ros-jazzy-rqt-py-common + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-graph/bld_ament_python.bat b/recipes/ros-jazzy-rqt-graph/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rqt-graph/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-graph/build_ament_python.sh b/recipes/ros-jazzy-rqt-graph/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rqt-graph/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rqt-graph/recipe.yaml b/recipes/ros-jazzy-rqt-graph/recipe.yaml new file mode 100644 index 00000000..f9bcd48a --- /dev/null +++ b/recipes/ros-jazzy-rqt-graph/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-graph + version: 1.5.4 +source: + git: https://github.com/ros2-gbp/rqt_graph-release.git + tag: release/jazzy/rqt_graph/1.5.4-1 + target_directory: ros-jazzy-rqt-graph/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ament-index-python + - ros-jazzy-python-qt-binding + - ros-jazzy-qt-dotgraph + - ros-jazzy-ros-workspace + - ros-jazzy-rqt-gui + - ros-jazzy-rqt-gui-py + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-gui-cpp/bld_ament_cmake.bat b/recipes/ros-jazzy-rqt-gui-cpp/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rqt-gui-cpp/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-gui-cpp/build_ament_cmake.sh b/recipes/ros-jazzy-rqt-gui-cpp/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rqt-gui-cpp/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rqt-gui-cpp/recipe.yaml b/recipes/ros-jazzy-rqt-gui-cpp/recipe.yaml new file mode 100644 index 00000000..ec089c45 --- /dev/null +++ b/recipes/ros-jazzy-rqt-gui-cpp/recipe.yaml @@ -0,0 +1,102 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-gui-cpp + version: 1.6.0 +source: + git: https://github.com/ros2-gbp/rqt-release.git + tag: release/jazzy/rqt_gui_cpp/1.6.0-2 + target_directory: ros-jazzy-rqt-gui-cpp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-pluginlib + - ros-jazzy-qt-gui-cpp + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - ros-jazzy-pluginlib + - ros-jazzy-qt-gui-cpp + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-rqt-gui-py/bld_ament_python.bat b/recipes/ros-jazzy-rqt-gui-py/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rqt-gui-py/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-gui-py/build_ament_python.sh b/recipes/ros-jazzy-rqt-gui-py/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rqt-gui-py/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rqt-gui-py/recipe.yaml b/recipes/ros-jazzy-rqt-gui-py/recipe.yaml new file mode 100644 index 00000000..aa9b4986 --- /dev/null +++ b/recipes/ros-jazzy-rqt-gui-py/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-gui-py + version: 1.6.0 +source: + git: https://github.com/ros2-gbp/rqt-release.git + tag: release/jazzy/rqt_gui_py/1.6.0-2 + target_directory: ros-jazzy-rqt-gui-py/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-qt-gui + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rqt-gui + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-qt-gui + - ros-jazzy-ros-workspace + - ros-jazzy-rqt-gui + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-gui/bld_ament_python.bat b/recipes/ros-jazzy-rqt-gui/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rqt-gui/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-gui/build_ament_python.sh b/recipes/ros-jazzy-rqt-gui/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rqt-gui/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rqt-gui/recipe.yaml b/recipes/ros-jazzy-rqt-gui/recipe.yaml new file mode 100644 index 00000000..98b47a7d --- /dev/null +++ b/recipes/ros-jazzy-rqt-gui/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-gui + version: 1.6.0 +source: + git: https://github.com/ros2-gbp/rqt-release.git + tag: release/jazzy/rqt_gui/1.6.0-2 + target_directory: ros-jazzy-rqt-gui/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-qt-gui + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - catkin_pkg + - python + - ros-jazzy-ament-index-python + - ros-jazzy-python-qt-binding + - ros-jazzy-qt-gui + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-image-view/bld_ament_cmake.bat b/recipes/ros-jazzy-rqt-image-view/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rqt-image-view/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-image-view/build_ament_cmake.sh b/recipes/ros-jazzy-rqt-image-view/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rqt-image-view/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rqt-image-view/recipe.yaml b/recipes/ros-jazzy-rqt-image-view/recipe.yaml new file mode 100644 index 00000000..76538f92 --- /dev/null +++ b/recipes/ros-jazzy-rqt-image-view/recipe.yaml @@ -0,0 +1,112 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-image-view + version: 1.3.0 +source: + git: https://github.com/ros2-gbp/rqt_image_view-release.git + tag: release/jazzy/rqt_image_view/1.3.0-2 + target_directory: ros-jazzy-rqt-image-view/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-cv-bridge + - ros-jazzy-geometry-msgs + - ros-jazzy-image-transport + - ros-jazzy-qt-gui-cpp + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rqt-gui + - ros-jazzy-rqt-gui-cpp + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - ros-jazzy-cv-bridge + - ros-jazzy-geometry-msgs + - ros-jazzy-image-transport + - ros-jazzy-qt-gui-cpp + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-rqt-gui + - ros-jazzy-rqt-gui-cpp + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-rqt-msg/bld_ament_python.bat b/recipes/ros-jazzy-rqt-msg/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rqt-msg/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-msg/build_ament_python.sh b/recipes/ros-jazzy-rqt-msg/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rqt-msg/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rqt-msg/recipe.yaml b/recipes/ros-jazzy-rqt-msg/recipe.yaml new file mode 100644 index 00000000..5bd448e7 --- /dev/null +++ b/recipes/ros-jazzy-rqt-msg/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-msg + version: 1.5.1 +source: + git: https://github.com/ros2-gbp/rqt_msg-release.git + tag: release/jazzy/rqt_msg/1.5.1-3 + target_directory: ros-jazzy-rqt-msg/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-xmllint + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ament-index-python + - ros-jazzy-python-qt-binding + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-py + - ros-jazzy-rqt-console + - ros-jazzy-rqt-gui + - ros-jazzy-rqt-gui-py + - ros-jazzy-rqt-py-common + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-plot/bld_ament_python.bat b/recipes/ros-jazzy-rqt-plot/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rqt-plot/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-plot/build_ament_python.sh b/recipes/ros-jazzy-rqt-plot/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rqt-plot/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rqt-plot/recipe.yaml b/recipes/ros-jazzy-rqt-plot/recipe.yaml new file mode 100644 index 00000000..5c818887 --- /dev/null +++ b/recipes/ros-jazzy-rqt-plot/recipe.yaml @@ -0,0 +1,96 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-plot + version: 1.4.0 +source: + git: https://github.com/ros2-gbp/rqt_plot-release.git + tag: release/jazzy/rqt_plot/1.4.0-2 + target_directory: ros-jazzy-rqt-plot/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - catkin_pkg + - matplotlib-base + - numpy + - python + - ros-jazzy-python-qt-binding + - ros-jazzy-qt-gui-py-common + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-rqt-gui + - ros-jazzy-rqt-gui-py + - ros-jazzy-rqt-py-common + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-publisher/bld_ament_python.bat b/recipes/ros-jazzy-rqt-publisher/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rqt-publisher/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-publisher/build_ament_python.sh b/recipes/ros-jazzy-rqt-publisher/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rqt-publisher/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rqt-publisher/recipe.yaml b/recipes/ros-jazzy-rqt-publisher/recipe.yaml new file mode 100644 index 00000000..79516cb2 --- /dev/null +++ b/recipes/ros-jazzy-rqt-publisher/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-publisher + version: 1.7.2 +source: + git: https://github.com/ros2-gbp/rqt_publisher-release.git + tag: release/jazzy/rqt_publisher/1.7.2-2 + target_directory: ros-jazzy-rqt-publisher/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - numpy + - python + - ros-jazzy-ament-index-python + - ros-jazzy-python-qt-binding + - ros-jazzy-qt-gui-py-common + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-py + - ros-jazzy-rqt-gui + - ros-jazzy-rqt-gui-py + - ros-jazzy-rqt-py-common + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-py-common/bld_ament_cmake.bat b/recipes/ros-jazzy-rqt-py-common/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rqt-py-common/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-py-common/build_ament_cmake.sh b/recipes/ros-jazzy-rqt-py-common/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rqt-py-common/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rqt-py-common/recipe.yaml b/recipes/ros-jazzy-rqt-py-common/recipe.yaml new file mode 100644 index 00000000..5797e0d0 --- /dev/null +++ b/recipes/ros-jazzy-rqt-py-common/recipe.yaml @@ -0,0 +1,105 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-py-common + version: 1.6.0 +source: + git: https://github.com/ros2-gbp/rqt-release.git + tag: release/jazzy/rqt_py_common/1.6.0-2 + target_directory: ros-jazzy-rqt-py-common/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-python-cmake-module + - ros-jazzy-rclpy + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - qt-main + - ros-jazzy-python-qt-binding + - ros-jazzy-qt-gui + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-rqt-py-console/bld_ament_python.bat b/recipes/ros-jazzy-rqt-py-console/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rqt-py-console/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-py-console/build_ament_python.sh b/recipes/ros-jazzy-rqt-py-console/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rqt-py-console/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rqt-py-console/recipe.yaml b/recipes/ros-jazzy-rqt-py-console/recipe.yaml new file mode 100644 index 00000000..5978fe1e --- /dev/null +++ b/recipes/ros-jazzy-rqt-py-console/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-py-console + version: 1.2.2 +source: + git: https://github.com/ros2-gbp/rqt_py_console-release.git + tag: release/jazzy/rqt_py_console/1.2.2-3 + target_directory: ros-jazzy-rqt-py-console/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ament-index-python + - ros-jazzy-python-qt-binding + - ros-jazzy-qt-gui + - ros-jazzy-qt-gui-py-common + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-rqt-gui + - ros-jazzy-rqt-gui-py + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-reconfigure/bld_ament_python.bat b/recipes/ros-jazzy-rqt-reconfigure/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rqt-reconfigure/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-reconfigure/build_ament_python.sh b/recipes/ros-jazzy-rqt-reconfigure/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rqt-reconfigure/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rqt-reconfigure/recipe.yaml b/recipes/ros-jazzy-rqt-reconfigure/recipe.yaml new file mode 100644 index 00000000..269ee9ad --- /dev/null +++ b/recipes/ros-jazzy-rqt-reconfigure/recipe.yaml @@ -0,0 +1,97 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-reconfigure + version: 1.6.2 +source: + git: https://github.com/ros2-gbp/rqt_reconfigure-release.git + tag: release/jazzy/rqt_reconfigure/1.6.2-3 + target_directory: ros-jazzy-rqt-reconfigure/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-xmllint + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - pyyaml + - ros-jazzy-ament-index-python + - ros-jazzy-python-qt-binding + - ros-jazzy-qt-gui-py-common + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-rqt-console + - ros-jazzy-rqt-gui + - ros-jazzy-rqt-gui-py + - ros-jazzy-rqt-py-common + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-service-caller/bld_ament_python.bat b/recipes/ros-jazzy-rqt-service-caller/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rqt-service-caller/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-service-caller/build_ament_python.sh b/recipes/ros-jazzy-rqt-service-caller/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rqt-service-caller/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rqt-service-caller/recipe.yaml b/recipes/ros-jazzy-rqt-service-caller/recipe.yaml new file mode 100644 index 00000000..556f934b --- /dev/null +++ b/recipes/ros-jazzy-rqt-service-caller/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-service-caller + version: 1.2.1 +source: + git: https://github.com/ros2-gbp/rqt_service_caller-release.git + tag: release/jazzy/rqt_service_caller/1.2.1-3 + target_directory: ros-jazzy-rqt-service-caller/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rqt-gui + - ros-jazzy-rqt-gui-py + - ros-jazzy-rqt-py-common + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-shell/bld_ament_python.bat b/recipes/ros-jazzy-rqt-shell/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rqt-shell/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-shell/build_ament_python.sh b/recipes/ros-jazzy-rqt-shell/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rqt-shell/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rqt-shell/recipe.yaml b/recipes/ros-jazzy-rqt-shell/recipe.yaml new file mode 100644 index 00000000..d3156f7a --- /dev/null +++ b/recipes/ros-jazzy-rqt-shell/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-shell + version: 1.2.2 +source: + git: https://github.com/ros2-gbp/rqt_shell-release.git + tag: release/jazzy/rqt_shell/1.2.2-2 + target_directory: ros-jazzy-rqt-shell/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - catkin_pkg + - python + - ros-jazzy-python-qt-binding + - ros-jazzy-qt-gui + - ros-jazzy-qt-gui-py-common + - ros-jazzy-ros-workspace + - ros-jazzy-rqt-gui + - ros-jazzy-rqt-gui-py + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-srv/bld_ament_python.bat b/recipes/ros-jazzy-rqt-srv/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rqt-srv/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-srv/build_ament_python.sh b/recipes/ros-jazzy-rqt-srv/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rqt-srv/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rqt-srv/recipe.yaml b/recipes/ros-jazzy-rqt-srv/recipe.yaml new file mode 100644 index 00000000..3de09ffb --- /dev/null +++ b/recipes/ros-jazzy-rqt-srv/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-srv + version: 1.2.2 +source: + git: https://github.com/ros2-gbp/rqt_srv-release.git + tag: release/jazzy/rqt_srv/1.2.2-3 + target_directory: ros-jazzy-rqt-srv/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-xmllint + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rqt-gui + - ros-jazzy-rqt-gui-py + - ros-jazzy-rqt-msg + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rqt-topic/bld_ament_python.bat b/recipes/ros-jazzy-rqt-topic/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-rqt-topic/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rqt-topic/build_ament_python.sh b/recipes/ros-jazzy-rqt-topic/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-rqt-topic/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-rqt-topic/recipe.yaml b/recipes/ros-jazzy-rqt-topic/recipe.yaml new file mode 100644 index 00000000..40124537 --- /dev/null +++ b/recipes/ros-jazzy-rqt-topic/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rqt-topic + version: 1.7.3 +source: + git: https://github.com/ros2-gbp/rqt_topic-release.git + tag: release/jazzy/rqt_topic/1.7.3-1 + target_directory: ros-jazzy-rqt-topic/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-xmllint + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-python-qt-binding + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-ros2topic + - ros-jazzy-rqt-gui + - ros-jazzy-rqt-gui-py + - ros-jazzy-rqt-py-common + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rsl/bld_catkin.bat b/recipes/ros-jazzy-rsl/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-rsl/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-rsl/build_catkin.sh b/recipes/ros-jazzy-rsl/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-rsl/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-rsl/patch/ros-jazzy-rsl.patch b/recipes/ros-jazzy-rsl/patch/ros-jazzy-rsl.patch new file mode 100644 index 00000000..e3560f29 --- /dev/null +++ b/recipes/ros-jazzy-rsl/patch/ros-jazzy-rsl.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6d47b08..c7b66df 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -10,7 +10,7 @@ find_package(tcb_span REQUIRED) + find_package(tl_expected REQUIRED) + + if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") +- add_compile_options(-Werror -Wall -Wextra -Wpedantic -Wshadow -Wconversion -Wsign-conversion -Wold-style-cast) ++ add_compile_options(-Wall -Wextra -Wpedantic -Wshadow -Wconversion -Wsign-conversion -Wold-style-cast) + endif() + + option(BUILD_SHARED_LIBS "Build shared libraries" ON) diff --git a/recipes/ros-jazzy-rsl/recipe.yaml b/recipes/ros-jazzy-rsl/recipe.yaml new file mode 100644 index 00000000..3a4ed318 --- /dev/null +++ b/recipes/ros-jazzy-rsl/recipe.yaml @@ -0,0 +1,109 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rsl + version: 1.1.0 +source: + git: https://github.com/ros2-gbp/RSL-release.git + tag: release/jazzy/rsl/1.1.0-3 + target_directory: ros-jazzy-rsl/src/work + patches: + - patch/ros-jazzy-rsl.patch + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - if: build_platform != target_platform + then: + - git + - if: build_platform != target_platform + then: + - doxygen + host: + - if: build_platform == target_platform + then: + - pkg-config + - clang-tools + - eigen + - fmt + - graphviz + - numpy + - pip + - python + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tcb-span + - ros-jazzy-tl-expected + - ros2-distro-mutex 0.6.* jazzy_* + - if: build_platform == target_platform + then: + - git + - if: build_platform == target_platform + then: + - doxygen + run: + - eigen + - fmt + - python + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-tcb-span + - ros-jazzy-tl-expected + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rtcm-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-rtcm-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rtcm-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rtcm-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-rtcm-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rtcm-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rtcm-msgs/recipe.yaml b/recipes/ros-jazzy-rtcm-msgs/recipe.yaml new file mode 100644 index 00000000..5d2e11b5 --- /dev/null +++ b/recipes/ros-jazzy-rtcm-msgs/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rtcm-msgs + version: 1.1.6 +source: + git: https://github.com/ros2-gbp/rtcm_msgs-release.git + tag: release/jazzy/rtcm_msgs/1.1.6-4 + target_directory: ros-jazzy-rtcm-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rti-connext-dds-cmake-module/bld_ament_cmake.bat b/recipes/ros-jazzy-rti-connext-dds-cmake-module/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rti-connext-dds-cmake-module/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rti-connext-dds-cmake-module/build_ament_cmake.sh b/recipes/ros-jazzy-rti-connext-dds-cmake-module/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rti-connext-dds-cmake-module/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rti-connext-dds-cmake-module/recipe.yaml b/recipes/ros-jazzy-rti-connext-dds-cmake-module/recipe.yaml new file mode 100644 index 00000000..fd61a8af --- /dev/null +++ b/recipes/ros-jazzy-rti-connext-dds-cmake-module/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rti-connext-dds-cmake-module + version: 0.22.0 +source: + git: https://github.com/ros2-gbp/rmw_connextdds-release.git + tag: release/jazzy/rti_connext_dds_cmake_module/0.22.0-2 + target_directory: ros-jazzy-rti-connext-dds-cmake-module/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-ruckig/bld_catkin.bat b/recipes/ros-jazzy-ruckig/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-ruckig/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-ruckig/build_catkin.sh b/recipes/ros-jazzy-ruckig/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-ruckig/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-ruckig/recipe.yaml b/recipes/ros-jazzy-ruckig/recipe.yaml new file mode 100644 index 00000000..f5c7722a --- /dev/null +++ b/recipes/ros-jazzy-ruckig/recipe.yaml @@ -0,0 +1,83 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-ruckig + version: 0.9.2 +source: + git: https://github.com/ros2-gbp/ruckig-release.git + tag: release/jazzy/ruckig/0.9.2-5 + target_directory: ros-jazzy-ruckig/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rviz-assimp-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-rviz-assimp-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rviz-assimp-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rviz-assimp-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-rviz-assimp-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rviz-assimp-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rviz-assimp-vendor/recipe.yaml b/recipes/ros-jazzy-rviz-assimp-vendor/recipe.yaml new file mode 100644 index 00000000..09f07721 --- /dev/null +++ b/recipes/ros-jazzy-rviz-assimp-vendor/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rviz-assimp-vendor + version: 14.1.6 +source: + git: https://github.com/ros2-gbp/rviz-release.git + tag: release/jazzy/rviz_assimp_vendor/14.1.6-1 + target_directory: ros-jazzy-rviz-assimp-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - assimp + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-ament-lint-auto + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - assimp + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-rviz-common/bld_ament_cmake.bat b/recipes/ros-jazzy-rviz-common/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rviz-common/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rviz-common/build_ament_cmake.sh b/recipes/ros-jazzy-rviz-common/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rviz-common/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rviz-common/recipe.yaml b/recipes/ros-jazzy-rviz-common/recipe.yaml new file mode 100644 index 00000000..48c223e5 --- /dev/null +++ b/recipes/ros-jazzy-rviz-common/recipe.yaml @@ -0,0 +1,135 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rviz-common + version: 14.1.6 +source: + git: https://github.com/ros2-gbp/rviz-release.git + tag: release/jazzy/rviz_common/14.1.6-1 + target_directory: ros-jazzy-rviz-common/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-cppcheck + - ros-jazzy-ament-cmake-cpplint + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-uncrustify + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-ament-lint-auto + - ros-jazzy-geometry-msgs + - ros-jazzy-message-filters + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-resource-retriever + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rviz-ogre-vendor + - ros-jazzy-rviz-rendering + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-tf2 + - ros-jazzy-tf2-ros + - ros-jazzy-tinyxml2-vendor + - ros-jazzy-urdf + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - qt-main + - ros-jazzy-geometry-msgs + - ros-jazzy-message-filters + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-resource-retriever + - ros-jazzy-ros-workspace + - ros-jazzy-rviz-ogre-vendor + - ros-jazzy-rviz-rendering + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-tf2 + - ros-jazzy-tf2-ros + - ros-jazzy-tinyxml2-vendor + - ros-jazzy-urdf + - ros-jazzy-yaml-cpp-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-rviz-default-plugins/bld_ament_cmake.bat b/recipes/ros-jazzy-rviz-default-plugins/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rviz-default-plugins/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rviz-default-plugins/build_ament_cmake.sh b/recipes/ros-jazzy-rviz-default-plugins/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rviz-default-plugins/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rviz-default-plugins/recipe.yaml b/recipes/ros-jazzy-rviz-default-plugins/recipe.yaml new file mode 100644 index 00000000..ff6b7184 --- /dev/null +++ b/recipes/ros-jazzy-rviz-default-plugins/recipe.yaml @@ -0,0 +1,146 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rviz-default-plugins + version: 14.1.6 +source: + git: https://github.com/ros2-gbp/rviz-release.git + tag: release/jazzy/rviz_default_plugins/14.1.6-1 + target_directory: ros-jazzy-rviz-default-plugins/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - qt-main + - ros-jazzy-ament-cmake-cppcheck + - ros-jazzy-ament-cmake-cpplint + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-cmake-uncrustify + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-ament-index-cpp + - ros-jazzy-ament-lint-auto + - ros-jazzy-geometry-msgs + - ros-jazzy-gz-math-vendor + - ros-jazzy-image-transport + - ros-jazzy-interactive-markers + - ros-jazzy-laser-geometry + - ros-jazzy-map-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-pluginlib + - ros-jazzy-point-cloud-transport + - ros-jazzy-rclcpp + - ros-jazzy-resource-retriever + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rviz-common + - ros-jazzy-rviz-ogre-vendor + - ros-jazzy-rviz-rendering + - ros-jazzy-rviz-rendering-tests + - ros-jazzy-rviz-visual-testing-framework + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-urdf + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - qt-main + - ros-jazzy-geometry-msgs + - ros-jazzy-gz-math-vendor + - ros-jazzy-image-transport + - ros-jazzy-interactive-markers + - ros-jazzy-laser-geometry + - ros-jazzy-map-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-pluginlib + - ros-jazzy-point-cloud-transport + - ros-jazzy-rclcpp + - ros-jazzy-resource-retriever + - ros-jazzy-ros-workspace + - ros-jazzy-rviz-common + - ros-jazzy-rviz-ogre-vendor + - ros-jazzy-rviz-rendering + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-urdf + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-rviz-ogre-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-rviz-ogre-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rviz-ogre-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rviz-ogre-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-rviz-ogre-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rviz-ogre-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rviz-ogre-vendor/patch/ros-jazzy-rviz-ogre-vendor.patch b/recipes/ros-jazzy-rviz-ogre-vendor/patch/ros-jazzy-rviz-ogre-vendor.patch new file mode 100644 index 00000000..507d530b --- /dev/null +++ b/recipes/ros-jazzy-rviz-ogre-vendor/patch/ros-jazzy-rviz-ogre-vendor.patch @@ -0,0 +1,48 @@ +diff --git a/patches/0005-fix-macos-arm64.patch b/patches/0005-fix-macos-arm64.patch +new file mode 100644 +index 000000000..9494cc9ae +--- /dev/null ++++ b/patches/0005-fix-macos-arm64.patch +@@ -0,0 +1,19 @@ ++diff --git a/CMakeLists.txt b/CMakeLists.txt ++index f4d8fd4..ffae9c8 100644 ++--- a/CMakeLists.txt +++++ b/CMakeLists.txt ++@@ -270,14 +270,6 @@ elseif(EMSCRIPTEN) ++ set(OGRE_CONFIG_THREADS "0" CACHE STRING "Threading is unstable on Emscripten" FORCE) ++ elseif (APPLE AND NOT APPLE_IOS) ++ ++- set(XCODE_ATTRIBUTE_SDKROOT macosx) ++- if(CMAKE_GENERATOR STREQUAL "Unix Makefiles") ++- execute_process(COMMAND xcodebuild -version -sdk "${XCODE_ATTRIBUTE_SDKROOT}" Path | head -n 1 OUTPUT_VARIABLE CMAKE_OSX_SYSROOT) ++- string(REGEX REPLACE "(\r?\n)+$" "" CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}") ++- else() ++- set(CMAKE_OSX_SYSROOT macosx) ++- endif() ++- ++ # Make sure that the OpenGL render system is selected for non-iOS Apple builds ++ set(OGRE_BUILD_RENDERSYSTEM_GLES2 FALSE) ++ endif () +diff --git a/patches/0006-fix-char16.patch b/patches/0006-fix-char16.patch +new file mode 100644 +index 000000000..dfc080bb9 +--- /dev/null ++++ b/patches/0006-fix-char16.patch +@@ -0,0 +1,17 @@ ++diff --git a/Components/Overlay/include/OgreUTFString.h b/Components/Overlay/include/OgreUTFString.h ++index 4b29f9d..bb55630 100644 ++--- a/Components/Overlay/include/OgreUTFString.h +++++ b/Components/Overlay/include/OgreUTFString.h ++@@ -183,10 +183,10 @@ namespace Ogre { ++ static const size_type npos = static_cast(~0); ++ ++ //! a single 32-bit Unicode character ++- typedef uint32 unicode_char; +++ typedef char32_t unicode_char; ++ ++ //! a single UTF-16 code point ++- typedef uint16 code_point; +++ typedef char16_t code_point; ++ ++ //! value type typedef for use in iterators ++ typedef code_point value_type; diff --git a/recipes/ros-jazzy-rviz-ogre-vendor/recipe.yaml b/recipes/ros-jazzy-rviz-ogre-vendor/recipe.yaml new file mode 100644 index 00000000..68d24e9c --- /dev/null +++ b/recipes/ros-jazzy-rviz-ogre-vendor/recipe.yaml @@ -0,0 +1,119 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rviz-ogre-vendor + version: 14.1.6 +source: + git: https://github.com/ros2-gbp/rviz-release.git + tag: release/jazzy/rviz_ogre_vendor/14.1.6-1 + target_directory: ros-jazzy-rviz-ogre-vendor/src/work + patches: + - patch/ros-jazzy-rviz-ogre-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - vcstool + - patch + host: + - ${{ 'libglu' if linux }} + - assimp + - if: build_platform == target_platform + then: + - pkg-config + - freeimage + - freetype + - numpy + - pip + - pugixml + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-ament-lint-auto + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - xorg-libx11 + - xorg-libxaw + - xorg-libxrandr + - xorg-xorgproto + - zlib + - zziplib + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - assimp + - freetype + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - xorg-libx11 + - xorg-libxaw + - xorg-libxrandr + - xorg-xorgproto + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-rviz-rendering-tests/bld_ament_cmake.bat b/recipes/ros-jazzy-rviz-rendering-tests/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rviz-rendering-tests/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rviz-rendering-tests/build_ament_cmake.sh b/recipes/ros-jazzy-rviz-rendering-tests/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rviz-rendering-tests/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rviz-rendering-tests/recipe.yaml b/recipes/ros-jazzy-rviz-rendering-tests/recipe.yaml new file mode 100644 index 00000000..d7908c89 --- /dev/null +++ b/recipes/ros-jazzy-rviz-rendering-tests/recipe.yaml @@ -0,0 +1,109 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rviz-rendering-tests + version: 14.1.6 +source: + git: https://github.com/ros2-gbp/rviz-release.git + tag: release/jazzy/rviz_rendering_tests/14.1.6-1 + target_directory: ros-jazzy-rviz-rendering-tests/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-cppcheck + - ros-jazzy-ament-cmake-cpplint + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-uncrustify + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-ament-index-cpp + - ros-jazzy-ament-lint-auto + - ros-jazzy-resource-retriever + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rviz-rendering + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - ros-jazzy-resource-retriever + - ros-jazzy-ros-workspace + - ros-jazzy-rviz-rendering + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-rviz-rendering/bld_ament_cmake.bat b/recipes/ros-jazzy-rviz-rendering/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rviz-rendering/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rviz-rendering/build_ament_cmake.sh b/recipes/ros-jazzy-rviz-rendering/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rviz-rendering/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rviz-rendering/recipe.yaml b/recipes/ros-jazzy-rviz-rendering/recipe.yaml new file mode 100644 index 00000000..fdae0f76 --- /dev/null +++ b/recipes/ros-jazzy-rviz-rendering/recipe.yaml @@ -0,0 +1,118 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rviz-rendering + version: 14.1.6 +source: + git: https://github.com/ros2-gbp/rviz-release.git + tag: release/jazzy/rviz_rendering/14.1.6-1 + target_directory: ros-jazzy-rviz-rendering/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - glew + - numpy + - pip + - python + - qt-main + - ros-jazzy-ament-cmake-cppcheck + - ros-jazzy-ament-cmake-cpplint + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-cmake-uncrustify + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-ament-index-cpp + - ros-jazzy-ament-lint-auto + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-resource-retriever + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rviz-assimp-vendor + - ros-jazzy-rviz-ogre-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - eigen + - python + - qt-main + - ros-jazzy-ament-index-cpp + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-resource-retriever + - ros-jazzy-ros-workspace + - ros-jazzy-rviz-assimp-vendor + - ros-jazzy-rviz-ogre-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-rviz-visual-testing-framework/bld_ament_cmake.bat b/recipes/ros-jazzy-rviz-visual-testing-framework/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rviz-visual-testing-framework/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rviz-visual-testing-framework/build_ament_cmake.sh b/recipes/ros-jazzy-rviz-visual-testing-framework/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rviz-visual-testing-framework/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rviz-visual-testing-framework/recipe.yaml b/recipes/ros-jazzy-rviz-visual-testing-framework/recipe.yaml new file mode 100644 index 00000000..41ac3593 --- /dev/null +++ b/recipes/ros-jazzy-rviz-visual-testing-framework/recipe.yaml @@ -0,0 +1,123 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rviz-visual-testing-framework + version: 14.1.6 +source: + git: https://github.com/ros2-gbp/rviz-release.git + tag: release/jazzy/rviz_visual_testing_framework/14.1.6-1 + target_directory: ros-jazzy-rviz-visual-testing-framework/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-cppcheck + - ros-jazzy-ament-cmake-cpplint + - ros-jazzy-ament-cmake-gmock + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-uncrustify + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-ament-lint-auto + - ros-jazzy-geometry-msgs + - ros-jazzy-rclcpp + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rviz-common + - ros-jazzy-rviz-ogre-vendor + - ros-jazzy-rviz-rendering + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-geometry-msgs + - ros-jazzy-rclcpp + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-rviz-common + - ros-jazzy-rviz-ogre-vendor + - ros-jazzy-rviz-rendering + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-rviz2/bld_ament_cmake.bat b/recipes/ros-jazzy-rviz2/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-rviz2/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-rviz2/build_ament_cmake.sh b/recipes/ros-jazzy-rviz2/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-rviz2/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-rviz2/recipe.yaml b/recipes/ros-jazzy-rviz2/recipe.yaml new file mode 100644 index 00000000..9e705dc7 --- /dev/null +++ b/recipes/ros-jazzy-rviz2/recipe.yaml @@ -0,0 +1,112 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-rviz2 + version: 14.1.6 +source: + git: https://github.com/ros2-gbp/rviz-release.git + tag: release/jazzy/rviz2/14.1.6-1 + target_directory: ros-jazzy-rviz2/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - pyyaml + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-cppcheck + - ros-jazzy-ament-cmake-cpplint + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-cmake-uncrustify + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-ament-lint-auto + - ros-jazzy-geometry-msgs + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rviz-common + - ros-jazzy-rviz-ogre-vendor + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rviz-common + - ros-jazzy-rviz-default-plugins + - ros-jazzy-rviz-ogre-vendor + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-sbg-driver/bld_ament_cmake.bat b/recipes/ros-jazzy-sbg-driver/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-sbg-driver/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-sbg-driver/build_ament_cmake.sh b/recipes/ros-jazzy-sbg-driver/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-sbg-driver/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-sbg-driver/recipe.yaml b/recipes/ros-jazzy-sbg-driver/recipe.yaml new file mode 100644 index 00000000..704a2649 --- /dev/null +++ b/recipes/ros-jazzy-sbg-driver/recipe.yaml @@ -0,0 +1,108 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-sbg-driver + version: 3.2.0 +source: + git: https://github.com/SBG-Systems/sbg_ros2-release.git + tag: release/jazzy/sbg_driver/3.2.0-1 + target_directory: ros-jazzy-sbg-driver/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nmea-msgs + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-rtcm-msgs + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-nav-msgs + - ros-jazzy-nmea-msgs + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-rtcm-msgs + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-sdformat-test-files/bld_catkin.bat b/recipes/ros-jazzy-sdformat-test-files/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-sdformat-test-files/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-sdformat-test-files/build_catkin.sh b/recipes/ros-jazzy-sdformat-test-files/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-sdformat-test-files/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-sdformat-test-files/recipe.yaml b/recipes/ros-jazzy-sdformat-test-files/recipe.yaml new file mode 100644 index 00000000..ab3ecda9 --- /dev/null +++ b/recipes/ros-jazzy-sdformat-test-files/recipe.yaml @@ -0,0 +1,84 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-sdformat-test-files + version: 1.0.2 +source: + git: https://github.com/ros2-gbp/sdformat_urdf-release.git + tag: release/jazzy/sdformat_test_files/1.0.2-1 + target_directory: ros-jazzy-sdformat-test-files/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - cmake + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-sdformat-urdf/bld_ament_cmake.bat b/recipes/ros-jazzy-sdformat-urdf/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-sdformat-urdf/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-sdformat-urdf/build_ament_cmake.sh b/recipes/ros-jazzy-sdformat-urdf/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-sdformat-urdf/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-sdformat-urdf/recipe.yaml b/recipes/ros-jazzy-sdformat-urdf/recipe.yaml new file mode 100644 index 00000000..a939984c --- /dev/null +++ b/recipes/ros-jazzy-sdformat-urdf/recipe.yaml @@ -0,0 +1,103 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-sdformat-urdf + version: 1.0.2 +source: + git: https://github.com/ros2-gbp/sdformat_urdf-release.git + tag: release/jazzy/sdformat_urdf/1.0.2-1 + target_directory: ros-jazzy-sdformat-urdf/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-pluginlib + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sdformat-test-files + - ros-jazzy-sdformat-vendor + - ros-jazzy-tinyxml2-vendor + - ros-jazzy-urdf + - ros-jazzy-urdf-parser-plugin + - ros2-distro-mutex 0.6.* jazzy_* + - urdfdom_headers + run: + - python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-pluginlib + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-sdformat-vendor + - ros-jazzy-tinyxml2-vendor + - ros-jazzy-urdf + - ros-jazzy-urdf-parser-plugin + - ros2-distro-mutex 0.6.* jazzy_* + - urdfdom_headers + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-sdformat-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-sdformat-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-sdformat-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-sdformat-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-sdformat-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-sdformat-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-sdformat-vendor/patch/ros-jazzy-sdformat-vendor.patch b/recipes/ros-jazzy-sdformat-vendor/patch/ros-jazzy-sdformat-vendor.patch new file mode 100644 index 00000000..afae280c --- /dev/null +++ b/recipes/ros-jazzy-sdformat-vendor/patch/ros-jazzy-sdformat-vendor.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 723d6a6..08a726c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -38,7 +38,7 @@ if(NOT $ENV{GZ_RELAX_VERSION_MATCH} STREQUAL "") + set(VERSION_MATCH "") + endif() + +-find_package(${LIB_NAME_FULL} ${VERSION_MATCH} ${LIB_VER} COMPONENTS all QUIET) ++find_package(${LIB_NAME_FULL} COMPONENTS all QUIET) + + ament_vendor(${LIB_NAME_UNDERSCORE}_vendor + SATISFIED ${${LIB_NAME_FULL}_FOUND} diff --git a/recipes/ros-jazzy-sdformat-vendor/recipe.yaml b/recipes/ros-jazzy-sdformat-vendor/recipe.yaml new file mode 100644 index 00000000..6b4d79f9 --- /dev/null +++ b/recipes/ros-jazzy-sdformat-vendor/recipe.yaml @@ -0,0 +1,113 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-sdformat-vendor + version: 0.0.8 +source: + git: https://github.com/ros2-gbp/sdformat_vendor-release.git + tag: release/jazzy/sdformat_vendor/0.0.8-1 + target_directory: ros-jazzy-sdformat-vendor/src/work + patches: + - patch/ros-jazzy-sdformat-vendor.patch + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - if: build_platform != target_platform + then: + - pybind11 + host: + - if: build_platform == target_platform + then: + - pkg-config + - libxml2 + - numpy + - pip + - psutil + - pybind11 + - pytest + - python + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-core + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-tools-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-urdfdom + - ros2-distro-mutex 0.6.* jazzy_* + - sdformat14 + - tinyxml2 + run: + - pybind11 + - python + - ros-jazzy-gz-cmake-vendor + - ros-jazzy-gz-math-vendor + - ros-jazzy-gz-tools-vendor + - ros-jazzy-gz-utils-vendor + - ros-jazzy-ros-workspace + - ros-jazzy-urdfdom + - ros2-distro-mutex 0.6.* jazzy_* + - sdformat14 + - tinyxml2 + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-sdl2-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-sdl2-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-sdl2-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-sdl2-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-sdl2-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-sdl2-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-sdl2-vendor/recipe.yaml b/recipes/ros-jazzy-sdl2-vendor/recipe.yaml new file mode 100644 index 00000000..97b44f93 --- /dev/null +++ b/recipes/ros-jazzy-sdl2-vendor/recipe.yaml @@ -0,0 +1,86 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-sdl2-vendor + version: 3.3.0 +source: + git: https://github.com/ros2-gbp/joystick_drivers-release.git + tag: release/jazzy/sdl2_vendor/3.3.0-3 + target_directory: ros-jazzy-sdl2-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - sdl2 + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - sdl2 + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-self-test/bld_ament_cmake.bat b/recipes/ros-jazzy-self-test/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-self-test/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-self-test/build_ament_cmake.sh b/recipes/ros-jazzy-self-test/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-self-test/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-self-test/recipe.yaml b/recipes/ros-jazzy-self-test/recipe.yaml new file mode 100644 index 00000000..e68ec7e1 --- /dev/null +++ b/recipes/ros-jazzy-self-test/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-self-test + version: 4.2.1 +source: + git: https://github.com/ros2-gbp/diagnostics-release.git + tag: release/jazzy/self_test/4.2.1-1 + target_directory: ros-jazzy-self-test/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-diagnostic-msgs + - ros-jazzy-diagnostic-updater + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-diagnostic-msgs + - ros-jazzy-diagnostic-updater + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-sensor-msgs-py/bld_ament_python.bat b/recipes/ros-jazzy-sensor-msgs-py/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-sensor-msgs-py/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-sensor-msgs-py/build_ament_python.sh b/recipes/ros-jazzy-sensor-msgs-py/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-sensor-msgs-py/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-sensor-msgs-py/recipe.yaml b/recipes/ros-jazzy-sensor-msgs-py/recipe.yaml new file mode 100644 index 00000000..dc5d0525 --- /dev/null +++ b/recipes/ros-jazzy-sensor-msgs-py/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-sensor-msgs-py + version: 5.3.5 +source: + git: https://github.com/ros2-gbp/common_interfaces-release.git + tag: release/jazzy/sensor_msgs_py/5.3.5-1 + target_directory: ros-jazzy-sensor-msgs-py/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - numpy + - python + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-sensor-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-sensor-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-sensor-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-sensor-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-sensor-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-sensor-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-sensor-msgs/recipe.yaml b/recipes/ros-jazzy-sensor-msgs/recipe.yaml new file mode 100644 index 00000000..79bdff76 --- /dev/null +++ b/recipes/ros-jazzy-sensor-msgs/recipe.yaml @@ -0,0 +1,96 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-sensor-msgs + version: 5.3.5 +source: + git: https://github.com/ros2-gbp/common_interfaces-release.git + tag: release/jazzy/sensor_msgs/5.3.5-1 + target_directory: ros-jazzy-sensor-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-cmake + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-service-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-service-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-service-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-service-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-service-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-service-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-service-msgs/recipe.yaml b/recipes/ros-jazzy-service-msgs/recipe.yaml new file mode 100644 index 00000000..ce0aa2b7 --- /dev/null +++ b/recipes/ros-jazzy-service-msgs/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-service-msgs + version: 2.0.2 +source: + git: https://github.com/ros2-gbp/rcl_interfaces-release.git + tag: release/jazzy/service_msgs/2.0.2-2 + target_directory: ros-jazzy-service-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-core-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-core-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-shape-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-shape-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-shape-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-shape-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-shape-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-shape-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-shape-msgs/recipe.yaml b/recipes/ros-jazzy-shape-msgs/recipe.yaml new file mode 100644 index 00000000..96ca952c --- /dev/null +++ b/recipes/ros-jazzy-shape-msgs/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-shape-msgs + version: 5.3.5 +source: + git: https://github.com/ros2-gbp/common_interfaces-release.git + tag: release/jazzy/shape_msgs/5.3.5-1 + target_directory: ros-jazzy-shape-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-simulation/bld_ament_cmake.bat b/recipes/ros-jazzy-simulation/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-simulation/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-simulation/build_ament_cmake.sh b/recipes/ros-jazzy-simulation/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-simulation/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-simulation/recipe.yaml b/recipes/ros-jazzy-simulation/recipe.yaml new file mode 100644 index 00000000..958ceafa --- /dev/null +++ b/recipes/ros-jazzy-simulation/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-simulation + version: 0.11.0 +source: + git: https://github.com/ros2-gbp/variants-release.git + tag: release/jazzy/simulation/0.11.0-1 + target_directory: ros-jazzy-simulation/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-base + - ros-jazzy-ros-gz-bridge + - ros-jazzy-ros-gz-image + - ros-jazzy-ros-gz-interfaces + - ros-jazzy-ros-gz-sim + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-slam-toolbox/bld_ament_cmake.bat b/recipes/ros-jazzy-slam-toolbox/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-slam-toolbox/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-slam-toolbox/build_ament_cmake.sh b/recipes/ros-jazzy-slam-toolbox/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-slam-toolbox/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-slam-toolbox/recipe.yaml b/recipes/ros-jazzy-slam-toolbox/recipe.yaml new file mode 100644 index 00000000..c6fc92d5 --- /dev/null +++ b/recipes/ros-jazzy-slam-toolbox/recipe.yaml @@ -0,0 +1,167 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-slam-toolbox + version: 2.8.2 +source: + git: https://github.com/SteveMacenski/slam_toolbox-release.git + tag: release/jazzy/slam_toolbox/2.8.2-1 + target_directory: ros-jazzy-slam-toolbox/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - ${{ 'qt-main' if (build_platform != target_platform) }} + host: + - if: build_platform == target_platform + then: + - pkg-config + - ceres-solver + - eigen + - libboost-devel + - libboost-python-devel + - liblapack + - numpy + - pip + - python + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-cpplint + - ros-jazzy-ament-cmake-flake8 + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-uncrustify + - ros-jazzy-ament-lint-auto + - ros-jazzy-bond + - ros-jazzy-bondcpp + - ros-jazzy-builtin-interfaces + - ros-jazzy-interactive-markers + - ros-jazzy-launch + - ros-jazzy-launch-testing + - ros-jazzy-lifecycle-msgs + - ros-jazzy-message-filters + - ros-jazzy-nav-msgs + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-rviz-common + - ros-jazzy-rviz-default-plugins + - ros-jazzy-rviz-ogre-vendor + - ros-jazzy-rviz-rendering + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-tf2-sensor-msgs + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - suitesparse + - tbb + - tbb-devel + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - ceres-solver + - eigen + - libboost-devel + - libboost-python-devel + - liblapack + - python + - qt-main + - ros-jazzy-bond + - ros-jazzy-bondcpp + - ros-jazzy-builtin-interfaces + - ros-jazzy-interactive-markers + - ros-jazzy-lifecycle-msgs + - ros-jazzy-message-filters + - ros-jazzy-nav-msgs + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-lifecycle + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-rviz-common + - ros-jazzy-rviz-default-plugins + - ros-jazzy-rviz-ogre-vendor + - ros-jazzy-rviz-rendering + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros-jazzy-tf2-sensor-msgs + - ros-jazzy-visualization-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - suitesparse + - tbb + - tbb-devel + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-smclib/bld_ament_cmake.bat b/recipes/ros-jazzy-smclib/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-smclib/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-smclib/build_ament_cmake.sh b/recipes/ros-jazzy-smclib/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-smclib/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-smclib/recipe.yaml b/recipes/ros-jazzy-smclib/recipe.yaml new file mode 100644 index 00000000..f5c53d1b --- /dev/null +++ b/recipes/ros-jazzy-smclib/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-smclib + version: 4.1.0 +source: + git: https://github.com/ros2-gbp/bond_core-release.git + tag: release/jazzy/smclib/4.1.0-1 + target_directory: ros-jazzy-smclib/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-spdlog-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-spdlog-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-spdlog-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-spdlog-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-spdlog-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-spdlog-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-spdlog-vendor/recipe.yaml b/recipes/ros-jazzy-spdlog-vendor/recipe.yaml new file mode 100644 index 00000000..28a97849 --- /dev/null +++ b/recipes/ros-jazzy-spdlog-vendor/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-spdlog-vendor + version: 1.6.1 +source: + git: https://github.com/ros2-gbp/spdlog_vendor-release.git + tag: release/jazzy/spdlog_vendor/1.6.1-1 + target_directory: ros-jazzy-spdlog-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - spdlog + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - spdlog + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-sqlite3-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-sqlite3-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-sqlite3-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-sqlite3-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-sqlite3-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-sqlite3-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-sqlite3-vendor/recipe.yaml b/recipes/ros-jazzy-sqlite3-vendor/recipe.yaml new file mode 100644 index 00000000..5ab4929f --- /dev/null +++ b/recipes/ros-jazzy-sqlite3-vendor/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-sqlite3-vendor + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/sqlite3_vendor/0.26.6-1 + target_directory: ros-jazzy-sqlite3-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - sqlite + - sqlite 3.* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - sqlite + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-srdfdom/bld_ament_cmake.bat b/recipes/ros-jazzy-srdfdom/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-srdfdom/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-srdfdom/build_ament_cmake.sh b/recipes/ros-jazzy-srdfdom/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-srdfdom/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-srdfdom/recipe.yaml b/recipes/ros-jazzy-srdfdom/recipe.yaml new file mode 100644 index 00000000..1b64e2cc --- /dev/null +++ b/recipes/ros-jazzy-srdfdom/recipe.yaml @@ -0,0 +1,100 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-srdfdom + version: 2.0.5 +source: + git: https://github.com/ros2-gbp/srdfdom-release.git + tag: release/jazzy/srdfdom/2.0.5-1 + target_directory: ros-jazzy-srdfdom/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - console_bridge + - libboost-devel + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-cmake + - ros-jazzy-console-bridge-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tinyxml2-vendor + - ros-jazzy-urdf + - ros-jazzy-urdfdom-headers + - ros2-distro-mutex 0.6.* jazzy_* + run: + - console_bridge + - python + - ros-jazzy-console-bridge-vendor + - ros-jazzy-ros-workspace + - ros-jazzy-tinyxml2-vendor + - ros-jazzy-urdf + - ros-jazzy-urdfdom-py + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-sros2-cmake/bld_ament_cmake.bat b/recipes/ros-jazzy-sros2-cmake/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-sros2-cmake/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-sros2-cmake/build_ament_cmake.sh b/recipes/ros-jazzy-sros2-cmake/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-sros2-cmake/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-sros2-cmake/recipe.yaml b/recipes/ros-jazzy-sros2-cmake/recipe.yaml new file mode 100644 index 00000000..99ee7ba8 --- /dev/null +++ b/recipes/ros-jazzy-sros2-cmake/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-sros2-cmake + version: 0.13.2 +source: + git: https://github.com/ros2-gbp/sros2-release.git + tag: release/jazzy/sros2_cmake/0.13.2-1 + target_directory: ros-jazzy-sros2-cmake/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-test + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros-jazzy-sros2 + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros-jazzy-sros2 + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-sros2/bld_ament_python.bat b/recipes/ros-jazzy-sros2/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-sros2/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-sros2/build_ament_python.sh b/recipes/ros-jazzy-sros2/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-sros2/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-sros2/recipe.yaml b/recipes/ros-jazzy-sros2/recipe.yaml new file mode 100644 index 00000000..3d32f32f --- /dev/null +++ b/recipes/ros-jazzy-sros2/recipe.yaml @@ -0,0 +1,98 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-sros2 + version: 0.13.2 +source: + git: https://github.com/ros2-gbp/sros2-release.git + tag: release/jazzy/sros2/0.13.2-1 + target_directory: ros-jazzy-sros2/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-mypy + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-testing + - ros-jazzy-ros-workspace + - ros-jazzy-test-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - argcomplete + - cryptography + - importlib_resources + - lxml + - python + - ros-jazzy-ament-index-python + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-statistics-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-statistics-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-statistics-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-statistics-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-statistics-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-statistics-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-statistics-msgs/recipe.yaml b/recipes/ros-jazzy-statistics-msgs/recipe.yaml new file mode 100644 index 00000000..cf788666 --- /dev/null +++ b/recipes/ros-jazzy-statistics-msgs/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-statistics-msgs + version: 2.0.2 +source: + git: https://github.com/ros2-gbp/rcl_interfaces-release.git + tag: release/jazzy/statistics_msgs/2.0.2-2 + target_directory: ros-jazzy-statistics-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-std-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-std-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-std-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-std-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-std-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-std-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-std-msgs/recipe.yaml b/recipes/ros-jazzy-std-msgs/recipe.yaml new file mode 100644 index 00000000..7694990b --- /dev/null +++ b/recipes/ros-jazzy-std-msgs/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-std-msgs + version: 5.3.5 +source: + git: https://github.com/ros2-gbp/common_interfaces-release.git + tag: release/jazzy/std_msgs/5.3.5-1 + target_directory: ros-jazzy-std-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-std-srvs/bld_ament_cmake.bat b/recipes/ros-jazzy-std-srvs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-std-srvs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-std-srvs/build_ament_cmake.sh b/recipes/ros-jazzy-std-srvs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-std-srvs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-std-srvs/recipe.yaml b/recipes/ros-jazzy-std-srvs/recipe.yaml new file mode 100644 index 00000000..d3bd123a --- /dev/null +++ b/recipes/ros-jazzy-std-srvs/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-std-srvs + version: 5.3.5 +source: + git: https://github.com/ros2-gbp/common_interfaces-release.git + tag: release/jazzy/std_srvs/5.3.5-1 + target_directory: ros-jazzy-std-srvs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-stereo-image-proc/bld_ament_cmake.bat b/recipes/ros-jazzy-stereo-image-proc/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-stereo-image-proc/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-stereo-image-proc/build_ament_cmake.sh b/recipes/ros-jazzy-stereo-image-proc/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-stereo-image-proc/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-stereo-image-proc/recipe.yaml b/recipes/ros-jazzy-stereo-image-proc/recipe.yaml new file mode 100644 index 00000000..68ee2bb0 --- /dev/null +++ b/recipes/ros-jazzy-stereo-image-proc/recipe.yaml @@ -0,0 +1,114 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-stereo-image-proc + version: 5.0.6 +source: + git: https://github.com/ros2-gbp/image_pipeline-release.git + tag: release/jazzy/stereo_image_proc/5.0.6-1 + target_directory: ros-jazzy-stereo-image-proc/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libopencv + - numpy + - pip + - py-opencv + - python + - ros-jazzy-ament-cmake-auto + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-cv-bridge + - ros-jazzy-image-geometry + - ros-jazzy-image-proc + - ros-jazzy-image-transport + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-message-filters + - ros-jazzy-python-cmake-module + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rclpy + - ros-jazzy-ros-environment + - ros-jazzy-ros-testing + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-stereo-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-cv-bridge + - ros-jazzy-image-geometry + - ros-jazzy-image-proc + - ros-jazzy-image-transport + - ros-jazzy-message-filters + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-stereo-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-stereo-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-stereo-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-stereo-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-stereo-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-stereo-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-stereo-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-stereo-msgs/recipe.yaml b/recipes/ros-jazzy-stereo-msgs/recipe.yaml new file mode 100644 index 00000000..c6f78758 --- /dev/null +++ b/recipes/ros-jazzy-stereo-msgs/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-stereo-msgs + version: 5.3.5 +source: + git: https://github.com/ros2-gbp/common_interfaces-release.git + tag: release/jazzy/stereo_msgs/5.3.5-1 + target_directory: ros-jazzy-stereo-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-stomp/bld_catkin.bat b/recipes/ros-jazzy-stomp/bld_catkin.bat new file mode 100755 index 00000000..854efe1b --- /dev/null +++ b/recipes/ros-jazzy-stomp/bld_catkin.bat @@ -0,0 +1,81 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +:: ROS_BUILD_SHARED_LIBS is always defined in CMake by catkin +:: if ROS (1) is build as shared library . However, some packages are not +:: passing compilation flags from CMake to other build systems (such as qmake), +:: so we enable it explicitly via the CL environment variable, see +:: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170 +set CL=/DROS_BUILD_SHARED_LIBS=1 /DNOGDI=1 + +set "CATKIN_BUILD_BINARY_PACKAGE_ARGS=-DCATKIN_BUILD_BINARY_PACKAGE=1" +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: create catkin cookie to make it is a catkin workspace + type NUL > %LIBRARY_PREFIX%\.catkin + :: keep the workspace activation scripts (e.g., local_setup.bat) + set CATKIN_BUILD_BINARY_PACKAGE_ARGS= +) + +rd /s /q build +mkdir build +pushd build + +set SKIP_TESTING=ON + +cmake ^ + -G "Ninja" ^ + --compile-no-warning-as-error ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ + -DBUILD_SHARED_LIBS=ON ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + %CATKIN_BUILD_BINARY_PACKAGE_ARGS% ^ + -DCATKIN_SKIP_TESTING=%SKIP_TESTING% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-eigenpy" ( + cmake --build . --config Release --target all --parallel 1 + if errorlevel 1 exit 1 +) else ( + cmake --build . --config Release --target all + if errorlevel 1 exit 1 +) + +if "%SKIP_TESTING%" == "OFF" ( + cmake --build . --config Release --target run_tests + if errorlevel 1 exit 1 +) + +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +if "%PKG_NAME%" == "ros-jazzy-catkin" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + ) +) + +if "%PKG_NAME%" == "ros-jazzy-ros-workspace" ( + :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. + :: This will allow them to be run on environment activation. + for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + ) +) diff --git a/recipes/ros-jazzy-stomp/build_catkin.sh b/recipes/ros-jazzy-stomp/build_catkin.sh new file mode 100755 index 00000000..2992e047 --- /dev/null +++ b/recipes/ros-jazzy-stomp/build_catkin.sh @@ -0,0 +1,131 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +CATKIN_BUILD_BINARY_PACKAGE="ON" + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # create catkin cookie to make it is a catkin workspace + touch $PREFIX/.catkin + # keep the workspace activation scripts (e.g., local_setup.bat) + CATKIN_BUILD_BINARY_PACKAGE="OFF" +fi + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python $ROS_PYTHON_VERSION" +# Fix up SP_DIR which for some reason might contain a path to a wrong Python version +FIXED_SP_DIR=$(echo $SP_DIR | sed -E "s/python[0-9]+\.[0-9]+/python$ROS_PYTHON_VERSION/") +echo "Using site-package dir ${FIXED_SP_DIR}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python$ROS_PYTHON_VERSION/site-packages~$BUILD_PREFIX/lib/python$ROS_PYTHON_VERSION/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true + # way around bad CPU type issues + # rm $PREFIX/bin/doxygen || echo "doxygen not found" + # rm $PREFIX/bin/dia || echo "dia not found" + # rm $PREFIX/bin/dot || echo "dot not found" +fi + +# NOTE: there might be undefined references occurring +# in the Boost.system library, depending on the C++ versions +# used to compile Boost. We can avoid them by forcing the use of +# the header-only version of the library. +export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY" + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS=1"; + export CXXFLAGS="$CXXFLAGS -D__STDC_FORMAT_MACROS=1"; + # I am too scared to turn this on for now ... + # export LDFLAGS="$LDFLAGS -lrt"; + # Some qt stuff uses g++ directly - fix these use cases + ln -s $GXX $BUILD_PREFIX/bin/g++ +fi + +export SKIP_TESTING=ON + +cmake ${CMAKE_ARGS} --compile-no-warning-as-error \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DBUILD_SHARED_LIBS=ON \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPYTHON_INSTALL_DIR=$FIXED_SP_DIR \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCATKIN_BUILD_BINARY_PACKAGE=$CATKIN_BUILD_BINARY_PACKAGE \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + -G "Ninja" \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target all + +if [[ "$SKIP_TESTING" == "OFF" ]]; then + cmake --build . --config Release --target run_tests +fi + +cmake --build . --config Release --target install + +if [ "${PKG_NAME}" == "ros-jazzy-catkin" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-environment" ]; then + for SCRIPT in "1.ros_distro.sh" "1.ros_etc_dir.sh" "1.ros_package_path.sh" "1.ros_python_version.sh" "1.ros_version.sh" + do + mkdir -p "${PREFIX}/etc/conda/activate.d" + cp "${PREFIX}/etc/catkin/profile.d/${SCRIPT}" "${PREFIX}/etc/conda/activate.d/${SCRIPT}" + done +fi + +if [ "${PKG_NAME}" == "ros-jazzy-ros-workspace" ]; then + # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. + # This will allow them to be run on environment activation. + for CHANGE in "activate" "deactivate" + do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" + done +fi diff --git a/recipes/ros-jazzy-stomp/recipe.yaml b/recipes/ros-jazzy-stomp/recipe.yaml new file mode 100644 index 00000000..742f11ea --- /dev/null +++ b/recipes/ros-jazzy-stomp/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-stomp + version: 0.1.2 +source: + git: https://github.com/ros2-gbp/stomp-release.git + tag: release/jazzy/stomp/0.1.2-4 + target_directory: ros-jazzy-stomp/src/work + +build: + script: ${{ '$RECIPE_DIR/build_catkin.sh' if unix else '%RECIPE_DIR%\\bld_catkin.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - console_bridge + - eigen + - gtest + - numpy + - pip + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-industrial-cmake-boilerplate + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - console_bridge + - eigen + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tango-icons-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-tango-icons-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-tango-icons-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tango-icons-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-tango-icons-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-tango-icons-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-tango-icons-vendor/recipe.yaml b/recipes/ros-jazzy-tango-icons-vendor/recipe.yaml new file mode 100644 index 00000000..af77ce1b --- /dev/null +++ b/recipes/ros-jazzy-tango-icons-vendor/recipe.yaml @@ -0,0 +1,86 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tango-icons-vendor + version: 0.3.0 +source: + git: https://github.com/ros2-gbp/tango_icons_vendor-release.git + tag: release/jazzy/tango_icons_vendor/0.3.0-3 + target_directory: ros-jazzy-tango-icons-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tcb-span/bld_ament_cmake.bat b/recipes/ros-jazzy-tcb-span/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-tcb-span/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tcb-span/build_ament_cmake.sh b/recipes/ros-jazzy-tcb-span/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-tcb-span/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-tcb-span/recipe.yaml b/recipes/ros-jazzy-tcb-span/recipe.yaml new file mode 100644 index 00000000..50b40847 --- /dev/null +++ b/recipes/ros-jazzy-tcb-span/recipe.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tcb-span + version: 1.0.2 +source: + git: https://github.com/ros2-gbp/cpp_polyfills-release.git + tag: release/jazzy/tcb_span/1.0.2-5 + target_directory: ros-jazzy-tcb-span/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-teleop-twist-joy/bld_ament_cmake.bat b/recipes/ros-jazzy-teleop-twist-joy/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-teleop-twist-joy/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-teleop-twist-joy/build_ament_cmake.sh b/recipes/ros-jazzy-teleop-twist-joy/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-teleop-twist-joy/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-teleop-twist-joy/recipe.yaml b/recipes/ros-jazzy-teleop-twist-joy/recipe.yaml new file mode 100644 index 00000000..aa615497 --- /dev/null +++ b/recipes/ros-jazzy-teleop-twist-joy/recipe.yaml @@ -0,0 +1,98 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-teleop-twist-joy + version: 2.6.2 +source: + git: https://github.com/ros2-gbp/teleop_twist_joy-release.git + tag: release/jazzy/teleop_twist_joy/2.6.2-1 + target_directory: ros-jazzy-teleop-twist-joy/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-launch-ros + - ros-jazzy-launch-testing-ament-cmake + - ros-jazzy-launch-testing-ros + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-joy + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-teleop-twist-keyboard/bld_ament_python.bat b/recipes/ros-jazzy-teleop-twist-keyboard/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-teleop-twist-keyboard/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-teleop-twist-keyboard/build_ament_python.sh b/recipes/ros-jazzy-teleop-twist-keyboard/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-teleop-twist-keyboard/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-teleop-twist-keyboard/recipe.yaml b/recipes/ros-jazzy-teleop-twist-keyboard/recipe.yaml new file mode 100644 index 00000000..e8fdb0d1 --- /dev/null +++ b/recipes/ros-jazzy-teleop-twist-keyboard/recipe.yaml @@ -0,0 +1,89 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-teleop-twist-keyboard + version: 2.4.0 +source: + git: https://github.com/ros2-gbp/teleop_twist_keyboard-release.git + tag: release/jazzy/teleop_twist_keyboard/2.4.0-2 + target_directory: ros-jazzy-teleop-twist-keyboard/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-test-interface-files/bld_ament_cmake.bat b/recipes/ros-jazzy-test-interface-files/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-test-interface-files/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-test-interface-files/build_ament_cmake.sh b/recipes/ros-jazzy-test-interface-files/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-test-interface-files/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-test-interface-files/recipe.yaml b/recipes/ros-jazzy-test-interface-files/recipe.yaml new file mode 100644 index 00000000..ae1bd329 --- /dev/null +++ b/recipes/ros-jazzy-test-interface-files/recipe.yaml @@ -0,0 +1,84 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-test-interface-files + version: 0.11.0 +source: + git: https://github.com/ros2-gbp/test_interface_files-release.git + tag: release/jazzy/test_interface_files/0.11.0-3 + target_directory: ros-jazzy-test-interface-files/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-core + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-test-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-test-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-test-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-test-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-test-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-test-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-test-msgs/recipe.yaml b/recipes/ros-jazzy-test-msgs/recipe.yaml new file mode 100644 index 00000000..f39a0932 --- /dev/null +++ b/recipes/ros-jazzy-test-msgs/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-test-msgs + version: 2.0.2 +source: + git: https://github.com/ros2-gbp/rcl_interfaces-release.git + tag: release/jazzy/test_msgs/2.0.2-2 + target_directory: ros-jazzy-test-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-test-interface-files + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tf2-bullet/bld_ament_cmake.bat b/recipes/ros-jazzy-tf2-bullet/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-tf2-bullet/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tf2-bullet/build_ament_cmake.sh b/recipes/ros-jazzy-tf2-bullet/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-tf2-bullet/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-tf2-bullet/recipe.yaml b/recipes/ros-jazzy-tf2-bullet/recipe.yaml new file mode 100644 index 00000000..b5bd3aaa --- /dev/null +++ b/recipes/ros-jazzy-tf2-bullet/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tf2-bullet + version: 0.36.7 +source: + git: https://github.com/ros2-gbp/geometry2-release.git + tag: release/jazzy/tf2_bullet/0.36.7-1 + target_directory: ros-jazzy-tf2-bullet/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - bullet + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - bullet + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tf2-eigen-kdl/bld_ament_cmake.bat b/recipes/ros-jazzy-tf2-eigen-kdl/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-tf2-eigen-kdl/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tf2-eigen-kdl/build_ament_cmake.sh b/recipes/ros-jazzy-tf2-eigen-kdl/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-tf2-eigen-kdl/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-tf2-eigen-kdl/recipe.yaml b/recipes/ros-jazzy-tf2-eigen-kdl/recipe.yaml new file mode 100644 index 00000000..c4cf8072 --- /dev/null +++ b/recipes/ros-jazzy-tf2-eigen-kdl/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tf2-eigen-kdl + version: 0.36.7 +source: + git: https://github.com/ros2-gbp/geometry2-release.git + tag: release/jazzy/tf2_eigen_kdl/0.36.7-1 + target_directory: ros-jazzy-tf2-eigen-kdl/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-orocos-kdl-vendor + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros2-distro-mutex 0.6.* jazzy_* + run: + - eigen + - python + - ros-jazzy-orocos-kdl-vendor + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tf2-eigen/bld_ament_cmake.bat b/recipes/ros-jazzy-tf2-eigen/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-tf2-eigen/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tf2-eigen/build_ament_cmake.sh b/recipes/ros-jazzy-tf2-eigen/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-tf2-eigen/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-tf2-eigen/recipe.yaml b/recipes/ros-jazzy-tf2-eigen/recipe.yaml new file mode 100644 index 00000000..f3224aad --- /dev/null +++ b/recipes/ros-jazzy-tf2-eigen/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tf2-eigen + version: 0.36.7 +source: + git: https://github.com/ros2-gbp/geometry2-release.git + tag: release/jazzy/tf2_eigen/0.36.7-1 + target_directory: ros-jazzy-tf2-eigen/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - eigen + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tf2-geometry-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-tf2-geometry-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-tf2-geometry-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tf2-geometry-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-tf2-geometry-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-tf2-geometry-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-tf2-geometry-msgs/recipe.yaml b/recipes/ros-jazzy-tf2-geometry-msgs/recipe.yaml new file mode 100644 index 00000000..8da23e20 --- /dev/null +++ b/recipes/ros-jazzy-tf2-geometry-msgs/recipe.yaml @@ -0,0 +1,100 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tf2-geometry-msgs + version: 0.36.7 +source: + git: https://github.com/ros2-gbp/geometry2-release.git + tag: release/jazzy/tf2_geometry_msgs/0.36.7-1 + target_directory: ros-jazzy-tf2-geometry-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-orocos-kdl-vendor + - ros-jazzy-python-cmake-module + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - numpy + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-orocos-kdl-vendor + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-ros + - ros-jazzy-tf2-ros-py + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tf2-kdl/bld_ament_cmake.bat b/recipes/ros-jazzy-tf2-kdl/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-tf2-kdl/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tf2-kdl/build_ament_cmake.sh b/recipes/ros-jazzy-tf2-kdl/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-tf2-kdl/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-tf2-kdl/recipe.yaml b/recipes/ros-jazzy-tf2-kdl/recipe.yaml new file mode 100644 index 00000000..ede57954 --- /dev/null +++ b/recipes/ros-jazzy-tf2-kdl/recipe.yaml @@ -0,0 +1,98 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tf2-kdl + version: 0.36.7 +source: + git: https://github.com/ros2-gbp/geometry2-release.git + tag: release/jazzy/tf2_kdl/0.36.7-1 + target_directory: ros-jazzy-tf2-kdl/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-orocos-kdl-vendor + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-orocos-kdl-vendor + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-ros + - ros-jazzy-tf2-ros-py + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tf2-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-tf2-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-tf2-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tf2-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-tf2-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-tf2-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-tf2-msgs/recipe.yaml b/recipes/ros-jazzy-tf2-msgs/recipe.yaml new file mode 100644 index 00000000..516eff48 --- /dev/null +++ b/recipes/ros-jazzy-tf2-msgs/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tf2-msgs + version: 0.36.7 +source: + git: https://github.com/ros2-gbp/geometry2-release.git + tag: release/jazzy/tf2_msgs/0.36.7-1 + target_directory: ros-jazzy-tf2-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tf2-py/bld_ament_cmake.bat b/recipes/ros-jazzy-tf2-py/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-tf2-py/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tf2-py/build_ament_cmake.sh b/recipes/ros-jazzy-tf2-py/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-tf2-py/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-tf2-py/recipe.yaml b/recipes/ros-jazzy-tf2-py/recipe.yaml new file mode 100644 index 00000000..f579496f --- /dev/null +++ b/recipes/ros-jazzy-tf2-py/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tf2-py + version: 0.36.7 +source: + git: https://github.com/ros2-gbp/geometry2-release.git + tag: release/jazzy/tf2_py/0.36.7-1 + target_directory: ros-jazzy-tf2-py/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-python-cmake-module + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-rpyutils + - ros-jazzy-tf2 + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tf2-ros-py/bld_ament_python.bat b/recipes/ros-jazzy-tf2-ros-py/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-tf2-ros-py/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tf2-ros-py/build_ament_python.sh b/recipes/ros-jazzy-tf2-ros-py/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-tf2-ros-py/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-tf2-ros-py/recipe.yaml b/recipes/ros-jazzy-tf2-ros-py/recipe.yaml new file mode 100644 index 00000000..3730c562 --- /dev/null +++ b/recipes/ros-jazzy-tf2-ros-py/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tf2-ros-py + version: 0.36.7 +source: + git: https://github.com/ros2-gbp/geometry2-release.git + tag: release/jazzy/tf2_ros_py/0.36.7-1 + target_directory: ros-jazzy-tf2-ros-py/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros-jazzy-tf2-msgs + - ros-jazzy-tf2-py + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tf2-ros/bld_ament_cmake.bat b/recipes/ros-jazzy-tf2-ros/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-tf2-ros/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tf2-ros/build_ament_cmake.sh b/recipes/ros-jazzy-tf2-ros/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-tf2-ros/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-tf2-ros/recipe.yaml b/recipes/ros-jazzy-tf2-ros/recipe.yaml new file mode 100644 index 00000000..5738340a --- /dev/null +++ b/recipes/ros-jazzy-tf2-ros/recipe.yaml @@ -0,0 +1,106 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tf2-ros + version: 0.36.7 +source: + git: https://github.com/ros2-gbp/geometry2-release.git + tag: release/jazzy/tf2_ros/0.36.7-1 + target_directory: ros-jazzy-tf2-ros/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-message-filters + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosgraph-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-message-filters + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-tf2 + - ros-jazzy-tf2-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tf2-sensor-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-tf2-sensor-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-tf2-sensor-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tf2-sensor-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-tf2-sensor-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-tf2-sensor-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-tf2-sensor-msgs/recipe.yaml b/recipes/ros-jazzy-tf2-sensor-msgs/recipe.yaml new file mode 100644 index 00000000..5cd1cc91 --- /dev/null +++ b/recipes/ros-jazzy-tf2-sensor-msgs/recipe.yaml @@ -0,0 +1,106 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tf2-sensor-msgs + version: 0.36.7 +source: + git: https://github.com/ros2-gbp/geometry2-release.git + tag: release/jazzy/tf2_sensor_msgs/0.36.7-1 + target_directory: ros-jazzy-tf2-sensor-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-geometry-msgs + - ros-jazzy-python-cmake-module + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - eigen + - numpy + - python + - ros-jazzy-eigen3-cmake-module + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-sensor-msgs-py + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-ros + - ros-jazzy-tf2-ros-py + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tf2-tools/bld_ament_python.bat b/recipes/ros-jazzy-tf2-tools/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-tf2-tools/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tf2-tools/build_ament_python.sh b/recipes/ros-jazzy-tf2-tools/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-tf2-tools/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-tf2-tools/recipe.yaml b/recipes/ros-jazzy-tf2-tools/recipe.yaml new file mode 100644 index 00000000..73b7db6c --- /dev/null +++ b/recipes/ros-jazzy-tf2-tools/recipe.yaml @@ -0,0 +1,94 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tf2-tools + version: 0.36.7 +source: + git: https://github.com/ros2-gbp/geometry2-release.git + tag: release/jazzy/tf2_tools/0.36.7-1 + target_directory: ros-jazzy-tf2-tools/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-copyright + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - graphviz + - python + - pyyaml + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-msgs + - ros-jazzy-tf2-py + - ros-jazzy-tf2-ros-py + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tf2/bld_ament_cmake.bat b/recipes/ros-jazzy-tf2/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-tf2/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tf2/build_ament_cmake.sh b/recipes/ros-jazzy-tf2/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-tf2/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-tf2/recipe.yaml b/recipes/ros-jazzy-tf2/recipe.yaml new file mode 100644 index 00000000..db473ed9 --- /dev/null +++ b/recipes/ros-jazzy-tf2/recipe.yaml @@ -0,0 +1,101 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tf2 + version: 0.36.7 +source: + git: https://github.com/ros2-gbp/geometry2-release.git + tag: release/jazzy/tf2/0.36.7-1 + target_directory: ros-jazzy-tf2/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-cmake-cppcheck + - ros-jazzy-ament-cmake-cpplint + - ros-jazzy-ament-cmake-google-benchmark + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-lint-cmake + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-cmake-uncrustify + - ros-jazzy-ament-cmake-xmllint + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-cpp + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-runtime-cpp + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-theora-image-transport/bld_ament_cmake.bat b/recipes/ros-jazzy-theora-image-transport/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-theora-image-transport/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-theora-image-transport/build_ament_cmake.sh b/recipes/ros-jazzy-theora-image-transport/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-theora-image-transport/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-theora-image-transport/recipe.yaml b/recipes/ros-jazzy-theora-image-transport/recipe.yaml new file mode 100644 index 00000000..1b2725da --- /dev/null +++ b/recipes/ros-jazzy-theora-image-transport/recipe.yaml @@ -0,0 +1,122 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-theora-image-transport + version: 4.0.3 +source: + git: https://github.com/ros2-gbp/image_transport_plugins-release.git + tag: release/jazzy/theora_image_transport/4.0.3-1 + target_directory: ros-jazzy-theora-image-transport/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libogg + - libopencv + - libtheora + - numpy + - pip + - pkg-config + - py-opencv + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-cv-bridge + - ros-jazzy-image-transport + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rcutils + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - libogg + - libopencv + - libtheora + - py-opencv + - python + - ros-jazzy-cv-bridge + - ros-jazzy-image-transport + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-rcutils + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-tinyxml2-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-tinyxml2-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-tinyxml2-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tinyxml2-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-tinyxml2-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-tinyxml2-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-tinyxml2-vendor/recipe.yaml b/recipes/ros-jazzy-tinyxml2-vendor/recipe.yaml new file mode 100644 index 00000000..f39eb5e7 --- /dev/null +++ b/recipes/ros-jazzy-tinyxml2-vendor/recipe.yaml @@ -0,0 +1,86 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tinyxml2-vendor + version: 0.9.1 +source: + git: https://github.com/ros2-gbp/tinyxml2_vendor-release.git + tag: release/jazzy/tinyxml2_vendor/0.9.1-3 + target_directory: ros-jazzy-tinyxml2-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - tinyxml2 + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - tinyxml2 + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tl-expected/bld_ament_cmake.bat b/recipes/ros-jazzy-tl-expected/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-tl-expected/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tl-expected/build_ament_cmake.sh b/recipes/ros-jazzy-tl-expected/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-tl-expected/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-tl-expected/recipe.yaml b/recipes/ros-jazzy-tl-expected/recipe.yaml new file mode 100644 index 00000000..f45123d0 --- /dev/null +++ b/recipes/ros-jazzy-tl-expected/recipe.yaml @@ -0,0 +1,84 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tl-expected + version: 1.0.2 +source: + git: https://github.com/ros2-gbp/cpp_polyfills-release.git + tag: release/jazzy/tl_expected/1.0.2-5 + target_directory: ros-jazzy-tl-expected/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-topic-monitor/bld_ament_python.bat b/recipes/ros-jazzy-topic-monitor/bld_ament_python.bat new file mode 100755 index 00000000..902db09b --- /dev/null +++ b/recipes/ros-jazzy-topic-monitor/bld_ament_python.bat @@ -0,0 +1,25 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +pushd %SRC_DIR%\%PKG_NAME%\src\work +set "PKG_NAME_SHORT=%PKG_NAME:*ros-jazzy-=%" +set "PKG_NAME_SHORT=%PKG_NAME_SHORT:-=_%" + +:: If there is a setup.cfg that contains install-scripts then use pip to install +findstr install[-_]scripts setup.cfg +if "%errorlevel%" == "0" ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\lib\%PKG_NAME_SHORT% +) else ( + %PYTHON% setup.py install --single-version-externally-managed --record=files.txt ^ + --prefix=%LIBRARY_PREFIX% ^ + --install-lib=%SP_DIR% ^ + --install-scripts=%LIBRARY_PREFIX%\bin +) + +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-topic-monitor/build_ament_python.sh b/recipes/ros-jazzy-topic-monitor/build_ament_python.sh new file mode 100755 index 00000000..e95680de --- /dev/null +++ b/recipes/ros-jazzy-topic-monitor/build_ament_python.sh @@ -0,0 +1,19 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +pushd $SRC_DIR/$PKG_NAME/src/work + +# If there is a setup.cfg that contains install-scripts then we should not set it here +if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-jazzy-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" + $PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt +else + $PYTHON -m pip install . --no-deps -vvv +fi diff --git a/recipes/ros-jazzy-topic-monitor/recipe.yaml b/recipes/ros-jazzy-topic-monitor/recipe.yaml new file mode 100644 index 00000000..cd408faf --- /dev/null +++ b/recipes/ros-jazzy-topic-monitor/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-topic-monitor + version: 0.33.5 +source: + git: https://github.com/ros2-gbp/demos-release.git + tag: release/jazzy/topic_monitor/0.33.5-1 + target_directory: ros-jazzy-topic-monitor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_python.sh' if unix else '%RECIPE_DIR%\\bld_ament_python.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pytest + - python + - ros-jazzy-ament-flake8 + - ros-jazzy-ament-pep257 + - ros-jazzy-rclpy + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - setuptools + run: + - python + - ros-jazzy-launch + - ros-jazzy-launch-ros + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-topic-tools-interfaces/bld_ament_cmake.bat b/recipes/ros-jazzy-topic-tools-interfaces/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-topic-tools-interfaces/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-topic-tools-interfaces/build_ament_cmake.sh b/recipes/ros-jazzy-topic-tools-interfaces/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-topic-tools-interfaces/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-topic-tools-interfaces/recipe.yaml b/recipes/ros-jazzy-topic-tools-interfaces/recipe.yaml new file mode 100644 index 00000000..f9dce66c --- /dev/null +++ b/recipes/ros-jazzy-topic-tools-interfaces/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-topic-tools-interfaces + version: 1.3.2 +source: + git: https://github.com/ros2-gbp/topic_tools-release.git + tag: release/jazzy/topic_tools_interfaces/1.3.2-1 + target_directory: ros-jazzy-topic-tools-interfaces/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-topic-tools/bld_ament_cmake.bat b/recipes/ros-jazzy-topic-tools/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-topic-tools/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-topic-tools/build_ament_cmake.sh b/recipes/ros-jazzy-topic-tools/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-topic-tools/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-topic-tools/recipe.yaml b/recipes/ros-jazzy-topic-tools/recipe.yaml new file mode 100644 index 00000000..06c4214b --- /dev/null +++ b/recipes/ros-jazzy-topic-tools/recipe.yaml @@ -0,0 +1,100 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-topic-tools + version: 1.3.2 +source: + git: https://github.com/ros2-gbp/topic_tools-release.git + tag: release/jazzy/topic_tools/1.3.2-1 + target_directory: ros-jazzy-topic-tools/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-rosidl-runtime-py + - ros-jazzy-std-msgs + - ros-jazzy-topic-tools-interfaces + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-rclpy + - ros-jazzy-ros-workspace + - ros-jazzy-ros2cli + - ros-jazzy-rosidl-runtime-py + - ros-jazzy-topic-tools-interfaces + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tracetools-image-pipeline/bld_ament_cmake.bat b/recipes/ros-jazzy-tracetools-image-pipeline/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-tracetools-image-pipeline/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tracetools-image-pipeline/build_ament_cmake.sh b/recipes/ros-jazzy-tracetools-image-pipeline/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-tracetools-image-pipeline/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-tracetools-image-pipeline/recipe.yaml b/recipes/ros-jazzy-tracetools-image-pipeline/recipe.yaml new file mode 100644 index 00000000..cf5f2657 --- /dev/null +++ b/recipes/ros-jazzy-tracetools-image-pipeline/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tracetools-image-pipeline + version: 5.0.6 +source: + git: https://github.com/ros2-gbp/image_pipeline-release.git + tag: release/jazzy/tracetools_image_pipeline/5.0.6-1 + target_directory: ros-jazzy-tracetools-image-pipeline/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pkg-config + - python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-tracetools/bld_ament_cmake.bat b/recipes/ros-jazzy-tracetools/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-tracetools/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-tracetools/build_ament_cmake.sh b/recipes/ros-jazzy-tracetools/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-tracetools/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-tracetools/recipe.yaml b/recipes/ros-jazzy-tracetools/recipe.yaml new file mode 100644 index 00000000..40e1060d --- /dev/null +++ b/recipes/ros-jazzy-tracetools/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-tracetools + version: 8.2.3 +source: + git: https://github.com/ros2-gbp/ros2_tracing-release.git + tag: release/jazzy/tracetools/8.2.3-1 + target_directory: ros-jazzy-tracetools/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - ${{ "lttng-ust" if linux }} + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - pkg-config + - python + - ros-jazzy-ament-cmake-gen-version-h + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - ${{ "lttng-ust" if linux }} + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-trajectory-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-trajectory-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-trajectory-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-trajectory-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-trajectory-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-trajectory-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-trajectory-msgs/recipe.yaml b/recipes/ros-jazzy-trajectory-msgs/recipe.yaml new file mode 100644 index 00000000..c478e459 --- /dev/null +++ b/recipes/ros-jazzy-trajectory-msgs/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-trajectory-msgs + version: 5.3.5 +source: + git: https://github.com/ros2-gbp/common_interfaces-release.git + tag: release/jazzy/trajectory_msgs/5.3.5-1 + target_directory: ros-jazzy-trajectory-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-turtlesim/bld_ament_cmake.bat b/recipes/ros-jazzy-turtlesim/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-turtlesim/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-turtlesim/build_ament_cmake.sh b/recipes/ros-jazzy-turtlesim/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-turtlesim/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-turtlesim/recipe.yaml b/recipes/ros-jazzy-turtlesim/recipe.yaml new file mode 100644 index 00000000..0990c709 --- /dev/null +++ b/recipes/ros-jazzy-turtlesim/recipe.yaml @@ -0,0 +1,115 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-turtlesim + version: 1.8.3 +source: + git: https://github.com/ros2-gbp/ros_tutorials-release.git + tag: release/jazzy/turtlesim/1.8.3-1 + target_directory: ros-jazzy-turtlesim/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - qt-main + - ros-jazzy-ament-cmake + - ros-jazzy-ament-index-cpp + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros2-distro-mutex 0.6.* jazzy_* + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - python + - qt-main + - ros-jazzy-ament-index-cpp + - ros-jazzy-geometry-msgs + - ros-jazzy-rcl-interfaces + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-action + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros-jazzy-std-srvs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-type-description-interfaces/bld_ament_cmake.bat b/recipes/ros-jazzy-type-description-interfaces/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-type-description-interfaces/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-type-description-interfaces/build_ament_cmake.sh b/recipes/ros-jazzy-type-description-interfaces/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-type-description-interfaces/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-type-description-interfaces/recipe.yaml b/recipes/ros-jazzy-type-description-interfaces/recipe.yaml new file mode 100644 index 00000000..97e27b35 --- /dev/null +++ b/recipes/ros-jazzy-type-description-interfaces/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-type-description-interfaces + version: 2.0.2 +source: + git: https://github.com/ros2-gbp/rcl_interfaces-release.git + tag: release/jazzy/type_description_interfaces/2.0.2-2 + target_directory: ros-jazzy-type-description-interfaces/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-core-generators + - ros-jazzy-service-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-core-runtime + - ros-jazzy-service-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-uncrustify-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-uncrustify-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-uncrustify-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-uncrustify-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-uncrustify-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-uncrustify-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-uncrustify-vendor/recipe.yaml b/recipes/ros-jazzy-uncrustify-vendor/recipe.yaml new file mode 100644 index 00000000..c24a701f --- /dev/null +++ b/recipes/ros-jazzy-uncrustify-vendor/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-uncrustify-vendor + version: 3.0.0 +source: + git: https://github.com/ros2-gbp/uncrustify_vendor-release.git + tag: release/jazzy/uncrustify_vendor/3.0.0-2 + target_directory: ros-jazzy-uncrustify-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + - vcstool + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - uncrustify + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - uncrustify + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-unique-identifier-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-unique-identifier-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-unique-identifier-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-unique-identifier-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-unique-identifier-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-unique-identifier-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-unique-identifier-msgs/recipe.yaml b/recipes/ros-jazzy-unique-identifier-msgs/recipe.yaml new file mode 100644 index 00000000..ff22b7b3 --- /dev/null +++ b/recipes/ros-jazzy-unique-identifier-msgs/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-unique-identifier-msgs + version: 2.5.0 +source: + git: https://github.com/ros2-gbp/unique_identifier_msgs-release.git + tag: release/jazzy/unique_identifier_msgs/2.5.0-3 + target_directory: ros-jazzy-unique-identifier-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-core-generators + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-core-runtime + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-urdf-parser-plugin/bld_ament_cmake.bat b/recipes/ros-jazzy-urdf-parser-plugin/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-urdf-parser-plugin/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-urdf-parser-plugin/build_ament_cmake.sh b/recipes/ros-jazzy-urdf-parser-plugin/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-urdf-parser-plugin/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-urdf-parser-plugin/recipe.yaml b/recipes/ros-jazzy-urdf-parser-plugin/recipe.yaml new file mode 100644 index 00000000..26a028b1 --- /dev/null +++ b/recipes/ros-jazzy-urdf-parser-plugin/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-urdf-parser-plugin + version: 2.10.0 +source: + git: https://github.com/ros2-gbp/urdf-release.git + tag: release/jazzy/urdf_parser_plugin/2.10.0-3 + target_directory: ros-jazzy-urdf-parser-plugin/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-urdfdom-headers + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-urdfdom-headers + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-urdf/bld_ament_cmake.bat b/recipes/ros-jazzy-urdf/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-urdf/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-urdf/build_ament_cmake.sh b/recipes/ros-jazzy-urdf/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-urdf/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-urdf/recipe.yaml b/recipes/ros-jazzy-urdf/recipe.yaml new file mode 100644 index 00000000..9fbf3a21 --- /dev/null +++ b/recipes/ros-jazzy-urdf/recipe.yaml @@ -0,0 +1,97 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-urdf + version: 2.10.0 +source: + git: https://github.com/ros2-gbp/urdf-release.git + tag: release/jazzy/urdf/2.10.0-3 + target_directory: ros-jazzy-urdf/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-google-benchmark + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-pluginlib + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tinyxml2-vendor + - ros-jazzy-urdf-parser-plugin + - ros-jazzy-urdfdom + - ros-jazzy-urdfdom-headers + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-pluginlib + - ros-jazzy-ros-workspace + - ros-jazzy-tinyxml2-vendor + - ros-jazzy-urdf-parser-plugin + - ros-jazzy-urdfdom + - ros-jazzy-urdfdom-headers + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-urdfdom-headers/recipe.yaml b/recipes/ros-jazzy-urdfdom-headers/recipe.yaml new file mode 100644 index 00000000..9d803884 --- /dev/null +++ b/recipes/ros-jazzy-urdfdom-headers/recipe.yaml @@ -0,0 +1,20 @@ +package: + name: ros-jazzy-urdfdom-headers + version: "1.1.2" + +build: + number: 0 + +requirements: + run: + - urdfdom_headers ==1.1.2 + - python 3.11.* *_cpython + +about: + homepage: https://github.com/conda-forge/urdfdom_headers-feedstock + license: BSD-3-Clause + summary: | + Headers for URDF parsers +extra: + recipe-maintainers: + - ros-forge diff --git a/recipes/ros-jazzy-urdfdom-py/recipe.yaml b/recipes/ros-jazzy-urdfdom-py/recipe.yaml new file mode 100644 index 00000000..fbb6a3ff --- /dev/null +++ b/recipes/ros-jazzy-urdfdom-py/recipe.yaml @@ -0,0 +1,20 @@ +package: + name: ros-jazzy-urdfdom-py + version: "1.2.1" + +build: + number: 0 + +requirements: + run: + - urdfdom-py 1.2.1.* + - python 3.11.* *_cpython + +about: + homepage: https://github.com/ros/urdf_parser_py + license: BSD-3-Clause + summary: | + Standalone URDF parser for Python. +extra: + recipe-maintainers: + - ros-forge \ No newline at end of file diff --git a/recipes/ros-jazzy-urdfdom/recipe.yaml b/recipes/ros-jazzy-urdfdom/recipe.yaml new file mode 100644 index 00000000..af152596 --- /dev/null +++ b/recipes/ros-jazzy-urdfdom/recipe.yaml @@ -0,0 +1,20 @@ +package: + name: ros-jazzy-urdfdom + version: "4.0.1" + +build: + number: 0 + +requirements: + run: + - urdfdom ==4.0.1 + - python 3.11.* *_cpython + +about: + homepage: https://github.com/conda-forge/urdfdom-feedstock + license: BSD-3-Clause + summary: | + URDF parser +extra: + recipe-maintainers: + - ros-forge diff --git a/recipes/ros-jazzy-velodyne-driver/bld_ament_cmake.bat b/recipes/ros-jazzy-velodyne-driver/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-velodyne-driver/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-velodyne-driver/build_ament_cmake.sh b/recipes/ros-jazzy-velodyne-driver/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-velodyne-driver/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-velodyne-driver/recipe.yaml b/recipes/ros-jazzy-velodyne-driver/recipe.yaml new file mode 100644 index 00000000..4df1c8a8 --- /dev/null +++ b/recipes/ros-jazzy-velodyne-driver/recipe.yaml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-velodyne-driver + version: 2.5.1 +source: + git: https://github.com/ros2-gbp/velodyne-release.git + tag: release/jazzy/velodyne_driver/2.5.1-1 + target_directory: ros-jazzy-velodyne-driver/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libpcap + - numpy + - pip + - python + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-diagnostic-updater + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-ros + - ros-jazzy-velodyne-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - libpcap + - python + - ros-jazzy-diagnostic-updater + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-tf2-ros + - ros-jazzy-velodyne-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-velodyne-laserscan/bld_ament_cmake.bat b/recipes/ros-jazzy-velodyne-laserscan/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-velodyne-laserscan/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-velodyne-laserscan/build_ament_cmake.sh b/recipes/ros-jazzy-velodyne-laserscan/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-velodyne-laserscan/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-velodyne-laserscan/recipe.yaml b/recipes/ros-jazzy-velodyne-laserscan/recipe.yaml new file mode 100644 index 00000000..9f72571e --- /dev/null +++ b/recipes/ros-jazzy-velodyne-laserscan/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-velodyne-laserscan + version: 2.5.1 +source: + git: https://github.com/ros2-gbp/velodyne-release.git + tag: release/jazzy/velodyne_laserscan/2.5.1-1 + target_directory: ros-jazzy-velodyne-laserscan/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake-ros + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-velodyne-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-velodyne-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-velodyne-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-velodyne-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-velodyne-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-velodyne-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-velodyne-msgs/recipe.yaml b/recipes/ros-jazzy-velodyne-msgs/recipe.yaml new file mode 100644 index 00000000..c4fbf83d --- /dev/null +++ b/recipes/ros-jazzy-velodyne-msgs/recipe.yaml @@ -0,0 +1,92 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-velodyne-msgs + version: 2.5.1 +source: + git: https://github.com/ros2-gbp/velodyne-release.git + tag: release/jazzy/velodyne_msgs/2.5.1-1 + target_directory: ros-jazzy-velodyne-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-velodyne-pointcloud/bld_ament_cmake.bat b/recipes/ros-jazzy-velodyne-pointcloud/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-velodyne-pointcloud/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-velodyne-pointcloud/build_ament_cmake.sh b/recipes/ros-jazzy-velodyne-pointcloud/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-velodyne-pointcloud/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-velodyne-pointcloud/recipe.yaml b/recipes/ros-jazzy-velodyne-pointcloud/recipe.yaml new file mode 100644 index 00000000..fb99f1a5 --- /dev/null +++ b/recipes/ros-jazzy-velodyne-pointcloud/recipe.yaml @@ -0,0 +1,129 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-velodyne-pointcloud + version: 2.5.1 +source: + git: https://github.com/ros2-gbp/velodyne-release.git + tag: release/jazzy/velodyne_pointcloud/2.5.1-1 + target_directory: ros-jazzy-velodyne-pointcloud/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - eigen + - libboost-devel + - numpy + - pcl + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-index-cpp + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-angles + - ros-jazzy-diagnostic-updater + - ros-jazzy-geometry-msgs + - ros-jazzy-message-filters + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-ros + - ros-jazzy-velodyne-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - vtk-base + - yaml-cpp + - if: linux + then: + - libgl-devel + - if: unix + then: + - xorg-libx11 + - xorg-libxext + run: + - eigen + - libboost-devel + - pcl + - python + - ros-jazzy-angles + - ros-jazzy-diagnostic-updater + - ros-jazzy-geometry-msgs + - ros-jazzy-message-filters + - ros-jazzy-rclcpp + - ros-jazzy-rclcpp-components + - ros-jazzy-ros-workspace + - ros-jazzy-sensor-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-ros + - ros-jazzy-velodyne-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - vtk-base + - yaml-cpp + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} + - if: unix + then: + - xorg-libx11 + - xorg-libxext diff --git a/recipes/ros-jazzy-velodyne/bld_ament_cmake.bat b/recipes/ros-jazzy-velodyne/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-velodyne/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-velodyne/build_ament_cmake.sh b/recipes/ros-jazzy-velodyne/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-velodyne/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-velodyne/recipe.yaml b/recipes/ros-jazzy-velodyne/recipe.yaml new file mode 100644 index 00000000..5250ef4c --- /dev/null +++ b/recipes/ros-jazzy-velodyne/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-velodyne + version: 2.5.1 +source: + git: https://github.com/ros2-gbp/velodyne-release.git + tag: release/jazzy/velodyne/2.5.1-1 + target_directory: ros-jazzy-velodyne/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-ros-workspace + - ros-jazzy-velodyne-driver + - ros-jazzy-velodyne-laserscan + - ros-jazzy-velodyne-msgs + - ros-jazzy-velodyne-pointcloud + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-vision-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-vision-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-vision-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-vision-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-vision-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-vision-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-vision-msgs/recipe.yaml b/recipes/ros-jazzy-vision-msgs/recipe.yaml new file mode 100644 index 00000000..6c575d14 --- /dev/null +++ b/recipes/ros-jazzy-vision-msgs/recipe.yaml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-vision-msgs + version: 4.1.1 +source: + git: https://github.com/ros2-gbp/vision_msgs-release.git + tag: release/jazzy/vision_msgs/4.1.1-3 + target_directory: ros-jazzy-vision-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-gtest + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-vision-opencv/bld_ament_cmake.bat b/recipes/ros-jazzy-vision-opencv/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-vision-opencv/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-vision-opencv/build_ament_cmake.sh b/recipes/ros-jazzy-vision-opencv/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-vision-opencv/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-vision-opencv/recipe.yaml b/recipes/ros-jazzy-vision-opencv/recipe.yaml new file mode 100644 index 00000000..660052b3 --- /dev/null +++ b/recipes/ros-jazzy-vision-opencv/recipe.yaml @@ -0,0 +1,86 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-vision-opencv + version: 4.1.0 +source: + git: https://github.com/ros2-gbp/vision_opencv-release.git + tag: release/jazzy/vision_opencv/4.1.0-1 + target_directory: ros-jazzy-vision-opencv/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-cv-bridge + - ros-jazzy-image-geometry + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-visualization-msgs/bld_ament_cmake.bat b/recipes/ros-jazzy-visualization-msgs/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-visualization-msgs/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-visualization-msgs/build_ament_cmake.sh b/recipes/ros-jazzy-visualization-msgs/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-visualization-msgs/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-visualization-msgs/recipe.yaml b/recipes/ros-jazzy-visualization-msgs/recipe.yaml new file mode 100644 index 00000000..d1711799 --- /dev/null +++ b/recipes/ros-jazzy-visualization-msgs/recipe.yaml @@ -0,0 +1,95 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-visualization-msgs + version: 5.3.5 +source: + git: https://github.com/ros2-gbp/common_interfaces-release.git + tag: release/jazzy/visualization_msgs/5.3.5-1 + target_directory: ros-jazzy-visualization-msgs/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-common + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-generators + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - ros-jazzy-builtin-interfaces + - ros-jazzy-geometry-msgs + - ros-jazzy-ros-workspace + - ros-jazzy-rosidl-default-runtime + - ros-jazzy-sensor-msgs + - ros-jazzy-std-msgs + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-warehouse-ros/bld_ament_cmake.bat b/recipes/ros-jazzy-warehouse-ros/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-warehouse-ros/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-warehouse-ros/build_ament_cmake.sh b/recipes/ros-jazzy-warehouse-ros/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-warehouse-ros/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-warehouse-ros/recipe.yaml b/recipes/ros-jazzy-warehouse-ros/recipe.yaml new file mode 100644 index 00000000..b8f53fb9 --- /dev/null +++ b/recipes/ros-jazzy-warehouse-ros/recipe.yaml @@ -0,0 +1,106 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-warehouse-ros + version: 2.0.5 +source: + git: https://github.com/ros2-gbp/warehouse_ros-release.git + tag: release/jazzy/warehouse_ros/2.0.5-1 + target_directory: ros-jazzy-warehouse-ros/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - libboost-devel + - libboost-python-devel + - numpy + - openssl + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-copyright + - ros-jazzy-ament-lint-auto + - ros-jazzy-geometry-msgs + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + run: + - libboost-devel + - libboost-python-devel + - openssl + - python + - ros-jazzy-geometry-msgs + - ros-jazzy-pluginlib + - ros-jazzy-rclcpp + - ros-jazzy-ros-workspace + - ros-jazzy-std-msgs + - ros-jazzy-tf2 + - ros-jazzy-tf2-geometry-msgs + - ros-jazzy-tf2-ros + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-xacro/bld_ament_cmake.bat b/recipes/ros-jazzy-xacro/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-xacro/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-xacro/build_ament_cmake.sh b/recipes/ros-jazzy-xacro/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-xacro/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-xacro/recipe.yaml b/recipes/ros-jazzy-xacro/recipe.yaml new file mode 100644 index 00000000..758d6dca --- /dev/null +++ b/recipes/ros-jazzy-xacro/recipe.yaml @@ -0,0 +1,91 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-xacro + version: 2.0.11 +source: + git: https://github.com/ros2-gbp/xacro-release.git + tag: release/jazzy/xacro/2.0.11-2 + target_directory: ros-jazzy-xacro/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - pyyaml + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-pytest + - ros-jazzy-ament-cmake-python + - ros-jazzy-ament-index-python + - ros-jazzy-ament-lint-auto + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + run: + - python + - pyyaml + - ros-jazzy-ament-index-python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-yaml-cpp-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-yaml-cpp-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-yaml-cpp-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-yaml-cpp-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-yaml-cpp-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-yaml-cpp-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-yaml-cpp-vendor/recipe.yaml b/recipes/ros-jazzy-yaml-cpp-vendor/recipe.yaml new file mode 100644 index 00000000..1786a384 --- /dev/null +++ b/recipes/ros-jazzy-yaml-cpp-vendor/recipe.yaml @@ -0,0 +1,87 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-yaml-cpp-vendor + version: 9.0.1 +source: + git: https://github.com/ros2-gbp/yaml_cpp_vendor-release.git + tag: release/jazzy/yaml_cpp_vendor/9.0.1-1 + target_directory: ros-jazzy-yaml-cpp-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - yaml-cpp + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - yaml-cpp + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-zstd-image-transport/bld_ament_cmake.bat b/recipes/ros-jazzy-zstd-image-transport/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-zstd-image-transport/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-zstd-image-transport/build_ament_cmake.sh b/recipes/ros-jazzy-zstd-image-transport/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-zstd-image-transport/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-zstd-image-transport/recipe.yaml b/recipes/ros-jazzy-zstd-image-transport/recipe.yaml new file mode 100644 index 00000000..1aead7db --- /dev/null +++ b/recipes/ros-jazzy-zstd-image-transport/recipe.yaml @@ -0,0 +1,90 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-zstd-image-transport + version: 4.0.3 +source: + git: https://github.com/ros2-gbp/image_transport_plugins-release.git + tag: release/jazzy/zstd_image_transport/4.0.3-1 + target_directory: ros-jazzy-zstd-image-transport/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-lint-auto + - ros-jazzy-ament-lint-common + - ros-jazzy-image-transport + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - zlib + run: + - python + - ros-jazzy-image-transport + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - zlib + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros-jazzy-zstd-vendor/bld_ament_cmake.bat b/recipes/ros-jazzy-zstd-vendor/bld_ament_cmake.bat new file mode 100755 index 00000000..823afff1 --- /dev/null +++ b/recipes/ros-jazzy-zstd-vendor/bld_ament_cmake.bat @@ -0,0 +1,52 @@ +:: Generated by vinca http://github.com/RoboStack/vinca. +:: DO NOT EDIT! +setlocal EnableDelayedExpansion + +set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%" + +:: MSVC is preferred. +set CC=cl.exe +set CXX=cl.exe + +rd /s /q build +mkdir build +pushd build + +:: set "CMAKE_GENERATOR=Ninja" +:: We use the Visual Studio generator as a workaround for +:: problems in Ninja when using long paths, see https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2564856467 +:: Once those are solved, we can switch back to use Ninja +set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%" + +:: PYTHON_INSTALL_DIR should be a relative path, see +:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX, +:: but it is not trivial to do this in Command Prompt scripting, so let's do it via +:: python + +:: This line is scary, but it basically assigns the output of the command inside (` and `) +:: to the variable specified after DO SET +:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...` +FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']).replace('\\','/'))"`) DO SET PYTHON_INSTALL_DIR=%%i + +cmake ^ + -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ + -DPYTHON_EXECUTABLE=%PYTHON% ^ + -DPython_EXECUTABLE=%PYTHON% ^ + -DPython3_EXECUTABLE=%PYTHON% ^ + -DSETUPTOOLS_DEB_LAYOUT=OFF ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_TESTING=OFF ^ + -DCMAKE_OBJECT_PATH_MAX=255 ^ + --compile-no-warning-as-error ^ + -DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^ + %SRC_DIR%\%PKG_NAME%\src\work +if errorlevel 1 exit 1 + +:: We explicitly pass %CPU_COUNT% to cmake --build as we are not using Ninja, +:: see the comment before setting the CMAKE_GENERATOR env variable +cmake --build . --config Release --parallel %CPU_COUNT% --target install +if errorlevel 1 exit 1 diff --git a/recipes/ros-jazzy-zstd-vendor/build_ament_cmake.sh b/recipes/ros-jazzy-zstd-vendor/build_ament_cmake.sh new file mode 100755 index 00000000..34df1a72 --- /dev/null +++ b/recipes/ros-jazzy-zstd-vendor/build_ament_cmake.sh @@ -0,0 +1,84 @@ +# Generated by vinca http://github.com/RoboStack/vinca. +# DO NOT EDIT! + +set -eo pipefail + +rm -rf build +mkdir build +cd build + +# necessary for correctly linking SIP files (from python_qt_bindings) +export LINK=$CXX + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + PYTHON_EXECUTABLE=$PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="10.15" +else + PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python + PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config + OSX_DEPLOYMENT_TARGET="11.0" +fi + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then + export QT_HOST_PATH="$BUILD_PREFIX" +else + export QT_HOST_PATH="$PREFIX" +fi + +echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" +echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" + +export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"` +echo "Using Python ${ROS_PYTHON_VERSION}" + +# see https://github.com/conda-forge/cross-python-feedstock/issues/24 +if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then + find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true + find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true +fi + +if [[ $target_platform =~ linux.* ]]; then + export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1" + export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1" +fi; + +# Needed for qt-gui-cpp .. +if [[ $target_platform =~ linux.* ]]; then + ln -s $GCC ${BUILD_PREFIX}/bin/gcc + ln -s $GXX ${BUILD_PREFIX}/bin/g++ +fi; + +# PYTHON_INSTALL_DIR should be a relative path, see +# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md +# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX, +# but it is not trivial to do this in bash scripting, so let's do it via python +export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"` +echo "Using site_packages: $PYTHON_INSTALL_DIR" + +cmake \ + -G "Ninja" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DAMENT_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \ + -DPython3_FIND_STRATEGY=LOCATION \ + -DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \ + -DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DCATKIN_SKIP_TESTING=$SKIP_TESTING \ + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \ + --compile-no-warning-as-error \ + $SRC_DIR/$PKG_NAME/src/work + +cmake --build . --config Release --target install diff --git a/recipes/ros-jazzy-zstd-vendor/recipe.yaml b/recipes/ros-jazzy-zstd-vendor/recipe.yaml new file mode 100644 index 00000000..b1a3236e --- /dev/null +++ b/recipes/ros-jazzy-zstd-vendor/recipe.yaml @@ -0,0 +1,88 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json + +package: + name: ros-jazzy-zstd-vendor + version: 0.26.6 +source: + git: https://github.com/ros2-gbp/rosbag2-release.git + tag: release/jazzy/zstd_vendor/0.26.6-1 + target_directory: ros-jazzy-zstd-vendor/src/work + +build: + script: ${{ '$RECIPE_DIR/build_ament_cmake.sh' if unix else '%RECIPE_DIR%\\bld_ament_cmake.bat' }} + number: 1 + post_process: + - files: + - '*.pc' + regex: (?:-L|-I)?"?([^;\s]+/sysroot/) + replacement: $$(CONDA_BUILD_SYSROOT_S) + - files: + - '*.cmake' + regex: ([^;\s"]+/sysroot) + replacement: $$ENV{CONDA_BUILD_SYSROOT} + - files: + - '*.cmake' + regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk) + replacement: $$ENV{CONDA_BUILD_SYSROOT} +about: + homepage: https://www.ros.org/ + license: BSD-3-Clause + summary: | + Robot Operating System + +extra: + recipe-maintainers: + - ros-forge + +requirements: + build: + - ${{ compiler('cxx') }} + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ninja + - python + - setuptools + - git + - if: unix + then: + - patch + - make + - coreutils + - if: win + then: + - m2-patch + - if: osx + then: + - tapi + - if: build_platform != target_platform + then: + - pkg-config + - cmake + - cython + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - numpy + host: + - ${{ 'zstd-static' if not win }} + - if: build_platform == target_platform + then: + - pkg-config + - numpy + - pip + - python + - ros-jazzy-ament-cmake + - ros-jazzy-ament-cmake-vendor-package + - ros-jazzy-ros-environment + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - zstd + run: + - python + - ros-jazzy-ros-workspace + - ros2-distro-mutex 0.6.* jazzy_* + - zstd + - if: osx and x86_64 + then: + - __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }} diff --git a/recipes/ros2-distro-mutex/recipe.yaml b/recipes/ros2-distro-mutex/recipe.yaml new file mode 100644 index 00000000..9f35c219 --- /dev/null +++ b/recipes/ros2-distro-mutex/recipe.yaml @@ -0,0 +1,52 @@ +package: + name: ros2-distro-mutex + version: 0.6.0 + +build: + number: 0 + # Note: keep in sync with build number + # Cannot be done automatically, see https://github.com/mamba-org/boa/issues/278 + string: jazzy_0 + +requirements: + # NOTE: + # The idea with automatically adding versions to run_exports doesn't + # work since we don't want all these dependencies as run deps of all ROS + # packages. Therefore I am currently manually adding them to run_constrained. + # This has to be synchronized with our current conda_build_config all the time :( + # host: + # # values here should + # - log4cxx + # - poco + # - pcl + # - opencv + # - gazebo + # - ogre + # - qt + # run: + # values here should be applied from run_exports! + # if the upstream package does not have run_exports + # please change it in the conda_build_config.yaml! + run_constraints: + - libboost 1.86.* + - libboost-devel 1.86.* + - pcl 1.14.1.* + - gazebo 11.* + - libprotobuf 5.28.2.* + + run_exports: + weak: + - ${{ pin_subpackage('ros2-distro-mutex', upper_bound='x.x') }} + + +about: + homepage: https://github.com/robostack/ros-jazzy + license: BSD-3-Clause + summary: | + The ROS2 distro mutex. To switch between ROS2 versions, you need to change the mutex. + E.g. mamba install ros2-distro-mutex=*=jazzy to switch to jazzy. + +extra: + recipe-maintainers: + - ros-forge + diff --git a/vinca.yaml b/vinca.yaml new file mode 100644 index 00000000..b7d279e5 --- /dev/null +++ b/vinca.yaml @@ -0,0 +1,74 @@ +ros_distro: jazzy + +# mapping for package keys +conda_index: + - robostack.yaml + - packages-ignore.yaml + +build_number: 1 + +mutex_package: ros2-distro-mutex 0.6.* jazzy_* + +skip_all_deps: false + +# If full rebuild, the build number of the existing package has +# to match the selected build number for skipping +full_rebuild: true + +packages_skip_by_deps: + - cartographer + - urdfdom + - urdfdom_py + - urdfdom_headers + - pendulum_control + - rttest + - tlsf + - tlsf_cpp + - gripper_controllers + +packages_remove_from_deps: + - cartographer + - pendulum_control + - rttest + - tlsf + - tlsf_cpp + - gripper_controllers + +skip_existing: + # - output + - https://conda.anaconda.org/robostack-jazzy/ + +packages_select_by_deps: + - ament_cmake_core + - ament_cmake_catch2 + + - desktop + - ros_base + - ros_environment + - ros_workspace + - dev_tools + - diagnostics + - teleop + - robot + - perception + - navigation2 + - simulation + - desktop_full + + - moveit + - moveit-planners-chomp + + - ros_gz + - slam_toolbox + - turtlebot3 + + - plotjuggler-ros + + - apriltag_ros + + - ackermann-msgs + - velodyne + - sbg_driver + - gtsam + +patch_dir: patch diff --git a/vinca_7010fdf55e.json b/vinca_7010fdf55e.json new file mode 100644 index 00000000..26542592 --- /dev/null +++ b/vinca_7010fdf55e.json @@ -0,0 +1 @@ +{"packages":{},"packages.conda":{"ros-humble-octomap-1.9.8-h60d57d3_2.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"h60d57d3_2","build_number":2,"depends":["octomap 1.9.*"],"license":"BSD-3-Clause","platform":"osx","timestamp":1726388270923,"md5":"131e07279abd868be40119b6e27bc9fc","name":"ros-humble-octomap","requires":[],"size":1661,"version":"1.9.8","binstar":{"package_id":"6674a0848c7b2f8b2ca7ce6a","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"e08a181568926c9c917cc44b4231e1b7e9ab08d158249b7d4160dca68f03a5cc"},"ros-humble-urdfdom-py-1.2.0-h60d57d3_2.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"h60d57d3_2","build_number":2,"depends":["urdfdom-py ==1.2.0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1726388271106,"md5":"88b2794fd08693c1f757080f8d7e3654","name":"ros-humble-urdfdom-py","requires":[],"size":1657,"version":"1.2.0","binstar":{"package_id":"6674a08584d8e3c9b344de6f","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"3ad11c233f868b528f91b1a9e1d47556f97a17ab55d656aff515f78c97200e3b"},"ros-jazzy-ament-package-0.16.3-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["importlib-metadata","importlib_resources","python 3.12.* *_cpython","ros2-distro-mutex ==0.5 jazzy","setuptools","__osx >=11.0","libcxx >=17","python_abi 3.12.* *_cp312","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140490876,"md5":"912c228637704df8901b21199e3cdd82","name":"ros-jazzy-ament-package","requires":[],"size":41668,"version":"0.16.3","binstar":{"package_id":"6674a0880ec0a9de7a21416c","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"b0eb7d9d47ab195b4a835334d39ecbc0b72e43995ed68c14b59b86fa58079928"},"ros2-distro-mutex-0.5.0-jazzy.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"jazzy","build_number":0,"constrains":["libboost 1.84.*","libboost-devel 1.84.*","pcl 1.14.1.*","gazebo 11.*","libpqxx 7.*"],"license":"BSD-3-Clause","platform":"osx","timestamp":1726388270725,"md5":"29369067294bc4fc7d566c5fd42fa350","name":"ros2-distro-mutex","requires":[],"depends":[],"size":2158,"version":"0.5.0","binstar":{"package_id":"6674a08a15fc1c937921416b","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"500cdec4673b358aef4b90b00109a630982fdf6a28767aa8e8be6a6cca1cd412"},"ros-jazzy-ament-cmake-core-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["catkin_pkg","cmake","python 3.12.* *_cpython","ros-jazzy-ament-package","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140531129,"md5":"be92554b89ac2cb68f316f2b27f02e1c","name":"ros-jazzy-ament-cmake-core","requires":[],"size":42498,"version":"2.5.0","binstar":{"package_id":"6674a0d7b557d1c73d6af053","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"80d8f97993a1c4c6b9c9f54cfa815455472e3033a5098658d8ea99b47958b86d"},"ros-jazzy-ros-environment-4.2.1-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140558290,"md5":"ad75149e9b6ea21805faeaa57382dbde","name":"ros-jazzy-ros-environment","requires":[],"size":19006,"version":"4.2.1","binstar":{"package_id":"6674a0d952b92cb4069dbd24","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"f09aae5d83d437b5a53def0d6f1c71a714c174aca07908fa2878b3f5cf3c5937"},"ros-jazzy-ros-workspace-1.0.3-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140547186,"md5":"25529827af4af255b1ce4755aa8c1a3e","name":"ros-jazzy-ros-workspace","requires":[],"size":33268,"version":"1.0.3","binstar":{"package_id":"6674a0dbdd9abcfdfb9dbd24","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"18ca0b89a6aa291a20bccd57333be841e0f4442626bf112c360b7efddf5d4e2a"},"ros-jazzy-iceoryx-hoofs-2.0.5-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140588423,"md5":"f52fe9854cb51517a4e9742f1639309f","name":"ros-jazzy-iceoryx-hoofs","requires":[],"size":257631,"version":"2.0.5","binstar":{"package_id":"6674a1224ef4ab0e17883dd8","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"4afbc7f5cbcf507ed02fc56f2f9303f360eec45bac5499535b70dcc112f3543e"},"ros-jazzy-urdfdom-headers-1.1.1-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140609839,"md5":"43b01f33ce7e890647100b5b8f7c890f","name":"ros-jazzy-urdfdom-headers","requires":[],"size":26436,"version":"1.1.1","binstar":{"package_id":"6674a123ff4752325d57944d","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"82d0447996f55f22b16b7a87c76c5df4cab751faabd0e8a2068374cfc7a67854"},"ros-jazzy-ament-cmake-include-directories-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140639114,"md5":"3374fa1ebcf5e75e8727e641d832ebfd","name":"ros-jazzy-ament-cmake-include-directories","requires":[],"size":19528,"version":"2.5.0","binstar":{"package_id":"6674a1307aab843f03579449","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"1cc179faf165dbb394967b9bd2d2ac74fd05995f09d2980abe924fee8fb077a4"},"ros-jazzy-ament-cmake-export-definitions-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140629252,"md5":"8c07fe93da9a16e64bff206e80f5c5d6","name":"ros-jazzy-ament-cmake-export-definitions","requires":[],"size":19679,"version":"2.5.0","binstar":{"package_id":"6674a13266b718689c44de6f","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"8250e0feec83343d836c3d7b067e6d2967b68b3343f2ea75faf7d7cd3534a515"},"ros-jazzy-ament-cmake-libraries-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","python_abi 3.12.* *_cp312","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140630716,"md5":"eaa38589b8993457cf573c05ec280d64","name":"ros-jazzy-ament-cmake-libraries","requires":[],"size":19213,"version":"2.5.0","binstar":{"package_id":"6674a133bf586e21d26af053","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"4402aa8ee343659bd7797c720a3c181d2b39266347da06e5b9b5a1ed2a098f71"},"ros-jazzy-ament-cmake-export-include-directories-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140620844,"md5":"3b1511c681d9876c9da8f49261a2f065","name":"ros-jazzy-ament-cmake-export-include-directories","requires":[],"size":20077,"version":"2.5.0","binstar":{"package_id":"6674a1348eba59d71d44de6f","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"c201641596c555a7fc3f982b337b892a0fa65b03451a2ec49964f0ebb7a45bf3"},"ros-jazzy-ament-cmake-python-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140607237,"md5":"4f6926cc2aa6d0280d0b640f027b9e4c","name":"ros-jazzy-ament-cmake-python","requires":[],"size":21801,"version":"2.5.0","binstar":{"package_id":"6674a134fda12eef0045c4f3","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"cb4381ae7841e4cbf4e3253fcb80e99e9d26fb9a6b5c05ce757eab31f95e086a"},"ros-jazzy-ament-cmake-export-libraries-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140588501,"md5":"2eaa7145415a195fc569d2bba3c211d4","name":"ros-jazzy-ament-cmake-export-libraries","requires":[],"size":21633,"version":"2.5.0","binstar":{"package_id":"6674a135751ba5b24b21416e","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"52d11281b2473d7b0d9e7a20be63fb7ba2b9acafb1ace3f07ef94aeb96b060c1"},"ros-jazzy-ament-lint-0.17.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140589051,"md5":"d38e6e18067a06c14081d51225422eaa","name":"ros-jazzy-ament-lint","requires":[],"size":16271,"version":"0.17.0","binstar":{"package_id":"6674a1357f5cc3d27f45c4f6","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"ec1daf30ec74ce7500fa39e03ef3e712c351ec67f22565565557abf9f9fa681f"},"ros-jazzy-gtest-vendor-1.14.9000-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140622960,"md5":"2e5fc4a743297ed271acb56a25ae8e99","name":"ros-jazzy-gtest-vendor","requires":[],"size":207343,"version":"1.14.9000","binstar":{"package_id":"6674a136b5589307ae1922bf","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"3a206b476844b5d7c2e13e1170a3ebb35c600515f6f3f86e509285792b087c0c"},"ros-jazzy-ament-cmake-export-link-flags-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140612665,"md5":"93c6276025111f27b61accae2f9ecf41","name":"ros-jazzy-ament-cmake-export-link-flags","requires":[],"size":19636,"version":"2.5.0","binstar":{"package_id":"6674a137a34cc3f166a7ce6b","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"73be72ac33ffcdd49b05fb95d36be3452606080212316c2f3343f9e35ad8f6f2"},"ros-jazzy-ament-cmake-version-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","python_abi 3.12.* *_cp312","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140603565,"md5":"06a9d5d8e4fed20b14cf6538a1431c6e","name":"ros-jazzy-ament-cmake-version","requires":[],"size":19386,"version":"2.5.0","binstar":{"package_id":"6674a13adbc9a5ddb5579449","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"f1ac3b86cf42ef512b73d99e18101e5bfdf49fc6459aef4d32b6250eb0927f60"},"ros-jazzy-ament-pycodestyle-0.17.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["pycodestyle","python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140590034,"md5":"6d49166c495a3c983a6366800d629d4a","name":"ros-jazzy-ament-pycodestyle","requires":[],"size":21346,"version":"0.17.0","binstar":{"package_id":"6674a143f1e91f8ddc6af055","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"e8a89532f9928381ac0034eb76c3f34c499c93c56855be4725bb11ec75037561"},"ros-jazzy-google-benchmark-vendor-0.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["benchmark","python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140615306,"md5":"a2f823b561c06f4678a52549c72c807e","name":"ros-jazzy-google-benchmark-vendor","requires":[],"size":15018,"version":"0.5.0","binstar":{"package_id":"6674a145d25c322a2e1922bf","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"ff2adcafc0ed7ef6ca2054fac735d0981b4671a7f973e861574cb5785a260993"},"ros-jazzy-osrf-pycommon-2.1.4-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["importlib-metadata","python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140605322,"md5":"481fd1dc31dd4f553f8e8997458503a7","name":"ros-jazzy-osrf-pycommon","requires":[],"size":63412,"version":"2.1.4","binstar":{"package_id":"6674a14ad8010e9cee1922bf","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"d186f73edf1a57511015b4d88a96398e908f799210c259b794b997de3c845b99"},"ros-jazzy-osrf-testing-tools-cpp-2.0.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140626421,"md5":"4ce3832312e95b2ed6d50c2820340045","name":"ros-jazzy-osrf-testing-tools-cpp","requires":[],"size":5121053,"version":"2.0.0","binstar":{"package_id":"6674a14c1aea3d65a045c4f5","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"79b51be24db2eab9a65b1fe0f4b19183fb767819f65f0ebb0079b67365af9f39"},"ros-jazzy-test-interface-files-0.11.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140643505,"md5":"c11fbf98adb4ba6ece8c294ff2dade95","name":"ros-jazzy-test-interface-files","requires":[],"size":21497,"version":"0.11.0","binstar":{"package_id":"6674a14e3ca8a6ae9e883dd8","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"7092176615da72da6bc471cf2d773d71610416c5fa6bf9c91993087cc0fe439a"},"ros-jazzy-ament-cmake-export-dependencies-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ament-cmake-libraries","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140703755,"md5":"05b5727813193849b8d2ee2031a7da77","name":"ros-jazzy-ament-cmake-export-dependencies","requires":[],"size":20585,"version":"2.5.0","binstar":{"package_id":"6674a1a7d6a022a9b921416b","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"a170d88617d59c7ef1a483699e600211e507af72523da7908ca765e1cc27ade0"},"ros-jazzy-ament-cmake-export-targets-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ament-cmake-export-libraries","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140720082,"md5":"319b538d03e6f5aea8ce24b74cf2b492","name":"ros-jazzy-ament-cmake-export-targets","requires":[],"size":20431,"version":"2.5.0","binstar":{"package_id":"6674a1a8c42c2ed11157944c","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"1f86fda4d2db0ab7db801f3fc463681bde7ae23a6de5d555e40168dc96ac70ed"},"ros-jazzy-ament-cmake-target-dependencies-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ament-cmake-include-directories","ros-jazzy-ament-cmake-libraries","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140712227,"md5":"d215a4e232f0e7a08d3e9c51f8612910","name":"ros-jazzy-ament-cmake-target-dependencies","requires":[],"size":21220,"version":"2.5.0","binstar":{"package_id":"6674a1a9b557d1c73d6af055","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"6ee1a72f1de90ffbd24f3e8b9d16e29c637eb26126b33255396b85761547d396"},"ros-jazzy-ament-cmake-test-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140690869,"md5":"28375aeff88963de40532e4f23a98520","name":"ros-jazzy-ament-cmake-test","requires":[],"size":33801,"version":"2.5.0","binstar":{"package_id":"6674a1aa83e518de36a7ce6c","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"a2e605c960503f299f76415da77bb93155b4b717f7411f00aa61e29b9b28f561"},"ros-jazzy-ament-flake8-0.17.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["flake8","flake8-builtins","flake8-docstrings","flake8-import-order","flake8-quotes","python 3.12.* *_cpython","ros-jazzy-ament-lint","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140675767,"md5":"d9812dcafd864ca326db8531e9878da5","name":"ros-jazzy-ament-flake8","requires":[],"size":27206,"version":"0.17.0","binstar":{"package_id":"6674a1ac189b62b6cff4ab97","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"60e170615b4bfc21921853f328a4893cf965fe12462c2ccb72c5bb272e5737b5"},"ros-jazzy-ament-cmake-export-interfaces-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ament-cmake-export-libraries","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140675458,"md5":"b38ef3e686bd16c351ee8100cdfc42e6","name":"ros-jazzy-ament-cmake-export-interfaces","requires":[],"size":20289,"version":"2.5.0","binstar":{"package_id":"6674a1c372cb57ea62f4ab97","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"14d86c88f73f523ec4a2dde76e7056028b5f5f83d4a70bed4910ac640097faf0"},"ros-jazzy-gmock-vendor-1.14.9000-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-gtest-vendor","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140690574,"md5":"b716d159d5540618819a19ea80ad64df","name":"ros-jazzy-gmock-vendor","requires":[],"size":121034,"version":"1.14.9000","binstar":{"package_id":"6674a1c589a9c37693883dd8","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"9ef73b18d34d9a41037ea9566c3a90108d3862c0bc45478cc1fe49afa06dd034"},"ros-jazzy-iceoryx-posh-2.0.5-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-iceoryx-hoofs","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140699343,"md5":"b21b9e25264e259bee960040b0079750","name":"ros-jazzy-iceoryx-posh","requires":[],"size":436126,"version":"2.0.5","binstar":{"package_id":"6674a1c772ad0f0ae5a7ce6f","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"161947ad4e5eef5ff2a30a455ecda29f8fb117b39875948207c227e06a7b716c"},"ros-jazzy-ament-cmake-google-benchmark-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-test","ros-jazzy-google-benchmark-vendor","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140874481,"md5":"04541717dec55c4749ebdfb99d2c2393","name":"ros-jazzy-ament-cmake-google-benchmark","requires":[],"size":29244,"version":"2.5.0","binstar":{"package_id":"6674a213aba19321c6f4ab96","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"e4aeff47ef8b86ed4b36434ad48f26a717c5df0b785b798a745c0c1aaae4523a"},"ros-jazzy-ament-cmake-pytest-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["pytest","python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ament-cmake-test","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140759645,"md5":"0fe0be7e8d63fee6d8aa153ec67660e3","name":"ros-jazzy-ament-cmake-pytest","requires":[],"size":22296,"version":"2.5.0","binstar":{"package_id":"6674a21417bbcfe6d5579449","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"f757d1ffcd918ce226edab6eb6c51145f4398bca3cfb6082694abb475c06ee4e"},"ros-jazzy-iceoryx-binding-c-2.0.5-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140883982,"md5":"cea01862b96919815b2f83fdf5d22fcf","name":"ros-jazzy-iceoryx-binding-c","requires":[],"size":80198,"version":"2.0.5","binstar":{"package_id":"6674a21572cb57ea62f4ab99","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"ca5e4ea8682175fb5ef94675358bddb27319d9be0fe8e864d07a256fac8292ad"},"ros-jazzy-ament-cmake-gtest-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["gtest","python 3.12.* *_cpython","ros-jazzy-ament-cmake-test","ros-jazzy-gtest-vendor","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","python_abi 3.12.* *_cp312","gtest >=1.14.0,<1.14.1.0a0","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140835357,"md5":"e5202fa6ad6afc5bc2064113647981a1","name":"ros-jazzy-ament-cmake-gtest","requires":[],"size":22294,"version":"2.5.0","binstar":{"package_id":"6674a21d86c5f0ddff44de71","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"130d937e7c56a9e25948d68c1232cffd9d948fbfcfc77c7a5160c71725e61781"},"ros-jazzy-ament-cmake-vendor-package-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ament-cmake-export-dependencies","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","vcstool","libcxx >=17","__osx >=11.0","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140847982,"md5":"238b88df3bca894261d4373a6c4a1c7d","name":"ros-jazzy-ament-cmake-vendor-package","requires":[],"size":24345,"version":"2.5.0","binstar":{"package_id":"6674a21ede26c9d519883dd8","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"2169fbfcec77853eef2f236625764eca96e47316812f008a002f765fcd2f6d21"},"ros-jazzy-ament-lint-auto-0.17.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ament-cmake-test","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140864397,"md5":"5775ab94dc4dea78459e67f36e88afd6","name":"ros-jazzy-ament-lint-auto","requires":[],"size":19634,"version":"0.17.0","binstar":{"package_id":"6674a21f52b92cb4069dbd2a","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"5d60a322f56b19768f113cb3252a0e211bd013de4d89c29bfb1da45ca0748e9e"},"ros-jazzy-ament-mypy-0.17.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["mypy","python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140856140,"md5":"cfe0ff55ac9273a9e770d0c85e4ca981","name":"ros-jazzy-ament-mypy","requires":[],"size":25372,"version":"0.17.0","binstar":{"package_id":"6674a2204161a5e24dc62372","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"0b15436215a30d0462a2533713be5e0063037b92f3983e4e4d5a679cccb07519"},"ros-jazzy-ament-pep257-0.17.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["pydocstyle","python 3.12.* *_cpython","ros-jazzy-ament-lint","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140819805,"md5":"4de93b3874991c394855945783c2bdfd","name":"ros-jazzy-ament-pep257","requires":[],"size":25583,"version":"0.17.0","binstar":{"package_id":"6674a221de26c9d519883dda","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"5afe8dba15f901634a4f77579d1796f65a97a6d991074bcc829cd161bfc7548c"},"ros-jazzy-ament-cmake-gen-version-h-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140936767,"md5":"f3fe575116f1f31e6da4f8868d765aec","name":"ros-jazzy-ament-cmake-gen-version-h","requires":[],"size":22406,"version":"2.5.0","binstar":{"package_id":"6674a28d7eb3630506c62372","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"8cb6e3da240b1c7a04c15b03d869d1bf26f5fabcb6b0aae21b8416c0e7d85883"},"ros-jazzy-ament-cmake-gmock-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["gmock","python 3.12.* *_cpython","ros-jazzy-ament-cmake-gtest","ros-jazzy-ament-cmake-test","ros-jazzy-gmock-vendor","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140951047,"md5":"7956d1fb96aa068d4310a5058440c868","name":"ros-jazzy-ament-cmake-gmock","requires":[],"size":22522,"version":"2.5.0","binstar":{"package_id":"6674a290c650598af657944a","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"99ed55c4495065a5d641a745862980cfcf65fb602ddc1c5a825e82acb973174e"},"ros-jazzy-ament-copyright-0.17.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["importlib-metadata","python 3.12.* *_cpython","ros-jazzy-ament-lint","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140920038,"md5":"c1fecc0d8c6d14e4548613ca0d9236f9","name":"ros-jazzy-ament-copyright","requires":[],"size":65094,"version":"0.17.0","binstar":{"package_id":"6674a291a2d10e383ff4ab9d","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"1338635125fdae9e68201e887dc5e98170da8d6a350d87fa5635aec432ad7462"},"ros-jazzy-cyclonedds-0.10.4-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["openssl","python 3.12.* *_cpython","ros-jazzy-iceoryx-binding-c","ros-jazzy-iceoryx-hoofs","ros-jazzy-iceoryx-posh","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","openssl >=3.3.1,<4.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719140959158,"md5":"095c96c4753cfebeaf111d837d5feae2","name":"ros-jazzy-cyclonedds","requires":[],"size":1056511,"version":"0.10.4","binstar":{"package_id":"6674a293cc5a7c2475f4ab97","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"62a956457b3ec0cb71b9705de857cc2219e1eee89d93a78f5fd6a2d1e3891c51"},"ros-jazzy-ament-clang-format-0.17.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["clang-format","python 3.12.* *_cpython","pyyaml","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141027521,"md5":"ac9832ddefd2d266d8758bdc2310b10d","name":"ros-jazzy-ament-clang-format","requires":[],"size":29085,"version":"0.17.0","binstar":{"package_id":"6674a2dcee500a2b2d1922bf","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"a322541e2470bd352ea69252716e883ab9cca406e545254cf02018d9f4a53d0d"},"ros-jazzy-ament-index-python-1.8.1-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","python_abi 3.12.* *_cp312","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141006150,"md5":"49a3174e780117030aef78fab985ed59","name":"ros-jazzy-ament-index-python","requires":[],"size":28218,"version":"1.8.1","binstar":{"package_id":"6674a2de3ebd9bb417c12e4b","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"3fdd189c52f04fa3943bf2ef43e491850c64df21399285bce2890bf4fccd32d4"},"ros-jazzy-domain-coordinator-0.12.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141018312,"md5":"a1014269004ed2f47fac4f06f9b6015b","name":"ros-jazzy-domain-coordinator","requires":[],"size":19634,"version":"0.12.0","binstar":{"package_id":"6674a2df1940d61b8344de70","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"246efa1324135e8f2fea4a3cdd5898d1184e52847da9ac0e159adce16bcc725b"},"ros-jazzy-ament-cmake-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["cmake","python 3.12.* *_cpython","ros-jazzy-ament-cmake-core","ros-jazzy-ament-cmake-export-definitions","ros-jazzy-ament-cmake-export-dependencies","ros-jazzy-ament-cmake-export-include-directories","ros-jazzy-ament-cmake-export-interfaces","ros-jazzy-ament-cmake-export-libraries","ros-jazzy-ament-cmake-export-link-flags","ros-jazzy-ament-cmake-export-targets","ros-jazzy-ament-cmake-gen-version-h","ros-jazzy-ament-cmake-libraries","ros-jazzy-ament-cmake-python","ros-jazzy-ament-cmake-target-dependencies","ros-jazzy-ament-cmake-test","ros-jazzy-ament-cmake-version","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","python_abi 3.12.* *_cp312","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141035791,"md5":"4e6e27eb745309b6ceee6fa262f69ec7","name":"ros-jazzy-ament-cmake","requires":[],"size":20805,"version":"2.5.0","binstar":{"package_id":"6674a2eda2d10e383ff4ab9f","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"81492eea6c8ce90cd1d4564ec669bac8f21eaeeb8750cf5db1ed5384251a19b0"},"ros-jazzy-ament-cppcheck-0.17.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["cppcheck","python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141067623,"md5":"f7f038a0c5f3e66871386c6ddf84eca8","name":"ros-jazzy-ament-cppcheck","requires":[],"size":28430,"version":"0.17.0","binstar":{"package_id":"6674a2ee7aab843f03579451","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"2d20d879f810dbdcf7ce884fa8e3f661de99b4a5fe13639ee3894e7ea274e9ac"},"ros-jazzy-ament-cpplint-0.17.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141058641,"md5":"e305d180d57d2e968be86b71cbd25fd4","name":"ros-jazzy-ament-cpplint","requires":[],"size":167530,"version":"0.17.0","binstar":{"package_id":"6674a2eff3b3829c06f4ab96","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"c4556899aef8e0dfa9593322bbb6b31c07a9217eb523261f92d1af6cd6306408"},"ros-jazzy-ament-lint-cmake-0.17.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141010865,"md5":"c6294e4440852d8afc4a741297cf24fc","name":"ros-jazzy-ament-lint-cmake","requires":[],"size":37993,"version":"0.17.0","binstar":{"package_id":"6674a2f1e9156fea239d9855","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"4ab541847515cd62c1927b0d953b8aef7317ff4d9a5f503fcb7676653be768f2"},"ros-jazzy-ament-xmllint-0.17.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["libxml2","python 3.12.* *_cpython","ros-jazzy-ament-lint","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","python_abi 3.12.* *_cp312","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141049409,"md5":"786f762f853aaee0694c385c90477cdb","name":"ros-jazzy-ament-xmllint","requires":[],"size":26588,"version":"0.17.0","binstar":{"package_id":"6674a2f2c88619e4bd9d9855","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"39f3154113ae5d3075946bf7d89eefd9075e6d839d213cc3f844a4a3d8d61a04"},"ros-jazzy-pybind11-vendor-3.1.2-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["pybind11","python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141113953,"md5":"35444c84a667acc40fa6674f70af0b0b","name":"ros-jazzy-pybind11-vendor","requires":[],"size":20637,"version":"3.1.2","binstar":{"package_id":"6674a343ea2199b4dff4ab97","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"46777be2b0bdd1a301aa4c51d9bf9ea2976ab0ac4ce58bb330ce15a4c8ae8d02"},"ros-jazzy-rpyutils-0.4.1-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141100723,"md5":"a087e9ffba152f7ed62fc6ba7effd26c","name":"ros-jazzy-rpyutils","requires":[],"size":24651,"version":"0.4.1","binstar":{"package_id":"6674a3449d4c1e9d4f44de6f","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"993ba18c55e82ae563d81bc97f774db37c9a8368a7e70ca00915bf81b2dccefd"},"ros-jazzy-tinyxml2-vendor-0.9.1-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","tinyxml2","__osx >=11.0","libcxx >=17","tinyxml2 >=10.0.0,<11.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141125466,"md5":"142151601848db3680581c6fa8794201","name":"ros-jazzy-tinyxml2-vendor","requires":[],"size":21481,"version":"0.9.1","binstar":{"package_id":"6674a349598bb36cab57944c","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"c7d3b4872f8946d3ab6d9f76b60b9f64f09d45ce5ceff297d351a35583847619"},"ros-jazzy-ament-cmake-auto-2.5.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ament-cmake","ros-jazzy-ament-cmake-gmock","ros-jazzy-ament-cmake-gtest","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141136298,"md5":"6f5d8123655a1d44efd10bed16a80c09","name":"ros-jazzy-ament-cmake-auto","requires":[],"size":24618,"version":"2.5.0","binstar":{"package_id":"6674a34992c307f5a7a7ce6f","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"55e89a84d1b3eb06ed6627a19b347e976b81fd35d188280fd786c16cab26c992"},"ros-jazzy-yaml-cpp-vendor-9.0.0-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","yaml-cpp","__osx >=11.0","libcxx >=17","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312","numpy >=1.26.4,<2.0a0","yaml-cpp >=0.8.0,<0.9.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141135244,"md5":"1dfbb553865e591c50806f30348963ba","name":"ros-jazzy-yaml-cpp-vendor","requires":[],"size":20547,"version":"9.0.0","binstar":{"package_id":"6674a34abfe0729017c62374","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"d3d0c35362a2d853c54deda59f9dfe4545699c33b2418e86165642e420a95d08"},"ros-jazzy-liblz4-vendor-0.26.3-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","python_abi 3.12.* *_cp312","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141099383,"md5":"fbf5029019f5b0dba79765305cd17b2c","name":"ros-jazzy-liblz4-vendor","requires":[],"size":21319,"version":"0.26.3","binstar":{"package_id":"6674a34bb60870276744de75","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"bc08d1a444a72e380a347ba4324126f9d79a5178ec32b45bdc4c838e41f5a189"},"ros-jazzy-zstd-vendor-0.26.3-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","zstd","libcxx >=17","__osx >=11.0","ros2-distro-mutex >=0.5.0,<0.6.0a0","zstd >=1.5.6,<1.6.0a0","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141143843,"md5":"3d79e96f485cb284af27bc903246a3ed","name":"ros-jazzy-zstd-vendor","requires":[],"size":21432,"version":"0.26.3","binstar":{"package_id":"6674a34dc42c2ed11157944f","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"856ed3e39bde4da66351d0f3eb1c38de2ae8d9d24e258686accc2e95be04825f"},"ros-jazzy-shared-queues-vendor-0.26.3-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","__osx >=11.0","libcxx >=17","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312","numpy >=1.26.4,<2.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141125993,"md5":"6b49ca8cfa30bf34204b802ae2c8e0f7","name":"ros-jazzy-shared-queues-vendor","requires":[],"size":33414,"version":"0.26.3","binstar":{"package_id":"6674a34dfce8b5e8a96af055","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"74da54ce218ef9ef56b31003fa06a4f8aa0a812b932222e657b94837c88d1f58"},"ros-jazzy-sqlite3-vendor-0.26.3-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-ros-workspace","ros2-distro-mutex ==0.5 jazzy","sqlite","__osx >=11.0","libcxx >=17","numpy >=1.26.4,<2.0a0","python_abi 3.12.* *_cp312","ros2-distro-mutex >=0.5.0,<0.6.0a0","libsqlite >=3.46.0,<4.0a0"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719141115896,"md5":"e37806e33837a2937d048e668ff80167","name":"ros-jazzy-sqlite3-vendor","requires":[],"size":21994,"version":"0.26.3","binstar":{"package_id":"6674a34ffce8b5e8a96af057","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"13e27d0901964d8a41de5b06c125690a523a39f992ef5874635d7ca4c77292c1"},"ros-jazzy-mcap-vendor-0.26.3-np126py312haf9abe2_0.conda":{"operatingsystem":"darwin","machine":"arm64","target-triplet":"arm64-any-darwin","has_prefix":false,"subdir":"osx-arm64","arch":"arm64","build":"np126py312haf9abe2_0","build_number":0,"depends":["python 3.12.* *_cpython","ros-jazzy-liblz4-vendor","ros-jazzy-ros-workspace","ros-jazzy-zstd-vendor","ros2-distro-mutex ==0.5 jazzy","libcxx >=17","__osx >=11.0","numpy >=1.26.4,<2.0a0","ros2-distro-mutex >=0.5.0,<0.6.0a0","python_abi 3.12.* *_cp312"],"license":"BSD-3-Clause","platform":"osx","timestamp":1719166530894,"md5":"152d7308ba04d5d4079b31356db5625b","name":"ros-jazzy-mcap-vendor","requires":[],"size":164368,"version":"0.26.3","binstar":{"package_id":"6674a3f7b4d9bfd6ec579457","owner_id":"667486a72acfb986e6e822d4","channel":"main"},"sha256":"704a7077fc37659660eabeb162ae11aaa679087c1f40347abd532bba3bf7cf8c"}},"info":{"default_numpy_version":"1.7","default_python_version":"2.7","platform":"osx","arch":"arm64","subdir":"osx-arm64"}} \ No newline at end of file