Skip to content

Commit

Permalink
Use ncursesw by default on Linux
Browse files Browse the repository at this point in the history
References jonas#920
  • Loading branch information
koutcher committed May 25, 2021
1 parent a29c8ff commit 0198637
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
11 changes: 6 additions & 5 deletions INSTALL.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ By default, `tig` is installed in `$HOME/bin`. To install `tig` elsewhere set

Additional build options can be defined in the `config.make` file, which is
loaded automatically when running `make` if it exists. By default,
`contrib/config.make-$kernel_name` is loaded if it exists (currently only
available for macOS [`Darwin`] and Cygwin). See `contrib/config.make` for
example build options.
`contrib/config.make-$kernel_name` is loaded if it exists (currently
available for Linux, macOS [`Darwin`] and Cygwin but Linux users should
prefer the `configure` script). See `contrib/config.make` for example build
options.

Documentation files, such as manpages, are distributed in the release tarballs,
and can be installed using:
Expand Down Expand Up @@ -97,7 +98,7 @@ never made any changes to it.
Installation using Nix
----------------------
You can use link:https://nixos.org/nix/[Nix] to install Tig on NixOS, or any Linux/OSX distribution with Nix installed:
You can use link:https://nixos.org/nix/[Nix] to install Tig on NixOS, or any Linux/macOS distribution with Nix installed:
$ nix-env -i tig
Expand Down Expand Up @@ -127,7 +128,7 @@ Build configuration
-------------------

Build settings are read from the file `config.make` and for certain systems also
from `contrib/config.make-$kernel`. An example of the latter is Mac OS X, where
from `contrib/config.make-$kernel`. An example of the latter is macOS, where
`contrib/config.make-Darwin` provides out-of-the-box configuration for using the
system ncurses library and linking with the iconv library. This makes it easy to
configure the build without having to use the `configure` script. As a side
Expand Down
2 changes: 1 addition & 1 deletion NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Bug fixes:
- Escape variables with %% in external commands. (#1091, #1095)
- Fix parsing of -L argument. (#1100)
- Bugfix: smart-case does not work when search term contains a space. (#1108)

- Use ncursesw by default on Linux. (#920)

tig-2.5.3
---------
Expand Down
2 changes: 1 addition & 1 deletion contrib/config.make-Darwin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Example configuration for Darwin / Mac OS X.
# Example configuration for Darwin / macOS.

# Work-around for Homebrew-based xmlto.
export XML_CATALOG_FILES=/usr/local/etc/xml/catalog
Expand Down
8 changes: 8 additions & 0 deletions contrib/config.make-Linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Example configuration for Linux.
#
# Use ncursesw.

TIG_LDLIBS = -lncursesw
TIG_CPPFLAGS = -DHAVE_NCURSESW_CURSES_H

This comment has been minimized.

Copy link
@peff

peff May 26, 2021

Should this set TIG_NCURSES for the library instead? Setting TIG_LDLIBS here results in linking with -lcurses -lncursesw, whose output looks broken on my system (a pretty vanilla Debian unstable setup). The breakage is the usual ncursesw problem, with utf8 characters like line-graphics shown with escape codes. Setting TIG_NCURSES replaces the -lcurses value that comes from the main Makefile, and everything looks good.

This comment has been minimized.

Copy link
@koutcher

koutcher May 27, 2021

Author Owner

You're right Peff, thanks for pointing this out.


# vim: ft=make:

0 comments on commit 0198637

Please sign in to comment.