123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- From 3ef45c41105e61efe84c9be3a9a22988dfe10db8 Mon Sep 17 00:00:00 2001
- From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
- Date: Fri, 22 Oct 2021 07:33:04 +0200
- Subject: [PATCH] meson.build: use dependency function for readline
- Use meson dependency function to find readline instead of
- cc.find_library. This function will retrieve readline pkg-config file
- which is available since version 7 (released 5 years ago) and
- https://git.savannah.gnu.org/cgit/readline.git/commit/readline.pc.in?id=d49a9082c0e15bba8cd3d8cc0a994409cf823cac.
- readline.pc sets tinfo in Requires.Private which will avoid the
- following static build failure:
- /home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/9.3.0/../../../../i586-buildroot-linux-musl/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/i586-buildroot-linux-musl/sysroot/usr/lib/libreadline.a(display.o): in function `_rl_move_cursor_relative':
- display.c:(.text+0xbb5): undefined reference to `tputs'
- Fixes:
- - http://autobuild.buildroot.org/results/77c10947ddc749c54c7c233e3143f5cdf1edc73d
- Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
- [Upstream status: https://github.com/RidgeRun/gstd-1.x/pull/261]
- ---
- meson.build | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
- diff --git a/meson.build b/meson.build
- index 7a8690a..44ed5c2 100644
- --- a/meson.build
- +++ b/meson.build
- @@ -32,8 +32,8 @@ systemd_required = get_option('enable-systemd').enabled()
- systemd_dep = dependency('systemd', required : systemd_required, version : '>=232')
-
- cc = meson.get_compiler('c')
- -readline = cc.find_library('readline', required: true)
- -if readline.found()
- +readline_dep = dependency('readline')
- +if readline_dep.found()
- add_project_arguments('-DHAVE_LIBREADLINE', language: 'c')
- add_project_arguments('-DHAVE_READLINE_HISTORY', language: 'c')
- # Add arguments to the compiler command line.
- @@ -48,8 +48,6 @@ if readline.found()
- else
- add_project_arguments('-DHAVE_HISTORY_H', language: 'c')
- endif
- -
- - readline_dep = readline
- endif
-
- ## Dependencies
- --
- 2.37.1
|