Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build files 2024-09-15-0817
Browse files Browse the repository at this point in the history
actions-user committed Sep 15, 2024
1 parent bf970b9 commit 819de8c
Showing 710 changed files with 53,621 additions and 0 deletions.
5,756 changes: 5,756 additions & 0 deletions .github/workflows/build_linux_aarch64.yml

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions activate.bat
Original file line number Diff line number Diff line change
@@ -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"
16 changes: 16 additions & 0 deletions activate.ps1
Original file line number Diff line number Diff line change
@@ -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"
26 changes: 26 additions & 0 deletions activate.sh
Original file line number Diff line number Diff line change
@@ -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=
49 changes: 49 additions & 0 deletions bld_ament_cmake.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
:: Generated by vinca http://github.com/RoboStack/vinca.
:: DO NOT EDIT!
setlocal EnableDelayedExpansion

set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"

:: MSVC is preferred.
set CC=cl.exe
set CXX=cl.exe

rd /s /q build
mkdir build
pushd build

:: set "CMAKE_GENERATOR=Ninja"

:: try to fix long paths issues by using default generator
set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"

:: PYTHON_INSTALL_DIR should be a relative path, see
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
:: python

:: This line is scary, but it basically assigns the output of the command inside (` and `)
:: to the variable specified after DO SET
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']))"`) DO SET PYTHON_INSTALL_DIR=%%i

cmake ^
-G "%CMAKE_GENERATOR%" ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
-DPYTHON_EXECUTABLE=%PYTHON% ^
-DPython_EXECUTABLE=%PYTHON% ^
-DPython3_EXECUTABLE=%PYTHON% ^
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
-DBUILD_SHARED_LIBS=ON ^
-DBUILD_TESTING=OFF ^
-DCMAKE_OBJECT_PATH_MAX=255 ^
--compile-no-warning-as-error ^
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
%SRC_DIR%\%PKG_NAME%\src\work
if errorlevel 1 exit 1

cmake --build . --config Release --target install
if errorlevel 1 exit 1
25 changes: 25 additions & 0 deletions bld_ament_python.bat
Original file line number Diff line number Diff line change
@@ -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
81 changes: 81 additions & 0 deletions bld_catkin.bat
Original file line number Diff line number Diff line change
@@ -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
)
)
34 changes: 34 additions & 0 deletions bld_catkin_merge.bat
Original file line number Diff line number Diff line change
@@ -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
)
38 changes: 38 additions & 0 deletions bld_colcon_merge.bat
Original file line number Diff line number Diff line change
@@ -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']))"`) 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
)
76 changes: 76 additions & 0 deletions build_ament_cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Generated by vinca http://github.com/RoboStack/vinca.
# DO NOT EDIT!

rm -rf build
mkdir build
cd build

# necessary for correctly linking SIP files (from python_qt_bindings)
export LINK=$CXX

if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then
PYTHON_EXECUTABLE=$PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="10.15"
else
PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="11.0"
fi

echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}"
echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}"

export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"`
echo "Using Python ${ROS_PYTHON_VERSION}"

# see https://github.com/conda-forge/cross-python-feedstock/issues/24
if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then
find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true
fi

if [[ $target_platform =~ linux.* ]]; then
export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1"
export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1"
fi;

# Needed for qt-gui-cpp ..
if [[ $target_platform =~ linux.* ]]; then
ln -s $GCC ${BUILD_PREFIX}/bin/gcc
ln -s $GXX ${BUILD_PREFIX}/bin/g++
fi;

# PYTHON_INSTALL_DIR should be a relative path, see
# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX,
# but it is not trivial to do this in bash scripting, so let's do it via python
export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"`
echo "Using site_packages: $PYTHON_INSTALL_DIR"

cmake \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DAMENT_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_FIND_STRATEGY=LOCATION \
-DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \
-DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DCATKIN_SKIP_TESTING=$SKIP_TESTING \
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \
--compile-no-warning-as-error \
$SRC_DIR/$PKG_NAME/src/work

cmake --build . --config Release --target install
17 changes: 17 additions & 0 deletions build_ament_python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by vinca http://github.com/RoboStack/vinca.
# DO NOT EDIT!

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
123 changes: 123 additions & 0 deletions build_catkin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Generated by vinca http://github.com/RoboStack/vinca.
# DO NOT EDIT!

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

echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}"
echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_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
230 changes: 230 additions & 0 deletions buildorder.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
ros2-distro-mutex
ros-humble-octomap
ros-humble-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-urdfdom-headers
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-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-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-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-pybind11-vendor
ros-jazzy-tinyxml2-vendor
ros-jazzy-yaml-cpp-vendor
ros-jazzy-zstd-vendor
ros-jazzy-liblz4-vendor
ros-jazzy-sqlite3-vendor
ros-jazzy-shared-queues-vendor
ros-jazzy-ament-cmake-auto
ros-jazzy-ament-cmake-copyright
ros-jazzy-ament-uncrustify
ros-jazzy-launch-yaml
ros-jazzy-launch-xml
ros-jazzy-mcap-vendor
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-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-orocos-kdl-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-rcutils
ros-jazzy-rosidl-pycommon
ros-jazzy-rosidl-generator-type-description
ros-jazzy-urdfdom
ros-jazzy-rosidl-runtime-c
ros-jazzy-rosidl-cmake
ros-jazzy-rcpputils
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-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-rosidl-typesupport-fastrtps-cpp
ros-jazzy-rosidl-typesupport-introspection-cpp
ros-jazzy-rcl-yaml-param-parser
ros-jazzy-urdf
ros-jazzy-rosidl-typesupport-fastrtps-c
ros-jazzy-kdl-parser
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-lifecycle-msgs
ros-jazzy-std-msgs
ros-jazzy-statistics-msgs
ros-jazzy-rosgraph-msgs
ros-jazzy-std-srvs
ros-jazzy-rosbag2-test-msgdefs
ros-jazzy-rosbag2-interfaces
ros-jazzy-ros2cli-test-interfaces
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-actionlib-msgs
ros-jazzy-rmw-fastrtps-dynamic-cpp
ros-jazzy-rmw-fastrtps-cpp
ros-jazzy-rmw-connextdds
ros-jazzy-sensor-msgs
ros-jazzy-tf2
ros-jazzy-tf2-msgs
ros-jazzy-shape-msgs
ros-jazzy-trajectory-msgs
ros-jazzy-nav-msgs
ros-jazzy-diagnostic-msgs
ros-jazzy-rmw-implementation
ros-jazzy-visualization-msgs
ros-jazzy-stereo-msgs
ros-jazzy-sensor-msgs-py
ros-jazzy-tf2-eigen-kdl
ros-jazzy-rcl
ros-jazzy-common-interfaces
ros-jazzy-rcl-lifecycle
ros-jazzy-rcl-action
ros-jazzy-libstatistics-collector
ros-jazzy-rclpy
ros-jazzy-rclcpp
ros-jazzy-launch-ros
ros-jazzy-rclcpp-lifecycle
ros-jazzy-ros2cli
ros-jazzy-rosbag2-test-common
ros-jazzy-rclcpp-components
ros-jazzy-rclcpp-action
ros-jazzy-tf2-py
ros-jazzy-launch-testing-ros
ros-jazzy-message-filters
ros-jazzy-rosbag2-storage
ros-jazzy-tf2-ros-py
ros-jazzy-ros2lifecycle-test-fixtures
ros-jazzy-ros2multicast
ros-jazzy-ros2topic
ros-jazzy-tf2-ros
ros-jazzy-rosbag2-storage-sqlite3
ros-jazzy-rosbag2-storage-mcap
ros-jazzy-ros2pkg
ros-jazzy-ros2service
ros-jazzy-ros2node
ros-jazzy-ros2test
ros-jazzy-ros2interface
ros-jazzy-ros2doctor
ros-jazzy-ros2action
ros-jazzy-tf2-tools
ros-jazzy-robot-state-publisher
ros-jazzy-tf2-geometry-msgs
ros-jazzy-rosbag2-storage-default-plugins
ros-jazzy-tf2-kdl
ros-jazzy-tf2-eigen
ros-jazzy-ros2run
ros-jazzy-ros2param
ros-jazzy-tf2-sensor-msgs
ros-jazzy-ros-testing
ros-jazzy-ros2launch
ros-jazzy-ros2lifecycle
ros-jazzy-tf2-bullet
ros-jazzy-rosbag2-cpp
ros-jazzy-sros2
ros-jazzy-ros2component
ros-jazzy-geometry2
ros-jazzy-rosbag2-compression
ros-jazzy-sros2-cmake
ros-jazzy-ros2cli-common-extensions
ros-jazzy-rosbag2-compression-zstd
ros-jazzy-ros-core
ros-jazzy-rosbag2-transport
ros-jazzy-rosbag2-py
ros-jazzy-ros2bag
ros-jazzy-rosbag2-tests
ros-jazzy-rosbag2
ros-jazzy-ros-base
18 changes: 18 additions & 0 deletions deactivate.bat
Original file line number Diff line number Diff line change
@@ -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=
18 changes: 18 additions & 0 deletions deactivate.ps1
Original file line number Diff line number Diff line change
@@ -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=''
21 changes: 21 additions & 0 deletions deactivate.sh
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions recipes/ros-humble-octomap/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package:
name: ros-humble-octomap
version: "1.9.8"

