diff options
author | Mohammad Farzan | 2021-04-06 02:11:53 +0430 |
---|---|---|
committer | Mohammad Farzan | 2021-04-06 02:11:53 +0430 |
commit | 092fe1e11bc7cd10e670991bcc592a5620decec6 (patch) | |
tree | c6e7f9114c64dd01a3a5381152a0aa5f5756949e | |
download | aur-092fe1e11bc7cd10e670991bcc592a5620decec6.tar.gz |
First commit (Release 2020.12.11)
Signed-off-by: Mohammad Farzan <m2_farzan@yahoo.com>
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 60 | ||||
-rw-r--r-- | mimick_vendor.patch | 3 | ||||
-rw-r--r-- | ros2-foxy.install | 26 | ||||
-rw-r--r-- | yaml_cpp_vendor.patch | 6 |
6 files changed, 116 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4706e1dfe425 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = ros2-foxy + pkgdesc = A set of software libraries and tools for building robot applications + pkgver = 2020.12.11 + pkgrel = 1 + url = https://docs.ros.org/en/foxy/ + install = ros2-foxy.install + arch = any + license = Apache + depends = ros2-arch-deps + depends = gmock + depends = sip4 + source = ros2::git+https://github.com/ros2/ros2#tag=release-foxy-20201211 + source = mimick_vendor.patch + source = yaml_cpp_vendor.patch + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + +pkgname = ros2-foxy + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..72e8ffc0db8a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e528abf26ccd --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,60 @@ +# Maintainer: Mohammad Mostafa Farzan <m2_farzan@yahoo.com> + +pkgname=ros2-foxy +pkgver=2020.12.11 +pkgrel=1 +pkgdesc="A set of software libraries and tools for building robot applications" +url="https://docs.ros.org/en/foxy/" +arch=('any') +license=('Apache') +depends=('ros2-arch-deps' + 'gmock' + 'sip4') +source=("ros2::git+https://github.com/ros2/ros2#tag=release-foxy-20201211" + "mimick_vendor.patch" + "yaml_cpp_vendor.patch") +sha256sums=('SKIP' + 'SKIP' + 'SKIP') +install=ros2-foxy.install + +prepare() { + # Check locale + locale | grep LANG | grep UTF-8 + if [[ $? -ne 0 ]]; then + printf "Locale must support UTF-8. See https://wiki.archlinux.org/index.php/locale + or https://wiki.archlinux.org/index.php/locale ." + exit 1 + fi + + # Create required symlinks (see https://wiki.archlinux.org/index.php/ROS) + sudo mkdir -p /usr/share/sip + sudo ln -sf /usr/lib/python3.9/site-packages/PyQt5 /usr/share/sip/. + sudo ln -sf /usr/lib/python3.9/site-packages/PyQt5/bindings/* /usr/share/sip/PyQt5/. + + # Clone the repos + mkdir -p $srcdir/ros2/src + vcs import $srcdir/ros2/src < $srcdir/ros2/ros2.repos + + # Fix some issues in the code (TODO: Gradually move to upstream) + ## mimick_vendor: + pushd $srcdir/ros2/src/ros2/mimick_vendor + git cherry-pick c4f28e4f806fc3322d310bc3e93977df734ee733 || git cherry-pick --skip + popd + patch --forward $srcdir/ros2/src/ros2/mimick_vendor/CMakeLists.txt mimick_vendor.patch || true + ## yaml_cpp_vendor: + patch --forward $srcdir/ros2/src/ros2/yaml_cpp_vendor/CMakeLists.txt yaml_cpp_vendor.patch || true + ## rcutils + pushd $srcdir/ros2/src/ros2/rcutils + git cherry-pick 618a9d94565ab844b9f40e0f5828ddbab2bcdad1 || git cherry-pick --skip + popd +} + +build() { + colcon build --merge-install +} + +package() { + mkdir -p $pkgdir/opt/ros2/foxy + cp -r $srcdir/install/* $pkgdir/opt/ros2/foxy/ +} diff --git a/mimick_vendor.patch b/mimick_vendor.patch new file mode 100644 index 000000000000..d86f3c8d48b5 --- /dev/null +++ b/mimick_vendor.patch @@ -0,0 +1,3 @@ +10a11,12 +> list(APPEND cmake_configure_args -DCMAKE_C_FLAGS="-O2") +> list(APPEND cmake_configure_args -DCMAKE_CXX_FLAGS="-O2") diff --git a/ros2-foxy.install b/ros2-foxy.install new file mode 100644 index 000000000000..e006f031f5e2 --- /dev/null +++ b/ros2-foxy.install @@ -0,0 +1,26 @@ +post_install() { + printf " + \e[33m\e[1mIMPORTANT NOTE:\e[0m + You should add something like this to your ~/.bashrc file: + + export ROS_DOMAIN_ID=42 + source /opt/ros2/foxy/setup.bash + + This quick command will do it for you: + + printf \"\\\nexport ROS_DOMAIN_ID=42\\\nsource /opt/ros2/foxy/setup.bash\\\n\" >> ~/.bashrc + + Note 1: If you use zsh, replace '.bash' in the above lines with + '.zsh' and add the lines to ~/.zshrc . + + Note 2: This will slow down terminal startup for a few seconds on + cold start, and a fraction of a second for terminals that open later. + If you know a better transparent solution, you are welcome to edit + this. + \e[33m\e[1mEND OF IMPORTANT NOTE.\e[0m + " +} + +post_remove() { + printf "You may want to clean up .bashrc and/or .zshrc." +} diff --git a/yaml_cpp_vendor.patch b/yaml_cpp_vendor.patch new file mode 100644 index 000000000000..64be3f331768 --- /dev/null +++ b/yaml_cpp_vendor.patch @@ -0,0 +1,6 @@ +18,19c18,19 +< list(APPEND YAML_C_FLAGS "-w") +< list(APPEND YAML_CXX_FLAGS "-std=c++14 -w") +--- +> set(YAML_C_FLAGS "${YAML_C_FLAGS} -w") +> set(YAML_CXX_FLAGS "${YAML_CXX_FLAGS} -std=c++14 -w") |