Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better check libzim version #1124

Merged
merged 1 commit into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Section: libdevel
Architecture: any
Multi-Arch: same
Depends: libkiwix14 (= ${binary:Version}), ${misc:Depends}, python3,
libzim-dev (>= 9.0.0~),
libzim-dev (>= 9.0.0), libzim-dev (<< 10.0.0),
libicu-dev,
libpugixml-dev,
libcurl4-gnutls-dev,
Expand Down
4 changes: 3 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ else
error('Cannot found header mustache.hpp')
endif

libzim_dep = dependency('libzim', version : '>=9.0.0', static:static_deps)
libzim_dep = dependency('libzim', version:'>=9.0.0', static:static_deps)
libzim_dep = dependency('libzim', version:'<10.0.0', static:static_deps)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, this doesn't add a version requirement. It rather overrides the preceding one (so only version:'<10.0.0' stays in effect). Yes, the build will likely fail if libzim newer than 9.0.0 is not found, but then meson is allowed to pick up a version older than 10.0.0 (including a version lower than 9.0.0).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct way is to specify multiple restrictions: version:['>=9.0.0', '<10.0.0']

I am going to fix it in #1133

Copy link
Collaborator Author

@kelson42 kelson42 Sep 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, this approach has been validated on an other repo. by @mgautierfr. I don't remember the results of testing I made at that time... but AFAIK it tests the first one and tests then the second one... which is what we want.

@veloman-yunkan Do you have a better formalism in mind?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


if not compiler.has_header_symbol('zim/zim.h', 'LIBZIM_WITH_XAPIAN', dependencies: libzim_dep)
error('Libzim seems to be compiled without xapian. Xapian support is mandatory.')
endif
Expand Down
Loading