build:
number: 2

requirements:
run:
- octomap 1.9.*


about:
homepage: https://github.com/conda-forge/octomap-feedstock
license: BSD-3-Clause
summary: |
An Efficient Probabilistic 3D Mapping Framework Based on Octrees
extra:
recipe-maintainers:
- ros-forge
19 changes: 19 additions & 0 deletions recipes/ros-humble-urdfdom-py/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package:
name: ros-humble-urdfdom-py
version: "1.2.0"

build:
number: 2

requirements:
run:
- urdfdom-py 1.2.0

about:
homepage: https://github.com/ros/urdf_parser_py
license: BSD-3-Clause
summary: |
Standalone URDF parser for Python.
extra:
recipe-maintainers:
- ros-forge
49 changes: 49 additions & 0 deletions recipes/ros-jazzy-action-msgs/bld_ament_cmake.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
:: Generated by vinca http://github.com/RoboStack/vinca.
:: DO NOT EDIT!
setlocal EnableDelayedExpansion

set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"

:: MSVC is preferred.
set CC=cl.exe
set CXX=cl.exe

rd /s /q build
mkdir build
pushd build

:: set "CMAKE_GENERATOR=Ninja"

:: try to fix long paths issues by using default generator
set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"

:: PYTHON_INSTALL_DIR should be a relative path, see
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
:: python

:: This line is scary, but it basically assigns the output of the command inside (` and `)
:: to the variable specified after DO SET
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']))"`) DO SET PYTHON_INSTALL_DIR=%%i

cmake ^
-G "%CMAKE_GENERATOR%" ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
-DPYTHON_EXECUTABLE=%PYTHON% ^
-DPython_EXECUTABLE=%PYTHON% ^
-DPython3_EXECUTABLE=%PYTHON% ^
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
-DBUILD_SHARED_LIBS=ON ^
-DBUILD_TESTING=OFF ^
-DCMAKE_OBJECT_PATH_MAX=255 ^
--compile-no-warning-as-error ^
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
%SRC_DIR%\%PKG_NAME%\src\work
if errorlevel 1 exit 1

cmake --build . --config Release --target install
if errorlevel 1 exit 1
76 changes: 76 additions & 0 deletions recipes/ros-jazzy-action-msgs/build_ament_cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Generated by vinca http://github.com/RoboStack/vinca.
# DO NOT EDIT!

rm -rf build
mkdir build
cd build

# necessary for correctly linking SIP files (from python_qt_bindings)
export LINK=$CXX

if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then
PYTHON_EXECUTABLE=$PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="10.15"
else
PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="11.0"
fi

echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}"
echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}"

export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"`
echo "Using Python ${ROS_PYTHON_VERSION}"

# see https://github.com/conda-forge/cross-python-feedstock/issues/24
if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then
find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true
fi

if [[ $target_platform =~ linux.* ]]; then
export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1"
export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1"
fi;

# Needed for qt-gui-cpp ..
if [[ $target_platform =~ linux.* ]]; then
ln -s $GCC ${BUILD_PREFIX}/bin/gcc
ln -s $GXX ${BUILD_PREFIX}/bin/g++
fi;

# PYTHON_INSTALL_DIR should be a relative path, see
# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX,
# but it is not trivial to do this in bash scripting, so let's do it via python
export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"`
echo "Using site_packages: $PYTHON_INSTALL_DIR"

cmake \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DAMENT_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_FIND_STRATEGY=LOCATION \
-DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \
-DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DCATKIN_SKIP_TESTING=$SKIP_TESTING \
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \
--compile-no-warning-as-error \
$SRC_DIR/$PKG_NAME/src/work

cmake --build . --config Release --target install
93 changes: 93 additions & 0 deletions recipes/ros-jazzy-action-msgs/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# 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
rev: release/jazzy/action_msgs/2.0.2-2
target_directory: ros-jazzy-action-msgs/src/work

build:
script: ${{ 'build_ament_cmake.sh' if unix else 'bld_ament_cmake.bat' }}
number: 0
post_process:
- files:
- '*.pc'
regex: (?:-L|-I)?"?([^;\s]+/sysroot/)
replacement: $(CONDA_BUILD_SYSROOT_S)
- files:
- '*.cmake'
regex: ([^;\s"]+/sysroot)
replacement: $ENV{CONDA_BUILD_SYSROOT}
- files:
- '*.cmake'
regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk)
replacement: $ENV{CONDA_BUILD_SYSROOT}
about:
homepage: https://www.ros.org/
license: BSD-3-Clause
summary: |
Robot Operating System
extra:
recipe-maintainers:
- ros-forge

requirements:
build:
- ${{ compiler('cxx') }}
- ${{ compiler('c') }}
- ${{ stdlib('c') }}
- ninja
- python
- setuptools
- if: unix
then:
- make
- coreutils
- if: osx
then:
- tapi
- if: build_platform != target_platform
then:
- pkg-config
- cmake
- cython
- if: build_platform != target_platform
then:
- python
- if: build_platform != target_platform
then:
- cross-python_${{ target_platform }}
- if: build_platform != target_platform
then:
- 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.5 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.5 jazzy
- if: osx and x86_64
then:
- __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }}
49 changes: 49 additions & 0 deletions recipes/ros-jazzy-actionlib-msgs/bld_ament_cmake.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
:: Generated by vinca http://github.com/RoboStack/vinca.
:: DO NOT EDIT!
setlocal EnableDelayedExpansion

set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"

:: MSVC is preferred.
set CC=cl.exe
set CXX=cl.exe

rd /s /q build
mkdir build
pushd build

:: set "CMAKE_GENERATOR=Ninja"

:: try to fix long paths issues by using default generator
set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"

:: PYTHON_INSTALL_DIR should be a relative path, see
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
:: python

:: This line is scary, but it basically assigns the output of the command inside (` and `)
:: to the variable specified after DO SET
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']))"`) DO SET PYTHON_INSTALL_DIR=%%i

cmake ^
-G "%CMAKE_GENERATOR%" ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
-DPYTHON_EXECUTABLE=%PYTHON% ^
-DPython_EXECUTABLE=%PYTHON% ^
-DPython3_EXECUTABLE=%PYTHON% ^
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
-DBUILD_SHARED_LIBS=ON ^
-DBUILD_TESTING=OFF ^
-DCMAKE_OBJECT_PATH_MAX=255 ^
--compile-no-warning-as-error ^
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
%SRC_DIR%\%PKG_NAME%\src\work
if errorlevel 1 exit 1

cmake --build . --config Release --target install
if errorlevel 1 exit 1
76 changes: 76 additions & 0 deletions recipes/ros-jazzy-actionlib-msgs/build_ament_cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Generated by vinca http://github.com/RoboStack/vinca.
# DO NOT EDIT!

rm -rf build
mkdir build
cd build

# necessary for correctly linking SIP files (from python_qt_bindings)
export LINK=$CXX

if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then
PYTHON_EXECUTABLE=$PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="10.15"
else
PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="11.0"
fi

echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}"
echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}"

