Bug 247932 - shells/bash: Use readline from ports by default. Optionally add OPTION
Summary: shells/bash: Use readline from ports by default. Optionally add OPTION
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Emanuel Haupt
Keywords: needs-patch, needs-qa
Depends on:
Reported: 2020-07-12 16:46 UTC by Michael Osipov
Modified: 2020-07-15 08:05 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (ehaupt)


Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov 2020-07-12 16:46:46 UTC
Bash comes with a bundled version if libreadline and compiled with. The general requirement of ports is to rely on port dependencies instead of bundled ones. Please either provide an option to supply --with-installed-readline or make it default. This will ont hinder static building because we still have: ls /usr/local/lib/libreadline.*
/usr/local/lib/libreadline.a      /usr/local/lib/libreadline.so.8
/usr/local/lib/libreadline.so     /usr/local/lib/libreadline.so.8.0
so the archive can be used.
Comment 1 Emanuel Haupt freebsd_committer 2020-07-15 06:11:17 UTC
Thank you for your analysis. Using libreadline from ports by default but providing an option to use the bundled one seems like the right thing to do. I'm not sure how this was missed for so long.
Comment 2 commit-hook freebsd_committer 2020-07-15 06:12:25 UTC
A commit references this bug:

Author: ehaupt
Date: Wed Jul 15 06:11:46 UTC 2020
New revision: 542245
URL: https://svnweb.freebsd.org/changeset/ports/542245

  Bash comes with a bundled version of libreadline and compiled with. Start using
  devel/readline by default but provide an option to keep using the bundled one.

  PR:		247932 (based on)
  Submitted by:	Michael Osipov <michael.osipov@siemens.com>

Comment 3 Emanuel Haupt freebsd_committer 2020-07-15 06:14:14 UTC
Suggestion implemented and committed, thank you.
Comment 4 Michael Osipov 2020-07-15 08:05:51 UTC
bash includes even more bundled libs:
# ls lib
glob/     intl/     malloc/   readline/ sh/       termcap/  tilde/

See here:
  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
  --with-included-gettext use the GNU gettext library included here
  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
  --without-libintl-prefix     don't search for libintl in includedir and libdir

It might be worthwhile to analyze them too. I guess at least libintl (gettext) can  used from ports.