diff options
author | Marcell Meszaros | 2024-04-06 13:37:44 +0200 |
---|---|---|
committer | Marcell Meszaros | 2024-04-06 13:37:44 +0200 |
commit | 03a91d346be3f4b35069badca0e5e90b6cdd41a5 (patch) | |
tree | 79234fb8d4b620d3bbcfa562323ca9ce32a1e76b /PKGBUILD | |
parent | 6e6705b99feacb7f7b783df2853e5ca4f68bbe17 (diff) | |
download | aur-ros-melodic-qt-gui-cpp.tar.gz |
0.4.2.r4.g9147631-1: update to latest patched version
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 95 |
1 files changed, 54 insertions, 41 deletions
@@ -2,68 +2,81 @@ pkgdesc="ROS - qt_gui_cpp provides the foundation for C++-bindings for qt_gui an url='https://wiki.ros.org/qt_gui_cpp' pkgname='ros-melodic-qt-gui-cpp' -pkgver='0.4.2' +pkgver=0.4.2.r4.g9147631 +_commit=9147631f5f21f77e1f8e1f3ad884b5e96a8e22e4 arch=('i686' 'x86_64' 'aarch64' 'armv7h' 'armv6h') -pkgrel=4 +pkgrel=1 license=('BSD') ros_makedepends=( - ros-melodic-python-qt-binding - ros-melodic-cmake-modules - ros-melodic-catkin - ros-melodic-pluginlib + ros-melodic-python-qt-binding + ros-melodic-cmake-modules + ros-melodic-catkin + ros-melodic-pluginlib ) makedepends=( - 'cmake' - 'ros-build-tools' - ${ros_makedepends[@]} - tinyxml - qt5-base - pkg-config + 'cmake' + 'git' + 'ros-build-tools' + ${ros_makedepends[@]} + qt5-base + tinyxml ) ros_depends=( - ros-melodic-qt-gui - ros-melodic-pluginlib + ros-melodic-qt-gui + ros-melodic-pluginlib ) depends=( - ${ros_depends[@]} - tinyxml - sip4 - python-sip4 + ${ros_depends[@]} + python-pyqt5-sip + sip + tinyxml ) -_dir="qt_gui_core-${pkgver}/qt_gui_cpp" -source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/ros-visualization/qt_gui_core/archive/${pkgver}.tar.gz") -sha256sums=('fbc5a7b0a4da43f80e9216845aec2e247fac0a63512053c03a9f89024d026aad') +_dir="${pkgname}/qt_gui_cpp" +source=("${pkgname}::git+https://github.com/ros-visualization/qt_gui_core.git#commit=${_commit}") +b2sums=('SKIP') -build() { - # Use ROS environment variables. - source /usr/share/ros-build-tools/clear-ros-env.sh - [ -f /opt/ros/melodic/setup.bash ] && source /opt/ros/melodic/setup.bash +pkgver() { + cd "${_dir}" + + # Generate git tag based version. Count only proper (v)#.#* [#=number] tags. + local _gitversion=$(git describe --long --tags --match '[v0-9][0-9.][0-9.]*' | sed -e 's|^v||' | tr '[:upper:]' '[:lower:]') - # Create the build directory. - [ -d ${srcdir}/build ] || mkdir ${srcdir}/build - cd ${srcdir}/build + # Format git-based version for pkgver + # Expected format: e.g. 1.5.0rc2.r521.g99982a1c + # Or in case of 'post': 1.5.0.post1.r521.g99982a1c + echo "${_gitversion}" | sed \ + -e 's;^\([0-9][0-9.]*\)[-_.]\([a-zA-Z]\+\);\1\2;' \ + -e 's;\([0-9]\+-g\);r\1;' \ + -e 's;-;.;g' \ + -e 's;\(post.*\);\.\1;' +} + +build() { + # Use ROS environment variables. + source /usr/share/ros-build-tools/clear-ros-env.sh + [ -f /opt/ros/melodic/setup.bash ] && source /opt/ros/melodic/setup.bash - # Fix Python2/Python3 conflicts. - /usr/share/ros-build-tools/fix-python-scripts.sh -v 3 ${srcdir}/${_dir} + # Create the build directory. + [ -d ${srcdir}/build ] || mkdir ${srcdir}/build + cd ${srcdir}/build - # Build the project. - cmake ${srcdir}/${_dir} \ - -DCMAKE_BUILD_TYPE=Release \ - -DCATKIN_BUILD_BINARY_PACKAGE=ON \ - -DCMAKE_INSTALL_PREFIX=/opt/ros/melodic \ - -DPYTHON_EXECUTABLE=/usr/bin/python3 \ - -DSETUPTOOLS_DEB_LAYOUT=OFF \ - -DBOOST_ROOT=/opt/boost1.69 + # Build the project. + cmake ${srcdir}/${_dir} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCATKIN_BUILD_BINARY_PACKAGE=ON \ + -DCMAKE_INSTALL_PREFIX=/opt/ros/melodic \ + -DPYTHON_EXECUTABLE=/usr/bin/python3 \ + -DSETUPTOOLS_DEB_LAYOUT=OFF - make + make } package() { - cd "${srcdir}/build" - make DESTDIR="${pkgdir}/" install + cd "${srcdir}/build" + make DESTDIR="${pkgdir}/" install } |