export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"`
echo "Using Python ${ROS_PYTHON_VERSION}"

# see https://github.com/conda-forge/cross-python-feedstock/issues/24
if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then
find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true
fi

if [[ $target_platform =~ linux.* ]]; then
export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1"
export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1"
fi;

# Needed for qt-gui-cpp ..
if [[ $target_platform =~ linux.* ]]; then
ln -s $GCC ${BUILD_PREFIX}/bin/gcc
ln -s $GXX ${BUILD_PREFIX}/bin/g++
fi;

# PYTHON_INSTALL_DIR should be a relative path, see
# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX,
# but it is not trivial to do this in bash scripting, so let's do it via python
export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"`
echo "Using site_packages: $PYTHON_INSTALL_DIR"

cmake \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DAMENT_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_FIND_STRATEGY=LOCATION \
-DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \
-DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DCATKIN_SKIP_TESTING=$SKIP_TESTING \
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \
--compile-no-warning-as-error \
$SRC_DIR/$PKG_NAME/src/work

cmake --build . --config Release --target install
90 changes: 90 additions & 0 deletions recipes/ros-jazzy-actionlib-msgs/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# 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
rev: release/jazzy/actionlib_msgs/5.3.5-1
target_directory: ros-jazzy-actionlib-msgs/src/work

build:
script: ${{ 'build_ament_cmake.sh' if unix else 'bld_ament_cmake.bat' }}
number: 0
post_process:
- files:
- '*.pc'
regex: (?:-L|-I)?"?([^;\s]+/sysroot/)
replacement: $(CONDA_BUILD_SYSROOT_S)
- files:
- '*.cmake'
regex: ([^;\s"]+/sysroot)
replacement: $ENV{CONDA_BUILD_SYSROOT}
- files:
- '*.cmake'
regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk)
replacement: $ENV{CONDA_BUILD_SYSROOT}
about:
homepage: https://www.ros.org/
license: BSD-3-Clause
summary: |
Robot Operating System
extra:
recipe-maintainers:
- ros-forge

requirements:
build:
- ${{ compiler('cxx') }}
- ${{ compiler('c') }}
- ${{ stdlib('c') }}
- ninja
- python
- setuptools
- if: unix
then:
- make
- coreutils
- if: osx
then:
- tapi
- if: build_platform != target_platform
then:
- pkg-config
- cmake
- cython
- if: build_platform != target_platform
then:
- python
- if: build_platform != target_platform
then:
- cross-python_${{ target_platform }}
- if: build_platform != target_platform
then:
- 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.5 jazzy
run:
- python
- ros-jazzy-builtin-interfaces
- ros-jazzy-ros-workspace
- ros-jazzy-rosidl-default-runtime
- ros-jazzy-std-msgs
- ros2-distro-mutex 0.5 jazzy
- if: osx and x86_64
then:
- __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }}
25 changes: 25 additions & 0 deletions recipes/ros-jazzy-ament-clang-format/bld_ament_python.bat
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions recipes/ros-jazzy-ament-clang-format/build_ament_python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by vinca http://github.com/RoboStack/vinca.
# DO NOT EDIT!

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
89 changes: 89 additions & 0 deletions recipes/ros-jazzy-ament-clang-format/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# 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
rev: release/jazzy/ament_clang_format/0.17.1-1
target_directory: ros-jazzy-ament-clang-format/src/work

build:
script: ${{ 'build_ament_python.sh' if unix else 'bld_ament_python.bat' }}
number: 0
post_process:
- files:
- '*.pc'
regex: (?:-L|-I)?"?([^;\s]+/sysroot/)
replacement: $(CONDA_BUILD_SYSROOT_S)
- files:
- '*.cmake'
regex: ([^;\s"]+/sysroot)
replacement: $ENV{CONDA_BUILD_SYSROOT}
- files:
- '*.cmake'
regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk)
replacement: $ENV{CONDA_BUILD_SYSROOT}
about:
homepage: https://www.ros.org/
license: BSD-3-Clause
summary: |
Robot Operating System
extra:
recipe-maintainers:
- ros-forge

requirements:
build:
- ${{ compiler('cxx') }}
- ${{ compiler('c') }}
- ${{ stdlib('c') }}
- ninja
- python
- setuptools
- if: unix
then:
- make
- coreutils
- if: osx
then:
- tapi
- if: build_platform != target_platform
then:
- pkg-config
- cmake
- cython
- if: build_platform != target_platform
then:
- python
- if: build_platform != target_platform
then:
- cross-python_${{ target_platform }}
- if: build_platform != target_platform
then:
- 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.5 jazzy
- setuptools
run:
- clang-format
- python
- pyyaml
- ros-jazzy-ros-workspace
- ros2-distro-mutex 0.5 jazzy
- if: osx and x86_64
then:
- __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }}
49 changes: 49 additions & 0 deletions recipes/ros-jazzy-ament-cmake-auto/bld_ament_cmake.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
:: Generated by vinca http://github.com/RoboStack/vinca.
:: DO NOT EDIT!
setlocal EnableDelayedExpansion

set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"

:: MSVC is preferred.
set CC=cl.exe
set CXX=cl.exe

rd /s /q build
mkdir build
pushd build

:: set "CMAKE_GENERATOR=Ninja"

:: try to fix long paths issues by using default generator
set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"

:: PYTHON_INSTALL_DIR should be a relative path, see
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
:: python

:: This line is scary, but it basically assigns the output of the command inside (` and `)
:: to the variable specified after DO SET
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']))"`) DO SET PYTHON_INSTALL_DIR=%%i

cmake ^
-G "%CMAKE_GENERATOR%" ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
-DPYTHON_EXECUTABLE=%PYTHON% ^
-DPython_EXECUTABLE=%PYTHON% ^
-DPython3_EXECUTABLE=%PYTHON% ^
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
-DBUILD_SHARED_LIBS=ON ^
-DBUILD_TESTING=OFF ^
-DCMAKE_OBJECT_PATH_MAX=255 ^
--compile-no-warning-as-error ^
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
%SRC_DIR%\%PKG_NAME%\src\work
if errorlevel 1 exit 1

cmake --build . --config Release --target install
if errorlevel 1 exit 1
76 changes: 76 additions & 0 deletions recipes/ros-jazzy-ament-cmake-auto/build_ament_cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Generated by vinca http://github.com/RoboStack/vinca.
# DO NOT EDIT!

rm -rf build
mkdir build
cd build

# necessary for correctly linking SIP files (from python_qt_bindings)
export LINK=$CXX

if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then
PYTHON_EXECUTABLE=$PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="10.15"
else
PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="11.0"
fi

echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}"
echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}"

export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"`
echo "Using Python ${ROS_PYTHON_VERSION}"

# see https://github.com/conda-forge/cross-python-feedstock/issues/24
if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then
find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true
fi

if [[ $target_platform =~ linux.* ]]; then
export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1"
export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1"
fi;

# Needed for qt-gui-cpp ..
if [[ $target_platform =~ linux.* ]]; then
ln -s $GCC ${BUILD_PREFIX}/bin/gcc
ln -s $GXX ${BUILD_PREFIX}/bin/g++
fi;

# PYTHON_INSTALL_DIR should be a relative path, see
# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX,
# but it is not trivial to do this in bash scripting, so let's do it via python
export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"`
echo "Using site_packages: $PYTHON_INSTALL_DIR"

cmake \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DAMENT_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_FIND_STRATEGY=LOCATION \
-DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \
-DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DCATKIN_SKIP_TESTING=$SKIP_TESTING \
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \
--compile-no-warning-as-error \
$SRC_DIR/$PKG_NAME/src/work

cmake --build . --config Release --target install
88 changes: 88 additions & 0 deletions recipes/ros-jazzy-ament-cmake-auto/recipe.yaml
Original file line number Diff line number Diff line change
@@ -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-auto
version: 2.5.2
source:
git: https://github.com/ros2-gbp/ament_cmake-release.git
rev: release/jazzy/ament_cmake_auto/2.5.2-1
target_directory: ros-jazzy-ament-cmake-auto/src/work

