Skip to content

Commit

Permalink
Fix bt2
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Applencourt committed Oct 18, 2023
1 parent 209828a commit ef27087
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 13 deletions.
16 changes: 16 additions & 0 deletions packages/babeltrace2/d2d2e6cc_cpp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/src/plugins/ctf/common/msg-iter/msg-iter.cpp b/src/plugins/ctf/common/msg-iter/msg-iter.cpp
index eed75853..e314e38e 100644
--- a/src/plugins/ctf/common/msg-iter/msg-iter.cpp
+++ b/src/plugins/ctf/common/msg-iter/msg-iter.cpp
@@ -1909,11 +1909,6 @@ static enum bt_bfcr_status bfcr_unsigned_int_char_cb(uint64_t value, struct ctf_
goto end;
}

- if (value == 0) {
- msg_it->done_filling_string = true;
- goto end;
- }
-
string_field = stack_top(msg_it->stack)->base;
BT_ASSERT_DBG(bt_field_get_class_type(string_field) == BT_FIELD_CLASS_TYPE_STRING);

13 changes: 13 additions & 0 deletions packages/babeltrace2/git_shallow_version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/common/gen-version-i.sh b/src/common/gen-version-i.sh
index 938d70c5..a8249d47 100755
--- a/src/common/gen-version-i.sh
+++ b/src/common/gen-version-i.sh
@@ -42,7 +42,7 @@ fi
# configurations leading to different results.
if test -r "$TOP_SRCDIR/bootstrap" && test -r "$TOP_SRCDIR/.git" &&
(command -v git > /dev/null 2>&1); then
- GIT_VERSION_STR="$(cd "$TOP_SRCDIR" && git describe --tags --dirty --abbrev=12)"
+ GIT_VERSION_STR="$(cd "$TOP_SRCDIR" && git describe --tags --dirty --abbrev=12 --always)"
GIT_CURRENT_TAG="$(cd "$TOP_SRCDIR" && (git describe --tags --exact-match --match="v[0-9]*" HEAD || true) 2> /dev/null)"
echo "#define BT_VERSION_GIT \"$GIT_VERSION_STR\"" > version.i.tmp

52 changes: 39 additions & 13 deletions packages/babeltrace2/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ class Babeltrace2(AutotoolsPackage):

homepage = "https://babeltrace.org/"
url = "https://www.efficios.com/files/babeltrace/babeltrace2-2.0.2.tar.bz2"
git = "https://github.com/efficios/babeltrace.git"

maintainers = ['Kerilk']

version('master', branch='master')
version('2.0.5', sha256='7b8f9ef2a7ee7c9ec292d4568811cf6926089b25e49cdaab449e2cb724edf2b4')
version('2.0.4', sha256='774f116685dab5db9c51577dde43c8c1df482aae6bb78a089b1e9e7c8b489bca')
version('2.0.3', sha256='a53625152554102d868ba8395347d0daba0bec9c4b854c3e9bd97c77b0bf04a0')
Expand All @@ -27,25 +29,46 @@ class Babeltrace2(AutotoolsPackage):
variant('built-in-plugins', default=False, description='Statically-link in-tree plug-ins into the babeltrace2 executable')
variant('built-in-python-plugin-support', default=False, description='Statically-link Python plugin support into the babeltrace library')
variant('man-pages', default=False, description='Build man pages')
variant('asan', default=False, description='Build with AddressSanitizer', when='@2.1:')
variant('ubsan', default=False, description='Build with UndefinedBehaviorSanitizer', when='@2.1:')
variant('Werror', default=False, description='Enable -Werror')

depends_on('autoconf', type='build')
depends_on('automake', type='build')
depends_on('libtool', type='build')
depends_on('pkg-config')

depends_on('glib@2.28:', type=('build', 'link'))
depends_on('elfutils@0.154:')
depends_on('python@3.4:', when='+python-bindings')
depends_on('python@3.4:', when='+python-plugins')
depends_on('python@3.4:', when='+built-in-python-plugin-support')
depends_on('swig@3.0:', when='+python-bindings')
depends_on('swig@3.0:', when='+python-plugins')
depends_on('swig@3.0:', when='+built-in-python-plugin-support')
depends_on('doxygen@1.8.6:', when='+api-doc')
depends_on('asciidoc@8.6.8:', when='+man-pages')
depends_on('xmlto@0.0.25:', when='+man-pages')
depends_on('pkg-config')

patch('d2d2e6cc.patch')
with when("+python-bindings"):
depends_on('python@3.4:')
depends_on('swig@3.0:')

with when('+python-plugins'):
depends_on('python@3.4:')
depends_on('swig@3.0:')

with when('+built-in-python-plugin-support'):
depends_on('python@3.4:')
depends_on('swig@3.0:')

with when('+api-doc'):
depends_on('asciidoc@8.6.8:')

with when('+man-pages'):
depends_on('asciidoc@8.6.8:')
depends_on('xmlto@0.0.25:')

# Add varient pour esam
patch('d2d2e6cc.patch', when='@:2.0.999')
patch('d2d2e6cc_cpp.patch', when='@2.1:')

patch('0db1832.patch', when='@:2.0.4')
patch('3079913.patch')
patch('0001-ctf-grow-stored_values-array-when-necessary.patch', when='@:2.0.5')
patch('3079913.patch', when='@:2.0.999')
patch('0001-ctf-grow-stored_values-array-when-necessary.patch', when='@:2.0.999')

patch('git_shallow_version.patch', when='@master')

def configure_args(self):
args = []
Expand All @@ -56,6 +79,9 @@ def configure_args(self):
args.extend(self.enable_or_disable('built-in-plugins'))
args.extend(self.enable_or_disable('built-in-python-plugin-support'))
args.extend(self.enable_or_disable('man-pages'))
with when('@2.1:'):
args.extend(self.enable_or_disable('asan'))
args.extend(self.enable_or_disable('ubsan'))
args.extend(self.enable_or_disable('Werror'))

if ('+python-bindings' in self.spec or
Expand Down

0 comments on commit ef27087

Please sign in to comment.