From 24faf3f76a9e86731d25852dc59533e6a531b6ff Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Mon, 13 May 2024 23:40:03 +0200 Subject: [PATCH] Rebase from 'debian/humble/apriltag' --- .github/workflows/bloom.yml | 53 +++++++++++++++++++++++++++ CMakeLists.txt | 2 +- common/matd.c | 2 +- debian/changelog | 7 ---- debian/changelog.em | 7 ++++ debian/compat | 1 - debian/compat.em | 1 + debian/control | 12 ------ debian/control.em | 14 +++++++ debian/{copyright => copyright.em} | 10 +++-- debian/gbp.conf | 3 -- debian/gbp.conf.em | 3 ++ debian/{rules => rules.em} | 20 +++++----- debian/source/format | 1 - debian/source/format.em | 1 + debian/source/{options => options.em} | 3 +- package.xml | 2 +- 17 files changed, 101 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/bloom.yml delete mode 100644 debian/changelog create mode 100644 debian/changelog.em delete mode 100644 debian/compat create mode 100644 debian/compat.em delete mode 100644 debian/control create mode 100644 debian/control.em rename debian/{copyright => copyright.em} (50%) delete mode 100644 debian/gbp.conf create mode 100644 debian/gbp.conf.em rename debian/{rules => rules.em} (73%) delete mode 100644 debian/source/format create mode 100644 debian/source/format.em rename debian/source/{options => options.em} (81%) diff --git a/.github/workflows/bloom.yml b/.github/workflows/bloom.yml new file mode 100644 index 0000000..f74f0c0 --- /dev/null +++ b/.github/workflows/bloom.yml @@ -0,0 +1,53 @@ +name: bloom + +on: [push, pull_request] + +jobs: + build_linux: + name: "Ubuntu (${{ matrix.ros_distribution }})" + + runs-on: ubuntu-latest + + strategy: + matrix: + include: + - docker_image: ubuntu:20.04 + ros_distribution: noetic + + - docker_image: ubuntu:22.04 + ros_distribution: humble + + - docker_image: ubuntu:24.04 + ros_distribution: jazzy + + container: + image: ${{ matrix.docker_image }} + + env: + DEBIAN_FRONTEND: noninteractive + + steps: + - name: install core dependencies + run: | + apt update + apt install -y --no-install-recommends git ca-certificates + + - uses: actions/checkout@v4 + + - uses: ros-tooling/setup-ros@v0.7 + + - name: install build tool dependencies + run: | + apt install -y --no-install-recommends devscripts equivs python3-bloom + + - name: bloom + run: | + rosdep update + bloom-generate rosdebian --ros-distro ${{ matrix.ros_distribution }} + mk-build-deps + apt install -y --no-install-recommends ./ros-${{ matrix.ros_distribution }}-apriltag-build-deps_*_all.deb + dpkg-buildpackage -b + + - name: install bloomed packages + run: | + apt install -y --no-install-recommends ../ros-${{ matrix.ros_distribution }}-apriltag_*.deb ../ros-${{ matrix.ros_distribution }}-apriltag-dbgsym_*.ddeb diff --git a/CMakeLists.txt b/CMakeLists.txt index dbfed2b..2a6bc1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.16) -project(apriltag VERSION 3.4.1 LANGUAGES C) +project(apriltag VERSION 3.4.2 LANGUAGES C) if(POLICY CMP0077) cmake_policy(SET CMP0077 NEW) diff --git a/common/matd.c b/common/matd.c index 176394e..6b8a040 100644 --- a/common/matd.c +++ b/common/matd.c @@ -1148,7 +1148,7 @@ static matd_svd_t matd_svd_tall(matd_t *A, int flags) assert(maxiters > 0); // reassure clang int iter; - double maxv; // maximum non-zero value being reduced this iteration + double maxv = 0; // maximum non-zero value being reduced this iteration double tol = 1E-10; diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 7f176e5..0000000 --- a/debian/changelog +++ /dev/null @@ -1,7 +0,0 @@ -ros-humble-apriltag (3.4.1-1jammy) jammy; urgency=high - - * Autogenerated, no changelog for this version found in CHANGELOG.rst. - - -- Max Krogius Mon, 13 May 2024 16:24:42 -0000 - - diff --git a/debian/changelog.em b/debian/changelog.em new file mode 100644 index 0000000..3585909 --- /dev/null +++ b/debian/changelog.em @@ -0,0 +1,7 @@ +@[for change_version, change_date, changelog, main_name, main_email in changelogs]@(Package) (@(change_version)@(DebianInc)@(Distribution)) @(Distribution); urgency=high + +@(changelog) + + -- @(main_name) <@(main_email)> @(change_date) + +@[end for] diff --git a/debian/compat b/debian/compat deleted file mode 100644 index ec63514..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/debian/compat.em b/debian/compat.em new file mode 100644 index 0000000..7a87216 --- /dev/null +++ b/debian/compat.em @@ -0,0 +1 @@ +@(debhelper_version) diff --git a/debian/control b/debian/control deleted file mode 100644 index 41a9b7f..0000000 --- a/debian/control +++ /dev/null @@ -1,12 +0,0 @@ -Source: ros-humble-apriltag -Section: misc -Priority: optional -Maintainer: Max Krogius -Build-Depends: debhelper (>= 9.0.0), cmake, libopencv-dev , python3-dev, python3-numpy, ros-humble-ros-workspace -Homepage: https://april.eecs.umich.edu/software/apriltag.html -Standards-Version: 3.9.2 - -Package: ros-humble-apriltag -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ros-humble-ros-workspace -Description: AprilTag detector library diff --git a/debian/control.em b/debian/control.em new file mode 100644 index 0000000..6d7b65c --- /dev/null +++ b/debian/control.em @@ -0,0 +1,14 @@ +Source: @(Package) +Section: misc +Priority: optional +Maintainer: @(Maintainer) +Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(BuildDepends)) +Homepage: @(Homepage) +Standards-Version: 3.9.2 + +Package: @(Package) +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, @(', '.join(Depends)) +@[if Conflicts]Conflicts: @(', '.join(Conflicts))@\n@[end if]@ +@[if Replaces]Replaces: @(', '.join(Replaces))@\n@[end if]@ +Description: @(Description) diff --git a/debian/copyright b/debian/copyright.em similarity index 50% rename from debian/copyright rename to debian/copyright.em index 637c3c7..bc82fd5 100644 --- a/debian/copyright +++ b/debian/copyright.em @@ -1,7 +1,11 @@ Format: Bloom subset of https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: apriltag +Upstream-Name: @(Name) +@[if BugTracker]Upstream-Contact: @(BugTracker)@\n@[end if]@ +@[if Source]Source: @(Source)@\n@[end if]@ +@[for License, Text in Licenses]@ Files: See file headers in repository for details Copyright: See package copyright in source code for details -License: BSD - See repository for full license text +License: @(License) + @(Text) +@[end for]@ diff --git a/debian/gbp.conf b/debian/gbp.conf deleted file mode 100644 index 69706f8..0000000 --- a/debian/gbp.conf +++ /dev/null @@ -1,3 +0,0 @@ -[git-buildpackage] -upstream-tag=release/humble/apriltag/3.4.1-1 -upstream-tree=tag diff --git a/debian/gbp.conf.em b/debian/gbp.conf.em new file mode 100644 index 0000000..ad24a16 --- /dev/null +++ b/debian/gbp.conf.em @@ -0,0 +1,3 @@ +[git-buildpackage] +upstream-tag=@(release_tag) +upstream-tree=tag diff --git a/debian/rules b/debian/rules.em similarity index 73% rename from debian/rules rename to debian/rules.em index b14c9ea..284a071 100755 --- a/debian/rules +++ b/debian/rules.em @@ -13,7 +13,7 @@ export DH_VERBOSE=1 # https://code.ros.org/trac/ros/ticket/2977 # https://code.ros.org/trac/ros/ticket/3842 export LDFLAGS= -export PKG_CONFIG_PATH=/opt/ros/humble/lib/pkgconfig +export PKG_CONFIG_PATH=@(InstallationPrefix)/lib/pkgconfig # Explicitly enable -DNDEBUG, see: # https://github.com/ros-infrastructure/bloom/issues/327 export DEB_CXXFLAGS_MAINT_APPEND=-DNDEBUG @@ -27,23 +27,23 @@ export DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) %: - dh $@ -v --buildsystem=cmake --builddirectory=.obj-$(DEB_HOST_GNU_TYPE) + dh $@@ -v --buildsystem=cmake --builddirectory=.obj-$(DEB_HOST_GNU_TYPE) override_dh_auto_configure: # In case we're installing to a non-standard location, look for a setup.sh # in the install tree and source it. It will set things like # CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. - if [ -f "/opt/ros/humble/setup.sh" ]; then . "/opt/ros/humble/setup.sh"; fi && \ + if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \ dh_auto_configure -- \ - -DCMAKE_INSTALL_PREFIX="/opt/ros/humble" \ - -DCMAKE_PREFIX_PATH="/opt/ros/humble" \ + -DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \ + -DCMAKE_PREFIX_PATH="@(InstallationPrefix)" \ $(BUILD_TESTING_ARG) override_dh_auto_build: # In case we're installing to a non-standard location, look for a setup.sh # in the install tree and source it. It will set things like # CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. - if [ -f "/opt/ros/humble/setup.sh" ]; then . "/opt/ros/humble/setup.sh"; fi && \ + if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \ dh_auto_build override_dh_auto_test: @@ -51,19 +51,19 @@ override_dh_auto_test: # in the install tree and source it. It will set things like # CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. echo -- Running tests. Even if one of them fails the build is not canceled. - if [ -f "/opt/ros/humble/setup.sh" ]; then . "/opt/ros/humble/setup.sh"; fi && \ + if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \ dh_auto_test || true override_dh_shlibdeps: # In case we're installing to a non-standard location, look for a setup.sh # in the install tree and source it. It will set things like # CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. - if [ -f "/opt/ros/humble/setup.sh" ]; then . "/opt/ros/humble/setup.sh"; fi && \ - dh_shlibdeps -l$(CURDIR)/debian/ros-humble-apriltag//opt/ros/humble/lib/:$(CURDIR)/debian/ros-humble-apriltag//opt/ros/humble/lib/${DEB_HOST_MULTIARCH} + if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \ + dh_shlibdeps -l$(CURDIR)/debian/@(Package)/@(InstallationPrefix)/lib/:$(CURDIR)/debian/@(Package)/@(InstallationPrefix)/lib/${DEB_HOST_MULTIARCH} override_dh_auto_install: # In case we're installing to a non-standard location, look for a setup.sh # in the install tree and source it. It will set things like # CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. - if [ -f "/opt/ros/humble/setup.sh" ]; then . "/opt/ros/humble/setup.sh"; fi && \ + if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \ dh_auto_install diff --git a/debian/source/format b/debian/source/format deleted file mode 100644 index 163aaf8..0000000 --- a/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/debian/source/format.em b/debian/source/format.em new file mode 100644 index 0000000..9666bf4 --- /dev/null +++ b/debian/source/format.em @@ -0,0 +1 @@ +3.0 (@(format)) diff --git a/debian/source/options b/debian/source/options.em similarity index 81% rename from debian/source/options rename to debian/source/options.em index 8bc9182..8c4c78b 100644 --- a/debian/source/options +++ b/debian/source/options.em @@ -1,5 +1,6 @@ +@[if format and format == 'quilt']@ # Automatically add upstream changes to the quilt overlay. # http://manpages.ubuntu.com/manpages/trusty/man1/dpkg-source.1.html # This supports reusing the orig.tar.gz for debian increments. auto-commit - +@[end if] diff --git a/package.xml b/package.xml index 658e928..6078b54 100644 --- a/package.xml +++ b/package.xml @@ -2,7 +2,7 @@ apriltag - 3.4.1 + 3.4.2 AprilTag detector library Max Krogius