build:
script: ${{ 'build_ament_cmake.sh' if unix else 'bld_ament_cmake.bat' }}
number: 0
post_process:
- files:
- '*.pc'
regex: (?:-L|-I)?"?([^;\s]+/sysroot/)
replacement: $(CONDA_BUILD_SYSROOT_S)
- files:
- '*.cmake'
regex: ([^;\s"]+/sysroot)
replacement: $ENV{CONDA_BUILD_SYSROOT}
- files:
- '*.cmake'
regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk)
replacement: $ENV{CONDA_BUILD_SYSROOT}
about:
homepage: https://www.ros.org/
license: BSD-3-Clause
summary: |
Robot Operating System
extra:
recipe-maintainers:
- ros-forge

requirements:
build:
- ${{ compiler('cxx') }}
- ${{ compiler('c') }}
- ${{ stdlib('c') }}
- ninja
- python
- setuptools
- if: unix
then:
- make
- coreutils
- if: osx
then:
- tapi
- if: build_platform != target_platform
then:
- pkg-config
- cmake
- cython
- if: build_platform != target_platform
then:
- python
- if: build_platform != target_platform
then:
- cross-python_${{ target_platform }}
- if: build_platform != target_platform
then:
- 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.5 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.5 jazzy
- if: osx and x86_64
then:
- __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }}
49 changes: 49 additions & 0 deletions recipes/ros-jazzy-ament-cmake-clang-format/bld_ament_cmake.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
:: Generated by vinca http://github.com/RoboStack/vinca.
:: DO NOT EDIT!
setlocal EnableDelayedExpansion

set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"

:: MSVC is preferred.
set CC=cl.exe
set CXX=cl.exe

rd /s /q build
mkdir build
pushd build

:: set "CMAKE_GENERATOR=Ninja"

:: try to fix long paths issues by using default generator
set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"

:: PYTHON_INSTALL_DIR should be a relative path, see
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
:: python

:: This line is scary, but it basically assigns the output of the command inside (` and `)
:: to the variable specified after DO SET
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']))"`) DO SET PYTHON_INSTALL_DIR=%%i

cmake ^
-G "%CMAKE_GENERATOR%" ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
-DPYTHON_EXECUTABLE=%PYTHON% ^
-DPython_EXECUTABLE=%PYTHON% ^
-DPython3_EXECUTABLE=%PYTHON% ^
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
-DBUILD_SHARED_LIBS=ON ^
-DBUILD_TESTING=OFF ^
-DCMAKE_OBJECT_PATH_MAX=255 ^
--compile-no-warning-as-error ^
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
%SRC_DIR%\%PKG_NAME%\src\work
if errorlevel 1 exit 1

cmake --build . --config Release --target install
if errorlevel 1 exit 1
76 changes: 76 additions & 0 deletions recipes/ros-jazzy-ament-cmake-clang-format/build_ament_cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Generated by vinca http://github.com/RoboStack/vinca.
# DO NOT EDIT!

rm -rf build
mkdir build
cd build

# necessary for correctly linking SIP files (from python_qt_bindings)
export LINK=$CXX

if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then
PYTHON_EXECUTABLE=$PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="10.15"
else
PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="11.0"
fi

echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}"
echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}"

export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"`
echo "Using Python ${ROS_PYTHON_VERSION}"

# see https://github.com/conda-forge/cross-python-feedstock/issues/24
if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then
find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true
fi

if [[ $target_platform =~ linux.* ]]; then
export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1"
export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1"
fi;

# Needed for qt-gui-cpp ..
if [[ $target_platform =~ linux.* ]]; then
ln -s $GCC ${BUILD_PREFIX}/bin/gcc
ln -s $GXX ${BUILD_PREFIX}/bin/g++
fi;

# PYTHON_INSTALL_DIR should be a relative path, see
# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX,
# but it is not trivial to do this in bash scripting, so let's do it via python
export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"`
echo "Using site_packages: $PYTHON_INSTALL_DIR"

cmake \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DAMENT_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_FIND_STRATEGY=LOCATION \
-DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \
-DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DCATKIN_SKIP_TESTING=$SKIP_TESTING \
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \
--compile-no-warning-as-error \
$SRC_DIR/$PKG_NAME/src/work

cmake --build . --config Release --target install
89 changes: 89 additions & 0 deletions recipes/ros-jazzy-ament-cmake-clang-format/recipe.yaml
Original file line number Diff line number Diff line change
@@ -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-clang-format
version: 0.17.1
source:
git: https://github.com/ros2-gbp/ament_lint-release.git
rev: release/jazzy/ament_cmake_clang_format/0.17.1-1
target_directory: ros-jazzy-ament-cmake-clang-format/src/work

build:
script: ${{ 'build_ament_cmake.sh' if unix else 'bld_ament_cmake.bat' }}
number: 0
post_process:
- files:
- '*.pc'
regex: (?:-L|-I)?"?([^;\s]+/sysroot/)
replacement: $(CONDA_BUILD_SYSROOT_S)
- files:
- '*.cmake'
regex: ([^;\s"]+/sysroot)
replacement: $ENV{CONDA_BUILD_SYSROOT}
- files:
- '*.cmake'
regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk)
replacement: $ENV{CONDA_BUILD_SYSROOT}
about:
homepage: https://www.ros.org/
license: BSD-3-Clause
summary: |
Robot Operating System
extra:
recipe-maintainers:
- ros-forge

requirements:
build:
- ${{ compiler('cxx') }}
- ${{ compiler('c') }}
- ${{ stdlib('c') }}
- ninja
- python
- setuptools
- if: unix
then:
- make
- coreutils
- if: osx
then:
- tapi
- if: build_platform != target_platform
then:
- pkg-config
- cmake
- cython
- if: build_platform != target_platform
then:
- python
- if: build_platform != target_platform
then:
- cross-python_${{ target_platform }}
- if: build_platform != target_platform
then:
- 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.5 jazzy
run:
- python
- ros-jazzy-ament-clang-format
- ros-jazzy-ament-cmake-test
- ros-jazzy-ros-workspace
- ros2-distro-mutex 0.5 jazzy
- if: osx and x86_64
then:
- __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }}
49 changes: 49 additions & 0 deletions recipes/ros-jazzy-ament-cmake-copyright/bld_ament_cmake.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
:: Generated by vinca http://github.com/RoboStack/vinca.
:: DO NOT EDIT!
setlocal EnableDelayedExpansion

set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"

:: MSVC is preferred.
set CC=cl.exe
set CXX=cl.exe

rd /s /q build
mkdir build
pushd build

:: set "CMAKE_GENERATOR=Ninja"

:: try to fix long paths issues by using default generator
set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"

:: PYTHON_INSTALL_DIR should be a relative path, see
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
:: python

:: This line is scary, but it basically assigns the output of the command inside (` and `)
:: to the variable specified after DO SET
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']))"`) DO SET PYTHON_INSTALL_DIR=%%i

cmake ^
-G "%CMAKE_GENERATOR%" ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
-DPYTHON_EXECUTABLE=%PYTHON% ^
-DPython_EXECUTABLE=%PYTHON% ^
-DPython3_EXECUTABLE=%PYTHON% ^
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
-DBUILD_SHARED_LIBS=ON ^
-DBUILD_TESTING=OFF ^
-DCMAKE_OBJECT_PATH_MAX=255 ^
--compile-no-warning-as-error ^
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
%SRC_DIR%\%PKG_NAME%\src\work
if errorlevel 1 exit 1

cmake --build . --config Release --target install
if errorlevel 1 exit 1
76 changes: 76 additions & 0 deletions recipes/ros-jazzy-ament-cmake-copyright/build_ament_cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Generated by vinca http://github.com/RoboStack/vinca.
# DO NOT EDIT!

rm -rf build
mkdir build
cd build

# necessary for correctly linking SIP files (from python_qt_bindings)
export LINK=$CXX

if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then
PYTHON_EXECUTABLE=$PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="10.15"
else
PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="11.0"
fi

echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}"
echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}"

export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"`
echo "Using Python ${ROS_PYTHON_VERSION}"

# see https://github.com/conda-forge/cross-python-feedstock/issues/24
if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then
find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true
fi

if [[ $target_platform =~ linux.* ]]; then
export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1"
export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1"
fi;

