diff options
author | Kino | 2024-05-15 22:33:17 +0800 |
---|---|---|
committer | Kino | 2024-05-15 22:33:17 +0800 |
commit | 8df014f31fe459d3b81db3ba7c7722c2e3ed6a2c (patch) | |
tree | 85c50954c57ae5f9a0dd5e9f1c816e9df250c1fc | |
parent | 87dcb4f3e3587f6a428b45eff81573be14c2a67a (diff) | |
download | aur-8df014f31fe459d3b81db3ba7c7722c2e3ed6a2c.tar.gz |
upgpkg: 2.0.9-5; support Python3.12 & enable tests
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | support-python3.12.patch | 14 |
3 files changed, 46 insertions, 15 deletions
@@ -1,13 +1,16 @@ pkgbase = ros2-humble-xacro pkgdesc = A tool to construct shorter and more readable XML files by using macros that expand to larger XML expressions pkgver = 2.0.9 - pkgrel = 4 + pkgrel = 5 url = https://index.ros.org/p/xacro/ arch = any + license = BSD-3-Clause makedepends = cmake depends = ros2-humble depends = python-yaml - source = https://github.com/ros/xacro/archive/refs/tags/2.0.9.tar.gz + source = ros2-humble-xacro-2.0.9.tar.gz::https://github.com/ros/xacro/archive/2.0.9.tar.gz + source = support-python3.12.patch sha256sums = a8802a5b48f7479bae1238e822ac4ebb47660221eb9bc40a608e899d60f3f7e4 + sha256sums = 96a0669a1c2190e49d2dd93f7f2fea534d699bb32b96c0d02760041f89cb2836 pkgname = ros2-humble-xacro @@ -1,32 +1,46 @@ -# Maintainer: Angelo Elias Dal Zotto <angelodalzotto97@gmail.com> +# Maintainer: Kino <cybao292261 at 163 dot com> +# Contributor: Angelo Elias Dal Zotto <angelodalzotto97@gmail.com> _pkgname=xacro pkgname=ros2-humble-xacro pkgver=2.0.9 -pkgrel=4 +pkgrel=5 pkgdesc="A tool to construct shorter and more readable XML files by using macros that expand to larger XML expressions" url="https://index.ros.org/p/xacro/" +license=('BSD-3-Clause') arch=('any') +makedepends=('cmake') depends=( 'ros2-humble' 'python-yaml' ) -makedepends=('cmake') -source=("https://github.com/ros/xacro/archive/refs/tags/${pkgver}.tar.gz") -sha256sums=('a8802a5b48f7479bae1238e822ac4ebb47660221eb9bc40a608e899d60f3f7e4') +source=("$pkgname-$pkgver.tar.gz::https://github.com/ros/xacro/archive/${pkgver}.tar.gz" + "support-python3.12.patch") +sha256sums=('a8802a5b48f7479bae1238e822ac4ebb47660221eb9bc40a608e899d60f3f7e4' + '96a0669a1c2190e49d2dd93f7f2fea534d699bb32b96c0d02760041f89cb2836') +prepare() { + cd $srcdir/xacro-$pkgver + patch -p1 < ../support-python3.12.patch +} build() { - source /opt/ros/humble/setup.bash + source /opt/ros/humble/setup.bash + + cmake -B build -S "$_pkgname-$pkgver" \ + -DCMAKE_BUILD_TYPE='None' \ + -DCMAKE_INSTALL_PREFIX='/opt/ros/humble' \ + -Wno-dev + + cmake --build build +} - cmake -B build -S "$_pkgname-$pkgver" \ - -DCMAKE_BUILD_TYPE='None' \ - -DCMAKE_INSTALL_PREFIX='/opt/ros/humble' \ - -Wno-dev - - cmake --build build +check() { + cd build + ctest --output-on-failure } package() { - DESTDIR="$pkgdir" cmake --install build + DESTDIR="$pkgdir" cmake --install build + install -Dm644 $srcdir/xacro-$pkgver/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE } diff --git a/support-python3.12.patch b/support-python3.12.patch new file mode 100644 index 000000000000..39bf278d8bf1 --- /dev/null +++ b/support-python3.12.patch @@ -0,0 +1,14 @@ +diff -Naur xacro-2.0.9/xacro/__init__.py xacro-2.0.9_/xacro/__init__.py +--- xacro-2.0.9/xacro/__init__.py 2023-02-28 05:01:59.000000000 +0800 ++++ xacro-2.0.9_/xacro/__init__.py 2024-05-15 22:22:55.093092222 +0800 +@@ -555,8 +555,8 @@ + return False + + +-default_value = '''\$\{.*?\}|\$\(.*?\)|(?:'.*?'|\".*?\"|[^\s'\"]+)+|''' +-re_macro_arg = re.compile(r'^\s*([^\s:=]+?)\s*:?=\s*(\^\|?)?(' + default_value + ')(?:\s+|$)(.*)') ++default_value = r'''\$\{.*?\}|\$\(.*?\)|(?:'.*?'|\".*?\"|[^\s'\"]+)+|''' ++re_macro_arg = re.compile(r'^\s*([^\s:=]+?)\s*:?=\s*(\^\|?)?(' + default_value + r')(?:\s+|$)(.*)') + # space( param )( := )( ^| )( default )( space )(rest) + + |