Last active
May 8, 2022 01:00
-
-
Save commonquail/643f64edbe58d5702844 to your computer and use it in GitHub Desktop.
Build tmux with 24bit color and ncursesw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o errexit | |
ncursesw_dir=/usr/include/ncursesw | |
[[ -d "$ncursesw_dir" ]] || | |
{ | |
echo "fatal: ncursesw not found at ${ncursesw_dir}" >&2 | |
exit 1 | |
} | |
# These build but do not seem to produce 24bit colour. | |
# Use the original patch instead. | |
#git clone https://github.com/sunaku/tmux.git | |
#cd tmux | |
#git checkout origin/24bit-color | |
wget -O /tmp/tmux-24.diff \ | |
https://gist.githubusercontent.com/choppsv1/dd00858d4f7f356ce2cf/raw/794b25ba7b6cb73a95bc19aef35a86fed4b4625e/tmux-24.diff | |
git clone https://github.com/tmux/tmux.git | |
cd tmux | |
git checkout 2.0 | |
git apply /tmp/tmux-24.diff | |
sh autogen.sh | |
./configure \ | |
CPPFLAGS="-I/usr/include -I${ncursesw_dir}" \ | |
CFLAGS="-I/usr/include -I${ncursesw_dir}" \ | |
LDFLAGS="-L/usr/lib -L${ncursesw_dir} -L/usr/include" | |
CPPFLAGS="-I/usr/include -I${ncursesw_dir}" \ | |
LDFLAGS="-static -L/usr/include -L${ncursesw_dir} -L/usr/lib" \ | |
make |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for this script! Very useful.