# Needed for qt-gui-cpp ..
if [[ $target_platform =~ linux.* ]]; then
ln -s $GCC ${BUILD_PREFIX}/bin/gcc
ln -s $GXX ${BUILD_PREFIX}/bin/g++
fi;

# PYTHON_INSTALL_DIR should be a relative path, see
# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX,
# but it is not trivial to do this in bash scripting, so let's do it via python
export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"`
echo "Using site_packages: $PYTHON_INSTALL_DIR"

cmake \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DAMENT_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_FIND_STRATEGY=LOCATION \
-DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \
-DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DCATKIN_SKIP_TESTING=$SKIP_TESTING \
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \
--compile-no-warning-as-error \
$SRC_DIR/$PKG_NAME/src/work

cmake --build . --config Release --target install
88 changes: 88 additions & 0 deletions recipes/ros-jazzy-ament-cmake-copyright/recipe.yaml
Original file line number Diff line number Diff line change
@@ -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-copyright
version: 0.17.1
source:
git: https://github.com/ros2-gbp/ament_lint-release.git
rev: release/jazzy/ament_cmake_copyright/0.17.1-1
target_directory: ros-jazzy-ament-cmake-copyright/src/work

build:
script: ${{ 'build_ament_cmake.sh' if unix else 'bld_ament_cmake.bat' }}
number: 0
post_process:
- files:
- '*.pc'
regex: (?:-L|-I)?"?([^;\s]+/sysroot/)
replacement: $(CONDA_BUILD_SYSROOT_S)
- files:
- '*.cmake'
regex: ([^;\s"]+/sysroot)
replacement: $ENV{CONDA_BUILD_SYSROOT}
- files:
- '*.cmake'
regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk)
replacement: $ENV{CONDA_BUILD_SYSROOT}
about:
homepage: https://www.ros.org/
license: BSD-3-Clause
summary: |
Robot Operating System
extra:
recipe-maintainers:
- ros-forge

requirements:
build:
- ${{ compiler('cxx') }}
- ${{ compiler('c') }}
- ${{ stdlib('c') }}
- ninja
- python
- setuptools
- if: unix
then:
- make
- coreutils
- if: osx
then:
- tapi
- if: build_platform != target_platform
then:
- pkg-config
- cmake
- cython
- if: build_platform != target_platform
then:
- python
- if: build_platform != target_platform
then:
- cross-python_${{ target_platform }}
- if: build_platform != target_platform
then:
- 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.5 jazzy
run:
- python
- ros-jazzy-ament-cmake-test
- ros-jazzy-ament-copyright
- ros-jazzy-ros-workspace
- ros2-distro-mutex 0.5 jazzy
- if: osx and x86_64
then:
- __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }}
49 changes: 49 additions & 0 deletions recipes/ros-jazzy-ament-cmake-core/bld_ament_cmake.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
:: Generated by vinca http://github.com/RoboStack/vinca.
:: DO NOT EDIT!
setlocal EnableDelayedExpansion

set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"

:: MSVC is preferred.
set CC=cl.exe
set CXX=cl.exe

rd /s /q build
mkdir build
pushd build

:: set "CMAKE_GENERATOR=Ninja"

:: try to fix long paths issues by using default generator
set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"

:: PYTHON_INSTALL_DIR should be a relative path, see
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
:: python

:: This line is scary, but it basically assigns the output of the command inside (` and `)
:: to the variable specified after DO SET
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']))"`) DO SET PYTHON_INSTALL_DIR=%%i

cmake ^
-G "%CMAKE_GENERATOR%" ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
-DPYTHON_EXECUTABLE=%PYTHON% ^
-DPython_EXECUTABLE=%PYTHON% ^
-DPython3_EXECUTABLE=%PYTHON% ^
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
-DBUILD_SHARED_LIBS=ON ^
-DBUILD_TESTING=OFF ^
-DCMAKE_OBJECT_PATH_MAX=255 ^
--compile-no-warning-as-error ^
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
%SRC_DIR%\%PKG_NAME%\src\work
if errorlevel 1 exit 1

cmake --build . --config Release --target install
if errorlevel 1 exit 1
76 changes: 76 additions & 0 deletions recipes/ros-jazzy-ament-cmake-core/build_ament_cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Generated by vinca http://github.com/RoboStack/vinca.
# DO NOT EDIT!

rm -rf build
mkdir build
cd build

# necessary for correctly linking SIP files (from python_qt_bindings)
export LINK=$CXX

if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then
PYTHON_EXECUTABLE=$PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="10.15"
else
PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="11.0"
fi

echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}"
echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}"

export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"`
echo "Using Python ${ROS_PYTHON_VERSION}"

# see https://github.com/conda-forge/cross-python-feedstock/issues/24
if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then
find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true
fi

if [[ $target_platform =~ linux.* ]]; then
export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1"
export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1"
fi;

# Needed for qt-gui-cpp ..
if [[ $target_platform =~ linux.* ]]; then
ln -s $GCC ${BUILD_PREFIX}/bin/gcc
ln -s $GXX ${BUILD_PREFIX}/bin/g++
fi;

# PYTHON_INSTALL_DIR should be a relative path, see
# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX,
# but it is not trivial to do this in bash scripting, so let's do it via python
export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"`
echo "Using site_packages: $PYTHON_INSTALL_DIR"

cmake \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DAMENT_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_FIND_STRATEGY=LOCATION \
-DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \
-DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DCATKIN_SKIP_TESTING=$SKIP_TESTING \
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \
--compile-no-warning-as-error \
$SRC_DIR/$PKG_NAME/src/work

cmake --build . --config Release --target install
84 changes: 84 additions & 0 deletions recipes/ros-jazzy-ament-cmake-core/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# 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.2
source:
git: https://github.com/ros2-gbp/ament_cmake-release.git
rev: release/jazzy/ament_cmake_core/2.5.2-1
target_directory: ros-jazzy-ament-cmake-core/src/work

build:
script: ${{ 'build_ament_cmake.sh' if unix else 'bld_ament_cmake.bat' }}
number: 0
post_process:
- files:
- '*.pc'
regex: (?:-L|-I)?"?([^;\s]+/sysroot/)
replacement: $(CONDA_BUILD_SYSROOT_S)
- files:
- '*.cmake'
regex: ([^;\s"]+/sysroot)
replacement: $ENV{CONDA_BUILD_SYSROOT}
- files:
- '*.cmake'
regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk)
replacement: $ENV{CONDA_BUILD_SYSROOT}
about:
homepage: https://www.ros.org/
license: BSD-3-Clause
summary: |
Robot Operating System
extra:
recipe-maintainers:
- ros-forge

requirements:
build:
- ${{ compiler('cxx') }}
- ${{ compiler('c') }}
- ${{ stdlib('c') }}
- ninja
- python
- setuptools
- if: unix
then:
- make
- coreutils
- if: osx
then:
- tapi
- if: build_platform != target_platform
then:
- pkg-config
- cmake
- cython
- if: build_platform != target_platform
then:
- python
- if: build_platform != target_platform
then:
- cross-python_${{ target_platform }}
- if: build_platform != target_platform
then:
- numpy
host:
- if: build_platform == target_platform
then:
- pkg-config
- catkin_pkg
- numpy
- pip
- python
- ros-jazzy-ament-package
- ros2-distro-mutex 0.5 jazzy
run:
- catkin_pkg
- cmake
- python
- ros-jazzy-ament-package
- ros2-distro-mutex 0.5 jazzy
- if: osx and x86_64
then:
- __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }}
49 changes: 49 additions & 0 deletions recipes/ros-jazzy-ament-cmake-cppcheck/bld_ament_cmake.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
:: Generated by vinca http://github.com/RoboStack/vinca.
:: DO NOT EDIT!
setlocal EnableDelayedExpansion

set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"

:: MSVC is preferred.
set CC=cl.exe
set CXX=cl.exe

rd /s /q build
mkdir build
pushd build

:: set "CMAKE_GENERATOR=Ninja"

:: try to fix long paths issues by using default generator
set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"

:: PYTHON_INSTALL_DIR should be a relative path, see
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
:: python

:: This line is scary, but it basically assigns the output of the command inside (` and `)
:: to the variable specified after DO SET
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']))"`) DO SET PYTHON_INSTALL_DIR=%%i

