Skip to content

Commit

Permalink
Add terminfo fallbacks + enable wide-character support in ncurses (#117)
Browse files Browse the repository at this point in the history
* add terminfo fallbacks

* disable macos/freebsd/solaris terminfo + update cosmo/linux builds

* libgpm?

* Revert "libgpm?"

This reverts commit 7f594f5.

* drop WITH_STATIC_DEPENDENCIES

* Update build_cosmo.sh

* Revert "Update build_cosmo.sh"

This reverts commit 3886abc.

* Revert "drop WITH_STATIC_DEPENDENCIES"

This reverts commit 5ea2c27.

* bring back macos terminfo

* use tic from homebrew

* use widec on macos

* libpanelw

* use widec for cosmo

* try older c standard

* libtinfow

* widec

* enable widec, terminfo on freebsd/solaris

* update handling of tinfo

* use gtic

* use ginfocmp
  • Loading branch information
bjia56 authored Dec 23, 2024
1 parent 8305cd3 commit 64ebfde
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,11 @@ jobs:

- name: Install tools
run: |
brew install coreutils gpatch autoconf automake libtool
brew install coreutils gpatch autoconf automake libtool ncurses
# use gpatch's "patch" executable
echo "/usr/local/opt/gpatch/libexec/gnubin" >> $GITHUB_PATH
# use ncurses's "tic" executable
echo "/usr/local/opt/ncurses/bin/" >> $GITHUB_PATH
- name: Build
run: |
Expand Down
7 changes: 4 additions & 3 deletions scripts/build_cosmo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ cd ${BUILDDIR}

download_verify_extract ncurses-6.4.tar.gz
cd ncurses*
./configure --with-normal --without-progs --enable-overwrite --disable-stripping --prefix=${DEPSDIR}
CFLAGS="${CFLAGS} -std=c89" ./configure --with-normal --without-progs --enable-overwrite --disable-stripping --enable-widec --with-termlib --disable-database --with-fallbacks=xterm,xterm-256color,screen-256color,linux,vt100 --prefix=${DEPSDIR}
make -j4
make install
cp lib/.aarch64/lib*.a ${DEPSDIR}/lib/.aarch64
Expand Down Expand Up @@ -235,8 +235,9 @@ function build_python () {
-DBZIP2_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libbz2.a \
-DREADLINE_INCLUDE_PATH:PATH=${DEPSDIR}/include \
-DREADLINE_LIBRARY:FILEPATH=${DEPSDIR}/lib/libreadline.a \
-DCURSES_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libncurses.a \
-DPANEL_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libpanel.a \
-DCURSES_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libncursesw.a \
-DTINFO_LIBRARY:FILEPATH=${DEPSDIR}/lib/libtinfow.a \
-DPANEL_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libpanelw.a \
-DGDBM_INCLUDE_PATH:PATH=${DEPSDIR}/include \
-DGDBM_LIBRARY:FILEPATH=${DEPSDIR}/lib/libgdbm.a \
-DGDBM_COMPAT_LIBRARY:FILEPATH=${DEPSDIR}/lib/libgdbm_compat.a \
Expand Down
6 changes: 3 additions & 3 deletions scripts/build_freebsd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ cd ${BUILDDIR}

download_verify_extract ncurses-6.4.tar.gz
cd ncurses*
./configure --with-normal --without-shared --without-progs --enable-overwrite --disable-stripping --prefix=${DEPSDIR}
./configure --with-normal --without-shared --without-progs --enable-overwrite --disable-stripping --enable-widec --with-termlib --disable-database --with-fallbacks=xterm,xterm-256color,screen-256color,linux,vt100 --prefix=${DEPSDIR}
gmake -j4
gmake install.libs
install_license
Expand Down Expand Up @@ -418,8 +418,8 @@ function build_python () {
-DLibFFI_LIBRARY:FILEPATH=${DEPSDIR}/lib/libffi.a \
-DREADLINE_INCLUDE_PATH:PATH=${DEPSDIR}/include \
-DREADLINE_LIBRARY:FILEPATH=${DEPSDIR}/lib/libreadline.a \
-DCURSES_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libncurses.a \
-DPANEL_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libpanel.a \
-DCURSES_LIBRARIES="${DEPSDIR}/lib/libncursesw.a;${DEPSDIR}/lib/libtinfow.a" \
-DPANEL_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libpanelw.a \
-DGDBM_INCLUDE_PATH:PATH=${DEPSDIR}/include \
-DGDBM_LIBRARY:FILEPATH=${DEPSDIR}/lib/libgdbm.a \
-DGDBM_COMPAT_LIBRARY:FILEPATH=${DEPSDIR}/lib/libgdbm_compat.a \
Expand Down
6 changes: 3 additions & 3 deletions scripts/build_linux_zig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ cd ${BUILDDIR}

download_verify_extract ncurses-6.4.tar.gz
cd ncurses*
./configure --host=${CHOST} --with-normal --without-progs --enable-overwrite --disable-stripping --prefix=${DEPSDIR}
./configure --host=${CHOST} --with-normal --without-progs --enable-overwrite --disable-stripping --enable-widec --with-termlib --disable-database --with-fallbacks=xterm,xterm-256color,screen-256color,linux,vt100 --prefix=${DEPSDIR}
make -j4
make install
install_license
Expand Down Expand Up @@ -614,8 +614,8 @@ function build_python () {
-DREADLINE_INCLUDE_PATH:PATH=${DEPSDIR}/include \
-DREADLINE_LIBRARY:FILEPATH=${DEPSDIR}/lib/libreadline.a \
-DUUID_LIBRARY:FILEPATH=${DEPSDIR}/lib/libuuid.a \
-DCURSES_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libncurses.a \
-DPANEL_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libpanel.a \
-DCURSES_LIBRARIES="${DEPSDIR}/lib/libncursesw.a;${DEPSDIR}/lib/libtinfow.a" \
-DPANEL_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libpanelw.a \
-DGDBM_INCLUDE_PATH:PATH=${DEPSDIR}/include \
-DGDBM_LIBRARY:FILEPATH=${DEPSDIR}/lib/libgdbm.a \
-DGDBM_COMPAT_LIBRARY:FILEPATH=${DEPSDIR}/lib/libgdbm_compat.a \
Expand Down
6 changes: 3 additions & 3 deletions scripts/build_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cd ${BUILDDIR}

download_verify_extract ncurses-6.4.tar.gz
cd ncurses*
CC=clang CXX=clang++ CFLAGS="${CFLAGS} -arch x86_64 -arch arm64" CXXFLAGS="${CXXFLAGS} -arch x86_64 -arch arm64" ./configure --with-normal --without-progs --enable-overwrite --disable-stripping --prefix=${DEPSDIR}
CC=clang CXX=clang++ CFLAGS="${CFLAGS} -arch x86_64 -arch arm64" CXXFLAGS="${CXXFLAGS} -arch x86_64 -arch arm64" ./configure --with-normal --without-progs --enable-overwrite --disable-stripping --enable-widec --with-termlib --disable-database --with-fallbacks=xterm,xterm-256color,screen-256color,linux,vt100 --prefix=${DEPSDIR}
make -j4
make install.libs
install_license
Expand Down Expand Up @@ -329,8 +329,8 @@ function build_python () {
-DREADLINE_INCLUDE_PATH:PATH=${DEPSDIR}/include \
-DREADLINE_LIBRARY:FILEPATH=${DEPSDIR}/lib/libreadline.a \
-DUUID_LIBRARY:FILEPATH=${DEPSDIR}/lib/libuuid.a \
-DCURSES_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libncurses.a \
-DPANEL_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libpanel.a \
-DCURSES_LIBRARIES="${DEPSDIR}/lib/libncursesw.a;${DEPSDIR}/lib/libtinfow.a" \
-DPANEL_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libpanelw.a \
-DGDBM_INCLUDE_PATH:PATH=${DEPSDIR}/include \
-DGDBM_LIBRARY:FILEPATH=${DEPSDIR}/lib/libgdbm.a \
-DGDBM_COMPAT_LIBRARY:FILEPATH=${DEPSDIR}/lib/libgdbm_compat.a \
Expand Down
6 changes: 3 additions & 3 deletions scripts/build_solaris.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ cd ${BUILDDIR}

download_verify_extract ncurses-6.4.tar.gz
cd ncurses*
./configure --with-normal --without-shared --without-progs --enable-overwrite --disable-stripping --prefix=${DEPSDIR}
./configure --with-normal --without-shared --without-progs --enable-overwrite --disable-stripping --enable-widec --with-termlib --disable-database --with-fallbacks=xterm,xterm-256color,screen-256color,linux,vt100 --with-tic-path=/usr/bin/gtic --with-infocmp-path=/usr/bin/ginfocmp --prefix=${DEPSDIR}
gmake -j4
gmake install.libs
install_license
Expand Down Expand Up @@ -452,8 +452,8 @@ function build_python () {
-DLibFFI_LIBRARY:FILEPATH=${DEPSDIR}/lib/libffi.a \
-DREADLINE_INCLUDE_PATH:PATH=${DEPSDIR}/include \
-DREADLINE_LIBRARY:FILEPATH=${DEPSDIR}/lib/libreadline.a \
-DCURSES_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libncurses.a \
-DPANEL_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libpanel.a \
-DCURSES_LIBRARIES="${DEPSDIR}/lib/libncursesw.a;${DEPSDIR}/lib/libtinfow.a" \
-DPANEL_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libpanelw.a \
-DGDBM_INCLUDE_PATH:PATH=${DEPSDIR}/include \
-DGDBM_LIBRARY:FILEPATH=${DEPSDIR}/lib/libgdbm.a \
-DGDBM_COMPAT_LIBRARY:FILEPATH=${DEPSDIR}/lib/libgdbm_compat.a \
Expand Down

0 comments on commit 64ebfde

Please sign in to comment.