summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD22
-rw-r--r--vendor_only.patch25
3 files changed, 40 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2a7490655aa..aad45a539d5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Tue Dec 19 18:45:29 UTC 2017
+# Thu Dec 21 22:29:48 UTC 2017
pkgbase = ros-ardent-rviz-yaml-cpp-vendor
pkgdesc = ROS - Wrapper around yaml-cpp, it provides a fixed CMake module and an ExternalProject build of it.
pkgver = 2.0.0
@@ -11,7 +11,9 @@ pkgbase = ros-ardent-rviz-yaml-cpp-vendor
makedepends = ros-build-tools
makedepends = ros-ardent-ament-cmake
source = ros-ardent-rviz-yaml-cpp-vendor-2.0.0-5.tar.gz::https://github.com/ros2-gbp/rviz-release/archive/release/ardent/rviz_yaml_cpp_vendor/2.0.0-5.tar.gz
+ source = vendor_only.patch
sha256sums = a8812a7ae698b6f2a3d59c0aac82ed3881734f476e8d8ca28af2f5577c9e2cb4
+ sha256sums = 99ff35aec7d83dc2e818e735bfc3afa9cbd9884e39e0bc4123a35ab155ec02df
pkgname = ros-ardent-rviz-yaml-cpp-vendor
diff --git a/PKGBUILD b/PKGBUILD
index 1cc381d1bcd..164494896df 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -25,8 +25,13 @@ depends=(${ros_depends[@]})
# Tarball version (faster download)
_dir="rviz-release-release-ardent-rviz_yaml_cpp_vendor-${pkgver}-${_pkgver_patch}"
-source=("${pkgname}-${pkgver}-${_pkgver_patch}.tar.gz"::"https://github.com/ros2-gbp/rviz-release/archive/release/ardent/rviz_yaml_cpp_vendor/${pkgver}-${_pkgver_patch}.tar.gz")
-sha256sums=('a8812a7ae698b6f2a3d59c0aac82ed3881734f476e8d8ca28af2f5577c9e2cb4')
+source=("${pkgname}-${pkgver}-${_pkgver_patch}.tar.gz"::"https://github.com/ros2-gbp/rviz-release/archive/release/ardent/rviz_yaml_cpp_vendor/${pkgver}-${_pkgver_patch}.tar.gz" "vendor_only.patch")
+sha256sums=('a8812a7ae698b6f2a3d59c0aac82ed3881734f476e8d8ca28af2f5577c9e2cb4' "99ff35aec7d83dc2e818e735bfc3afa9cbd9884e39e0bc4123a35ab155ec02df")
+
+prepare() {
+ cd "${srcdir}"
+ patch -Np1 -i "vendor_only.patch"
+}
build() {
# Use ROS environment variables
@@ -40,17 +45,14 @@ build() {
# Fix Python2/Python3 conflicts
/usr/share/ros-build-tools/fix-python-scripts.sh -v 3 "${srcdir}/${_dir}"
+ export PYTHONPATH=/opt/ros/ardent/lib/python3.6/site-packages
+ export AMENT_PREFIX_PATH=/opt/ros/ardent
+
# Build project
cmake "${srcdir}/${_dir}" \
-DCMAKE_BUILD_TYPE=Release \
- -DCATKIN_BUILD_BINARY_PACKAGE=ON \
- -DCMAKE_INSTALL_PREFIX=/opt/ros/ardent \
- -DPYTHON_EXECUTABLE=/usr/bin/python3 \
- -DPYTHON_INCLUDE_DIR=/usr/include/python3.5m \
- -DPYTHON_LIBRARY=/usr/lib/libpython3.5m.so \
- -DPYTHON_BASENAME=.cpython-35m \
- -DSETUPTOOLS_DEB_LAYOUT=OFF \
- -DCATKIN_ENABLE_TESTING=OFF
+ -DBUILD_TESTING=Off \
+ -DCMAKE_INSTALL_PREFIX=/opt/ros/ardent
make
}
diff --git a/vendor_only.patch b/vendor_only.patch
new file mode 100644
index 00000000000..812003407f1
--- /dev/null
+++ b/vendor_only.patch
@@ -0,0 +1,25 @@
+Only in patched: build
+diff -ura orig/rviz-release-release-ardent-rviz_yaml_cpp_vendor-2.0.0-5/rviz_yaml_cpp_vendor-extras.cmake.in patched/rviz-release-release-ardent-rviz_yaml_cpp_vendor-2.0.0-5/rviz_yaml_cpp_vendor-extras.cmake.in
+--- orig/rviz-release-release-ardent-rviz_yaml_cpp_vendor-2.0.0-5/rviz_yaml_cpp_vendor-extras.cmake.in 2017-12-09 10:13:15.000000000 +0100
++++ patched/rviz-release-release-ardent-rviz_yaml_cpp_vendor-2.0.0-5/rviz_yaml_cpp_vendor-extras.cmake.in 2017-12-21 22:50:26.424578460 +0100
+@@ -1,14 +1,10 @@
+-find_package(yaml-cpp QUIET)
+-
+-if(NOT yaml-cpp_FOUND)
+- # add the local Modules directory to the modules path
+- if(WIN32)
+- set(yaml-cpp_DIR "${@PROJECT_NAME@_DIR}/../../../opt/rviz_yaml_cpp_vendor/CMake")
+- else()
+- set(yaml-cpp_DIR "${@PROJECT_NAME@_DIR}/../../../opt/rviz_yaml_cpp_vendor/lib/cmake/yaml-cpp")
+- endif()
+- message(STATUS "Setting yaml-cpp_DIR to: '${yaml-cpp_DIR}'")
++# add the local Modules directory to the modules path
++if(WIN32)
++ set(yaml-cpp_DIR "${@PROJECT_NAME@_DIR}/../../../opt/rviz_yaml_cpp_vendor/CMake")
++else()
++ set(yaml-cpp_DIR "${@PROJECT_NAME@_DIR}/../../../opt/rviz_yaml_cpp_vendor/lib/cmake/yaml-cpp")
+ endif()
++message(STATUS "Setting yaml-cpp_DIR to: '${yaml-cpp_DIR}'")
+
+ find_package(yaml-cpp CONFIG REQUIRED QUIET)
+