Bug 247932

Summary: shells/bash: Use readline from ports by default. Optionally add OPTION
Product: Ports & Packages Reporter: Michael Osipov <michael.osipov>
Component: Individual Port(s)Assignee: Emanuel Haupt <ehaupt>
Status: Closed FIXED    
Severity: Affects Some People Keywords: needs-patch, needs-qa
Priority: --- Flags: bugzilla: maintainer-feedback? (ehaupt)
Version: Latest   
Hardware: Any   
OS: Any   

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 freebsd_triage 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 freebsd_triage 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

Log:
  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>

Changes:
  head/shells/bash/Makefile
Comment 3 Emanuel Haupt freebsd_committer freebsd_triage 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:
root@bsd1srv:/usr/ports/shells/bash/work/bash-5.0
# 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.