summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKino2024-05-15 22:33:17 +0800
committerKino2024-05-15 22:33:17 +0800
commit8df014f31fe459d3b81db3ba7c7722c2e3ed6a2c (patch)
tree85c50954c57ae5f9a0dd5e9f1c816e9df250c1fc
parent87dcb4f3e3587f6a428b45eff81573be14c2a67a (diff)
downloadaur-8df014f31fe459d3b81db3ba7c7722c2e3ed6a2c.tar.gz
upgpkg: 2.0.9-5; support Python3.12 & enable tests
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD40
-rw-r--r--support-python3.12.patch14
3 files changed, 46 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2fc3388ccc62..c8a42d1ca8f9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 9a050b51170f..9500835d7047 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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)
+
+