Skip to content

Commit dac72d0

Browse files
Merge pull request #691 from christianrauch/meson
add meson support
2 parents 9284250 + 4e7e05d commit dac72d0

File tree

12 files changed

+180
-1
lines changed

12 files changed

+180
-1
lines changed

bloom/generators/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ Bloom now supports different build types by inspecting the `build_type` tag in p
1212
Templates for a build type are stored in subdirectories of the platform's templates directory named for the build type.
1313
As an example the templates for the `ament_cmake` build type for debian packages is stored in [bloom/generators/debian/templates/ament_cmake](debian/templates/ament_cmake).
1414

15-
To add support for a new build type create a new templates subdirectory for it in your target platform's `templates` directory, and add any necessary supporting code to the generator for build type specific substitutions.For examples search for "Build-type specific substitutions" in [bloom/generators/debian/generator.py](debian/generator.py).
15+
To add support for a new build type create a new templates subdirectory for it in your target platform's `templates` directory, and add any necessary supporting code to the generator for build type specific substitutions. For examples search for "Build-type specific substitutions" in [bloom/generators/debian/generator.py](debian/generator.py).

bloom/generators/debian/generator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,8 @@ def generate_substitutions_from_package(
389389
pass
390390
elif build_type == 'cmake':
391391
pass
392+
elif build_type == 'meson':
393+
pass
392394
elif build_type == 'ament_cmake':
393395
pass
394396
elif build_type == 'ament_python':
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@[for change_version, change_date, changelog, main_name, main_email in changelogs]@(Package) (@(change_version)@(DebianInc)@(Distribution)) @(Distribution); urgency=high
2+
3+
@(changelog)
4+
5+
-- @(main_name) <@(main_email)> @(change_date)
6+
7+
@[end for]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@(debhelper_version)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Source: @(Package)
2+
Section: misc
3+
Priority: optional
4+
Maintainer: @(Maintainer)
5+
Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(BuildDepends))
6+
Homepage: @(Homepage)
7+
Standards-Version: 4.6.0
8+
9+
Package: @(Package)
10+
Architecture: any
11+
Depends: ${shlibs:Depends}, ${misc:Depends}, @(', '.join(Depends))
12+
@[if Conflicts]Conflicts: @(', '.join(Conflicts))@\n@[end if]@
13+
@[if Replaces]Replaces: @(', '.join(Replaces))@\n@[end if]@
14+
Description: @(Description)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Format: Bloom subset of https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: @(Name)
3+
@[if BugTracker]Upstream-Contact: @(BugTracker)@\n@[end if]@
4+
@[if Source]Source: @(Source)@\n@[end if]@
5+
@[for License, Text in Licenses]@
6+
7+
Files: See file headers in repository for details
8+
Copyright: See package copyright in source code for details
9+
License: @(License)
10+
@(Text)
11+
@[end for]@
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[git-buildpackage]
2+
upstream-tag=@(release_tag)
3+
upstream-tree=tag
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/usr/bin/make -f
2+
# -*- makefile -*-
3+
# Sample debian/rules that uses debhelper.
4+
# This file was originally written by Joey Hess and Craig Small.
5+
# As a special exception, when this file is copied by dh-make into a
6+
# dh-make output file, you may use that output file without restriction.
7+
# This special exception was added by Craig Small in version 0.37 of dh-make.
8+
9+
# Uncomment this to turn on verbose mode.
10+
export DH_VERBOSE=1
11+
# TODO: remove the LDFLAGS override. It's here to avoid esoteric problems
12+
# of this sort:
13+
# https://code.ros.org/trac/ros/ticket/2977
14+
# https://code.ros.org/trac/ros/ticket/3842
15+
export LDFLAGS=
16+
export PKG_CONFIG_PATH=@(InstallationPrefix)/lib/pkgconfig
17+
# Explicitly enable -DNDEBUG, see:
18+
# https://github.com/ros-infrastructure/bloom/issues/327
19+
export DEB_CXXFLAGS_MAINT_APPEND=-DNDEBUG
20+
21+
# Solve shlibdeps errors in REP136 packages that use GNUInstallDirs:
22+
export DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
23+
24+
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
25+
26+
%:
27+
dh $@@ -v --buildsystem=meson --builddirectory=.obj-$(DEB_HOST_GNU_TYPE)
28+
29+
override_dh_auto_configure:
30+
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
31+
dh_auto_configure -- \
32+
--prefix="@(InstallationPrefix)" \
33+
--cmake-prefix-path="@(InstallationPrefix)" \
34+
--libdir=lib \
35+
--libexecdir=lib
36+
37+
override_dh_auto_build:
38+
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
39+
dh_auto_build
40+
41+
override_dh_auto_test:
42+
echo -- Running tests. Even if one of them fails the build is not canceled.
43+
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
44+
dh_auto_test || true
45+
46+
override_dh_shlibdeps:
47+
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
48+
dh_shlibdeps -l$(CURDIR)/debian/@(Package)/@(InstallationPrefix)/lib/:$(CURDIR)/debian/@(Package)/@(InstallationPrefix)/lib/${DEB_HOST_MULTIARCH}
49+
50+
override_dh_auto_install:
51+
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
52+
dh_auto_install
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0 (@(format))
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@[if format and format == 'quilt']@
2+
# Automatically add upstream changes to the quilt overlay.
3+
# http://manpages.ubuntu.com/manpages/trusty/man1/dpkg-source.1.html
4+
# This supports reusing the orig.tar.gz for debian increments.
5+
auto-commit
6+
@[end if]

0 commit comments

Comments
 (0)