cmake ^
-G "%CMAKE_GENERATOR%" ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
-DPYTHON_EXECUTABLE=%PYTHON% ^
-DPython_EXECUTABLE=%PYTHON% ^
-DPython3_EXECUTABLE=%PYTHON% ^
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
-DBUILD_SHARED_LIBS=ON ^
-DBUILD_TESTING=OFF ^
-DCMAKE_OBJECT_PATH_MAX=255 ^
--compile-no-warning-as-error ^
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
%SRC_DIR%\%PKG_NAME%\src\work
if errorlevel 1 exit 1

cmake --build . --config Release --target install
if errorlevel 1 exit 1
76 changes: 76 additions & 0 deletions recipes/ros-jazzy-ament-cmake-cppcheck/build_ament_cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Generated by vinca http://github.com/RoboStack/vinca.
# DO NOT EDIT!

rm -rf build
mkdir build
cd build

# necessary for correctly linking SIP files (from python_qt_bindings)
export LINK=$CXX

if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then
PYTHON_EXECUTABLE=$PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="10.15"
else
PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="11.0"
fi

echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}"
echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}"

export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"`
echo "Using Python ${ROS_PYTHON_VERSION}"

# see https://github.com/conda-forge/cross-python-feedstock/issues/24
if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then
find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true
fi

if [[ $target_platform =~ linux.* ]]; then
export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1"
export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1"
fi;

# Needed for qt-gui-cpp ..
if [[ $target_platform =~ linux.* ]]; then
ln -s $GCC ${BUILD_PREFIX}/bin/gcc
ln -s $GXX ${BUILD_PREFIX}/bin/g++
fi;

# PYTHON_INSTALL_DIR should be a relative path, see
# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX,
# but it is not trivial to do this in bash scripting, so let's do it via python
export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"`
echo "Using site_packages: $PYTHON_INSTALL_DIR"

cmake \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DAMENT_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_FIND_STRATEGY=LOCATION \
-DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \
-DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DCATKIN_SKIP_TESTING=$SKIP_TESTING \
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \
--compile-no-warning-as-error \
$SRC_DIR/$PKG_NAME/src/work

cmake --build . --config Release --target install
90 changes: 90 additions & 0 deletions recipes/ros-jazzy-ament-cmake-cppcheck/recipe.yaml
Original file line number Diff line number Diff line change
@@ -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-cppcheck
version: 0.17.1
source:
git: https://github.com/ros2-gbp/ament_lint-release.git
rev: release/jazzy/ament_cmake_cppcheck/0.17.1-1
target_directory: ros-jazzy-ament-cmake-cppcheck/src/work

build:
script: ${{ 'build_ament_cmake.sh' if unix else 'bld_ament_cmake.bat' }}
number: 0
post_process:
- files:
- '*.pc'
regex: (?:-L|-I)?"?([^;\s]+/sysroot/)
replacement: $(CONDA_BUILD_SYSROOT_S)
- files:
- '*.cmake'
regex: ([^;\s"]+/sysroot)
replacement: $ENV{CONDA_BUILD_SYSROOT}
- files:
- '*.cmake'
regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk)
replacement: $ENV{CONDA_BUILD_SYSROOT}
about:
homepage: https://www.ros.org/
license: BSD-3-Clause
summary: |
Robot Operating System
extra:
recipe-maintainers:
- ros-forge

requirements:
build:
- ${{ compiler('cxx') }}
- ${{ compiler('c') }}
- ${{ stdlib('c') }}
- ninja
- python
- setuptools
- if: unix
then:
- make
- coreutils
- if: osx
then:
- tapi
- if: build_platform != target_platform
then:
- pkg-config
- cmake
- cython
- if: build_platform != target_platform
then:
- python
- if: build_platform != target_platform
then:
- cross-python_${{ target_platform }}
- if: build_platform != target_platform
then:
- 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.5 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.5 jazzy
- if: osx and x86_64
then:
- __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }}
49 changes: 49 additions & 0 deletions recipes/ros-jazzy-ament-cmake-cpplint/bld_ament_cmake.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
:: Generated by vinca http://github.com/RoboStack/vinca.
:: DO NOT EDIT!
setlocal EnableDelayedExpansion

set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"

:: MSVC is preferred.
set CC=cl.exe
set CXX=cl.exe

rd /s /q build
mkdir build
pushd build

:: set "CMAKE_GENERATOR=Ninja"

:: try to fix long paths issues by using default generator
set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"

:: PYTHON_INSTALL_DIR should be a relative path, see
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
:: python

:: This line is scary, but it basically assigns the output of the command inside (` and `)
:: to the variable specified after DO SET
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']))"`) DO SET PYTHON_INSTALL_DIR=%%i

cmake ^
-G "%CMAKE_GENERATOR%" ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
-DPYTHON_EXECUTABLE=%PYTHON% ^
-DPython_EXECUTABLE=%PYTHON% ^
-DPython3_EXECUTABLE=%PYTHON% ^
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
-DBUILD_SHARED_LIBS=ON ^
-DBUILD_TESTING=OFF ^
-DCMAKE_OBJECT_PATH_MAX=255 ^
--compile-no-warning-as-error ^
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
%SRC_DIR%\%PKG_NAME%\src\work
if errorlevel 1 exit 1

cmake --build . --config Release --target install
if errorlevel 1 exit 1
76 changes: 76 additions & 0 deletions recipes/ros-jazzy-ament-cmake-cpplint/build_ament_cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Generated by vinca http://github.com/RoboStack/vinca.
# DO NOT EDIT!

rm -rf build
mkdir build
cd build

# necessary for correctly linking SIP files (from python_qt_bindings)
export LINK=$CXX

if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then
PYTHON_EXECUTABLE=$PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="10.15"
else
PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="11.0"
fi

echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}"
echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}"

export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"`
echo "Using Python ${ROS_PYTHON_VERSION}"

# see https://github.com/conda-forge/cross-python-feedstock/issues/24
if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then
find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true
fi

if [[ $target_platform =~ linux.* ]]; then
export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1"
export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1"
fi;

# Needed for qt-gui-cpp ..
if [[ $target_platform =~ linux.* ]]; then
ln -s $GCC ${BUILD_PREFIX}/bin/gcc
ln -s $GXX ${BUILD_PREFIX}/bin/g++
fi;

# PYTHON_INSTALL_DIR should be a relative path, see
# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX,
# but it is not trivial to do this in bash scripting, so let's do it via python
export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"`
echo "Using site_packages: $PYTHON_INSTALL_DIR"

cmake \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DAMENT_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_FIND_STRATEGY=LOCATION \
-DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \
-DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DCATKIN_SKIP_TESTING=$SKIP_TESTING \
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \
--compile-no-warning-as-error \
$SRC_DIR/$PKG_NAME/src/work

cmake --build . --config Release --target install
89 changes: 89 additions & 0 deletions recipes/ros-jazzy-ament-cmake-cpplint/recipe.yaml
Original file line number Diff line number Diff line change
@@ -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-cpplint
version: 0.17.1
source:
git: https://github.com/ros2-gbp/ament_lint-release.git
rev: release/jazzy/ament_cmake_cpplint/0.17.1-1
target_directory: ros-jazzy-ament-cmake-cpplint/src/work

