1$MidnightBSD$
2
3Updated August 6, 2012
4
5What is this?
6
7This is a sh/awk wrapper script to give the ports options setting screen
8more features:
9
10  Extended descriptions for FreeBSD 8.3+ and 9.0+.  Port maintainers can
11  make descriptions longer and more explanatory.
12
13  Auto-sizing of the option screen to fit the terminal window.  Wider or
14  taller windows can display more of the descriptions, or more options.
15  Windows smaller than 80x24 also work.
16
17  Older versions of dialog(1) had a bug in displaying descriptions that
18  are longer than the available space.  When an old version of dialog is
19  detected, descriptions are cut to the available space.  These earlier
20  versions of dialog did not support the --item-help feature used to
21  show extended descriptions, so only the trimmed description will be
22  shown.  Descriptions that have been trimmed will still end in a "+" to
23  indicate that part of it has been trimmed.
24
25
26
27Installation
28
29Edit /etc/make.conf:
30
31  DIALOG="/usr/ports/Tools/scripts/dialogwrapper.sh"
32
33
34Testing long descriptions
35
36Open a terminal window and resize it, making it narrower than the
37default 80 columns.  Try 60 or 70 columns.
38
39su to root and run 'make config' for a port that uses long descriptions.
40For example:
41
42  # cd /usr/ports/audio/xmms2
43  # make config
44
45Descriptions that are too long to fit in the window are shown ending in
46a "+".  Scroll downward through the settings to see that the missing
47part of the description is shown at the bottom of the screen.
48
49
50
51Testing auto-sizing
52
53Open a terminal window and resize it, making it taller than the default
5424 lines.  print/ghostscript9 is a good example.
55
56  # cd /usr/ports/print/ghostscript9
57  # make config
58
59Work remaining to be done
60
61Cleanup of the code and additional comments.
62
63Testing.
64
65The trimming algorithm should break the description on whitespace to
66improve readability.  fold(1) may be an easy way to do that.
67