build:
script: ${{ 'build_ament_cmake.sh' if unix else 'bld_ament_cmake.bat' }}
number: 0
post_process:
- files:
- '*.pc'
regex: (?:-L|-I)?"?([^;\s]+/sysroot/)
replacement: $(CONDA_BUILD_SYSROOT_S)
- files:
- '*.cmake'
regex: ([^;\s"]+/sysroot)
replacement: $ENV{CONDA_BUILD_SYSROOT}
- files:
- '*.cmake'
regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk)
replacement: $ENV{CONDA_BUILD_SYSROOT}
about:
homepage: https://www.ros.org/
license: BSD-3-Clause
summary: |
Robot Operating System
extra:
recipe-maintainers:
- ros-forge

requirements:
build:
- ${{ compiler('cxx') }}
- ${{ compiler('c') }}
- ${{ stdlib('c') }}
- ninja
- python
- setuptools
- if: unix
then:
- make
- coreutils
- if: osx
then:
- tapi
- if: build_platform != target_platform
then:
- pkg-config
- cmake
- cython
- if: build_platform != target_platform
then:
- python
- if: build_platform != target_platform
then:
- cross-python_${{ target_platform }}
- if: build_platform != target_platform
then:
- 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.5 jazzy
run:
- python
- ros-jazzy-ament-cmake-test
- ros-jazzy-ament-cpplint
- ros-jazzy-ros-workspace
- ros2-distro-mutex 0.5 jazzy
- if: osx and x86_64
then:
- __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
:: Generated by vinca http://github.com/RoboStack/vinca.
:: DO NOT EDIT!
setlocal EnableDelayedExpansion

set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"

:: MSVC is preferred.
set CC=cl.exe
set CXX=cl.exe

rd /s /q build
mkdir build
pushd build

:: set "CMAKE_GENERATOR=Ninja"

:: try to fix long paths issues by using default generator
set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"

:: PYTHON_INSTALL_DIR should be a relative path, see
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
:: python

:: This line is scary, but it basically assigns the output of the command inside (` and `)
:: to the variable specified after DO SET
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']))"`) DO SET PYTHON_INSTALL_DIR=%%i

cmake ^
-G "%CMAKE_GENERATOR%" ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
-DPYTHON_EXECUTABLE=%PYTHON% ^
-DPython_EXECUTABLE=%PYTHON% ^
-DPython3_EXECUTABLE=%PYTHON% ^
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
-DBUILD_SHARED_LIBS=ON ^
-DBUILD_TESTING=OFF ^
-DCMAKE_OBJECT_PATH_MAX=255 ^
--compile-no-warning-as-error ^
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
%SRC_DIR%\%PKG_NAME%\src\work
if errorlevel 1 exit 1

cmake --build . --config Release --target install
if errorlevel 1 exit 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Generated by vinca http://github.com/RoboStack/vinca.
# DO NOT EDIT!

rm -rf build
mkdir build
cd build

# necessary for correctly linking SIP files (from python_qt_bindings)
export LINK=$CXX

if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then
PYTHON_EXECUTABLE=$PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="10.15"
else
PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="11.0"
fi

echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}"
echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}"

export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"`
echo "Using Python ${ROS_PYTHON_VERSION}"

# see https://github.com/conda-forge/cross-python-feedstock/issues/24
if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then
find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true
fi

if [[ $target_platform =~ linux.* ]]; then
export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1"
export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1"
fi;

# Needed for qt-gui-cpp ..
if [[ $target_platform =~ linux.* ]]; then
ln -s $GCC ${BUILD_PREFIX}/bin/gcc
ln -s $GXX ${BUILD_PREFIX}/bin/g++
fi;

# PYTHON_INSTALL_DIR should be a relative path, see
# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX,
# but it is not trivial to do this in bash scripting, so let's do it via python
export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"`
echo "Using site_packages: $PYTHON_INSTALL_DIR"

cmake \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DAMENT_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_FIND_STRATEGY=LOCATION \
-DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \
-DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DCATKIN_SKIP_TESTING=$SKIP_TESTING \
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \
--compile-no-warning-as-error \
$SRC_DIR/$PKG_NAME/src/work

cmake --build . --config Release --target install
84 changes: 84 additions & 0 deletions recipes/ros-jazzy-ament-cmake-export-definitions/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# 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.2
source:
git: https://github.com/ros2-gbp/ament_cmake-release.git
rev: release/jazzy/ament_cmake_export_definitions/2.5.2-1
target_directory: ros-jazzy-ament-cmake-export-definitions/src/work

build:
script: ${{ 'build_ament_cmake.sh' if unix else 'bld_ament_cmake.bat' }}
number: 0
post_process:
- files:
- '*.pc'
regex: (?:-L|-I)?"?([^;\s]+/sysroot/)
replacement: $(CONDA_BUILD_SYSROOT_S)
- files:
- '*.cmake'
regex: ([^;\s"]+/sysroot)
replacement: $ENV{CONDA_BUILD_SYSROOT}
- files:
- '*.cmake'
regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk)
replacement: $ENV{CONDA_BUILD_SYSROOT}
about:
homepage: https://www.ros.org/
license: BSD-3-Clause
summary: |
Robot Operating System
extra:
recipe-maintainers:
- ros-forge

requirements:
build:
- ${{ compiler('cxx') }}
- ${{ compiler('c') }}
- ${{ stdlib('c') }}
- ninja
- python
- setuptools
- if: unix
then:
- make
- coreutils
- if: osx
then:
- tapi
- if: build_platform != target_platform
then:
- pkg-config
- cmake
- cython
- if: build_platform != target_platform
then:
- python
- if: build_platform != target_platform
then:
- cross-python_${{ target_platform }}
- if: build_platform != target_platform
then:
- 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.5 jazzy
run:
- python
- ros-jazzy-ament-cmake-core
- ros-jazzy-ros-workspace
- ros2-distro-mutex 0.5 jazzy
- if: osx and x86_64
then:
- __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
:: Generated by vinca http://github.com/RoboStack/vinca.
:: DO NOT EDIT!
setlocal EnableDelayedExpansion

set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"

:: MSVC is preferred.
set CC=cl.exe
set CXX=cl.exe

rd /s /q build
mkdir build
pushd build

:: set "CMAKE_GENERATOR=Ninja"

:: try to fix long paths issues by using default generator
set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"

:: PYTHON_INSTALL_DIR should be a relative path, see
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
:: python

:: This line is scary, but it basically assigns the output of the command inside (` and `)
:: to the variable specified after DO SET
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']))"`) DO SET PYTHON_INSTALL_DIR=%%i

cmake ^
-G "%CMAKE_GENERATOR%" ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
-DPYTHON_EXECUTABLE=%PYTHON% ^
-DPython_EXECUTABLE=%PYTHON% ^
-DPython3_EXECUTABLE=%PYTHON% ^
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
-DBUILD_SHARED_LIBS=ON ^
-DBUILD_TESTING=OFF ^
-DCMAKE_OBJECT_PATH_MAX=255 ^
--compile-no-warning-as-error ^
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
%SRC_DIR%\%PKG_NAME%\src\work
if errorlevel 1 exit 1

cmake --build . --config Release --target install
if errorlevel 1 exit 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Generated by vinca http://github.com/RoboStack/vinca.
# DO NOT EDIT!

rm -rf build
mkdir build
cd build

# necessary for correctly linking SIP files (from python_qt_bindings)
export LINK=$CXX

if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then
PYTHON_EXECUTABLE=$PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="10.15"
else
PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="11.0"
fi

echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}"
echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}"

export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"`
echo "Using Python ${ROS_PYTHON_VERSION}"

# see https://github.com/conda-forge/cross-python-feedstock/issues/24
if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then
find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true
fi

if [[ $target_platform =~ linux.* ]]; then
export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1"
export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1"
fi;

# Needed for qt-gui-cpp ..
if [[ $target_platform =~ linux.* ]]; then
ln -s $GCC ${BUILD_PREFIX}/bin/gcc
ln -s $GXX ${BUILD_PREFIX}/bin/g++
fi;

# PYTHON_INSTALL_DIR should be a relative path, see
# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX,
# but it is not trivial to do this in bash scripting, so let's do it via python
export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"`
echo "Using site_packages: $PYTHON_INSTALL_DIR"

cmake \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DAMENT_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_FIND_STRATEGY=LOCATION \
-DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \
-DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DCATKIN_SKIP_TESTING=$SKIP_TESTING \
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \
--compile-no-warning-as-error \
$SRC_DIR/$PKG_NAME/src/work

cmake --build . --config Release --target install
86 changes: 86 additions & 0 deletions recipes/ros-jazzy-ament-cmake-export-dependencies/recipe.yaml
Original file line number Diff line number Diff line change
@@ -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-export-dependencies
version: 2.5.2
source:
git: https://github.com/ros2-gbp/ament_cmake-release.git
rev: release/jazzy/ament_cmake_export_dependencies/2.5.2-1
target_directory: ros-jazzy-ament-cmake-export-dependencies/src/work

build:
script: ${{ 'build_ament_cmake.sh' if unix else 'bld_ament_cmake.bat' }}
number: 0
post_process:
- files:
- '*.pc'
regex: (?:-L|-I)?"?([^;\s]+/sysroot/)
replacement: $(CONDA_BUILD_SYSROOT_S)
- files:
- '*.cmake'
regex: ([^;\s"]+/sysroot)
replacement: $ENV{CONDA_BUILD_SYSROOT}
- files:
- '*.cmake'
regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk)
replacement: $ENV{CONDA_BUILD_SYSROOT}
about:
homepage: https://www.ros.org/
license: BSD-3-Clause
summary: |
Robot Operating System
extra:
recipe-maintainers:
- ros-forge

requirements:
build:
- ${{ compiler('cxx') }}
- ${{ compiler('c') }}
- ${{ stdlib('c') }}
- ninja
- python
- setuptools
- if: unix
then:
- make
- coreutils
- if: osx
then:
- tapi
- if: build_platform != target_platform
then:
- pkg-config
- cmake
- cython
- if: build_platform != target_platform
then:
- python
- if: build_platform != target_platform
then:
- cross-python_${{ target_platform }}
- if: build_platform != target_platform
then:
- 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.5 jazzy
run:
- python
- ros-jazzy-ament-cmake-core
- ros-jazzy-ament-cmake-libraries
- ros-jazzy-ros-workspace
- ros2-distro-mutex 0.5 jazzy
- if: osx and x86_64
then:
- __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
:: Generated by vinca http://github.com/RoboStack/vinca.
:: DO NOT EDIT!
setlocal EnableDelayedExpansion

set "PYTHONPATH=%LIBRARY_PREFIX%\lib\site-packages;%SP_DIR%"

:: MSVC is preferred.
set CC=cl.exe
set CXX=cl.exe

rd /s /q build
mkdir build
pushd build

:: set "CMAKE_GENERATOR=Ninja"

:: try to fix long paths issues by using default generator
set "CMAKE_GENERATOR=Visual Studio %VS_MAJOR% %VS_YEAR%"

:: PYTHON_INSTALL_DIR should be a relative path, see
:: https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
:: So we compute the relative path of %SP_DIR% w.r.t. to LIBRARY_PREFIX,
:: but it is not trivial to do this in Command Prompt scripting, so let's do it via
:: python

:: This line is scary, but it basically assigns the output of the command inside (` and `)
:: to the variable specified after DO SET
:: The equivalent in bash is PYTHON_INSTALL_DIR=`python -c ...`
FOR /F "tokens=* USEBACKQ" %%i IN (`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['LIBRARY_PREFIX']))"`) DO SET PYTHON_INSTALL_DIR=%%i

cmake ^
-G "%CMAKE_GENERATOR%" ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
-DPYTHON_EXECUTABLE=%PYTHON% ^
-DPython_EXECUTABLE=%PYTHON% ^
-DPython3_EXECUTABLE=%PYTHON% ^
-DSETUPTOOLS_DEB_LAYOUT=OFF ^
-DBUILD_SHARED_LIBS=ON ^
-DBUILD_TESTING=OFF ^
-DCMAKE_OBJECT_PATH_MAX=255 ^
--compile-no-warning-as-error ^
-DPYTHON_INSTALL_DIR=%PYTHON_INSTALL_DIR% ^
%SRC_DIR%\%PKG_NAME%\src\work
if errorlevel 1 exit 1

cmake --build . --config Release --target install
if errorlevel 1 exit 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Generated by vinca http://github.com/RoboStack/vinca.
# DO NOT EDIT!

rm -rf build
mkdir build
cd build

# necessary for correctly linking SIP files (from python_qt_bindings)
export LINK=$CXX

if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then
PYTHON_EXECUTABLE=$PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="10.15"
else
PYTHON_EXECUTABLE=$BUILD_PREFIX/bin/python
PKG_CONFIG_EXECUTABLE=$BUILD_PREFIX/bin/pkg-config
OSX_DEPLOYMENT_TARGET="11.0"
fi

echo "USING PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}"
echo "USING PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}"

export ROS_PYTHON_VERSION=`$PYTHON_EXECUTABLE -c "import sys; print('%i.%i' % (sys.version_info[0:2]))"`
echo "Using Python ${ROS_PYTHON_VERSION}"

# see https://github.com/conda-forge/cross-python-feedstock/issues/24
if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then
find $PREFIX/lib/cmake -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~$PREFIX/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/share/rosidl* -type f -exec sed -i "s~\${_IMPORT_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~${BUILD_PREFIX}/lib/python${ROS_PYTHON_VERSION}/site-packages~g" {} + || true
find $PREFIX/lib/cmake -type f -exec sed -i "s~message(FATAL_ERROR \"The imported target~message(WARNING \"The imported target~g" {} + || true
fi

if [[ $target_platform =~ linux.* ]]; then
export CFLAGS="${CFLAGS} -D__STDC_FORMAT_MACROS=1"
export CXXFLAGS="${CXXFLAGS} -D__STDC_FORMAT_MACROS=1"
fi;

# Needed for qt-gui-cpp ..
if [[ $target_platform =~ linux.* ]]; then
ln -s $GCC ${BUILD_PREFIX}/bin/gcc
ln -s $GXX ${BUILD_PREFIX}/bin/g++
fi;

# PYTHON_INSTALL_DIR should be a relative path, see
# https://github.com/ament/ament_cmake/blob/2.3.2/ament_cmake_python/README.md
# So we compute the relative path of $SP_DIR w.r.t. to $PREFIX,
# but it is not trivial to do this in bash scripting, so let's do it via python
export PYTHON_INSTALL_DIR=`python -c "import os;print(os.path.relpath(os.environ['SP_DIR'],os.environ['PREFIX']))"`
echo "Using site_packages: $PYTHON_INSTALL_DIR"

cmake \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DAMENT_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_EXECUTABLE=$PYTHON_EXECUTABLE \
-DPython3_FIND_STRATEGY=LOCATION \
-DPKG_CONFIG_EXECUTABLE=$PKG_CONFIG_EXECUTABLE \
-DPYTHON_INSTALL_DIR=$PYTHON_INSTALL_DIR \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DCATKIN_SKIP_TESTING=$SKIP_TESTING \
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$OSX_DEPLOYMENT_TARGET \
--compile-no-warning-as-error \
$SRC_DIR/$PKG_NAME/src/work

cmake --build . --config Release --target install
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# 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.2
source:
git: https://github.com/ros2-gbp/ament_cmake-release.git
rev: release/jazzy/ament_cmake_export_include_directories/2.5.2-1
target_directory: ros-jazzy-ament-cmake-export-include-directories/src/work

build:
script: ${{ 'build_ament_cmake.sh' if unix else 'bld_ament_cmake.bat' }}
number: 0
post_process:
- files:
- '*.pc'
regex: (?:-L|-I)?"?([^;\s]+/sysroot/)
replacement: $(CONDA_BUILD_SYSROOT_S)
- files:
- '*.cmake'
regex: ([^;\s"]+/sysroot)
replacement: $ENV{CONDA_BUILD_SYSROOT}
- files:
- '*.cmake'
regex: ([^;\s"]+/MacOSX\d*\.?\d*\.sdk)
replacement: $ENV{CONDA_BUILD_SYSROOT}
about:
homepage: https://www.ros.org/
license: BSD-3-Clause
summary: |
Robot Operating System
extra:
recipe-maintainers:
- ros-forge

requirements:
build:
- ${{ compiler('cxx') }}
- ${{ compiler('c') }}
- ${{ stdlib('c') }}
- ninja
- python
- setuptools
- if: unix
then:
- make
- coreutils
- if: osx
then:
- tapi
- if: build_platform != target_platform
then:
- pkg-config
- cmake
- cython
- if: build_platform != target_platform
then:
- python
- if: build_platform != target_platform
then:
- cross-python_${{ target_platform }}
- if: build_platform != target_platform
then:
- 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.5 jazzy
run:
- python
- ros-jazzy-ament-cmake-core
- ros-jazzy-ros-workspace
- ros2-distro-mutex 0.5 jazzy
- if: osx and x86_64
then:
- __osx >=${{ MACOSX_DEPLOYMENT_TARGET|default('10.14') }}
Loading

0 comments on commit 819de8c

Please sign in to comment.