pantry/projects/invisible-island.net/ncurses/package.yml

109 lines
3 KiB
YAML
Raw Normal View History

2022-08-05 04:19:01 +03:00
distributable:
url: https://ftp.gnu.org/gnu/ncurses/ncurses-{{ version.raw }}.tar.gz
strip-components: 1
versions:
github: mirror/ncurses/tags
2022-09-23 16:54:00 +03:00
strip: /v/
2022-08-05 04:19:01 +03:00
build:
dependencies:
freedesktop.org/pkg-config: ^0.29
2023-10-23 22:12:46 +03:00
script:
2024-02-10 00:10:34 +03:00
#FIXME because our build infra is recursive
- |
if [ -d {{prefix}}/include ]; then
rm -rf {{prefix}}/include
fi
2023-10-23 22:12:46 +03:00
2024-02-10 00:10:34 +03:00
- |
mkdir -p $PCDIR
./configure $ARGS
make --jobs {{ hw.concurrency }} install
2024-02-10 00:10:34 +03:00
# fix up symlinks
- run: |
for lib in form menu ncurses panel curses++; do
for ii in $(find . -name lib${lib}w\*); do
# hopefully no new w's will be introduced
ln -sf $ii $(echo $ii | tr -d w)
done
2023-10-23 22:12:46 +03:00
done
2024-02-10 00:10:34 +03:00
working-directory: ${{prefix}}/lib
2024-02-10 00:10:34 +03:00
# things often expect either no namespace or namespace
- run: |
mv ncursesw/* .
rmdir ncursesw
ln -sf . ncursesw
working-directory: ${{prefix}}/include
2024-02-10 00:10:34 +03:00
# fix hardcoded paths
- |
sed -i.bak 's|{{prefix}}|\${pcfiledir}/../..|g' {{prefix}}/lib/pkgconfig/*.pc
rm {{prefix}}/lib/pkgconfig/*.bak
2024-02-10 00:10:34 +03:00
sed -i.bak 's|{{prefix}}|\$(dirname "\$0")/..|g' {{prefix}}/bin/ncursesw{{version.major}}-config
rm {{prefix}}/bin/ncursesw{{version.major}}-config.bak
2024-02-10 00:10:34 +03:00
# libtermcap and libtinfo are provided by ncurses and have the
# same api. Help some older packages to find these dependencies.
# https://bugs.centos.org/view.php?id=11423
# https://bugs.launchpad.net/ubuntu/+source/ncurses/+bug/259139
- run: |
ln -s libncurses.so libtermcap.so
ln -s libncursesw.so libtinfow.so
ln -s libncurses.so libtinfo.so
# ghc needs to find libtinfo.so.5, which is built from v6 on ubuntu 18.04...
ln -s libncurses.so libtinfo.so.5
ln -s libncurses.so libtinfo.so.{{version.major}}
ln -s libncursesw.so libtinfow.so.5
ln -s libncursesw.so libtinfow.so.{{version.major}}
working-directory: ${{prefix}}/lib
if: linux
2022-08-05 04:19:01 +03:00
env:
PCDIR: ${{prefix}}/lib/pkgconfig
ARGS:
- --prefix={{ prefix }}
- --enable-pc-files
- --enable-sigwinch
- --enable-widec
- --with-shared
- --with-cxx-shared
- --with-gpm=no
- --without-ada
- --with-pkg-config-libdir=$PCDIR
2022-12-11 18:10:19 +03:00
runtime:
env:
2023-10-26 04:24:27 +03:00
TERMINFO_DIRS: /usr/share/terminfo:{{prefix}}/share/terminfo
2022-12-11 18:10:19 +03:00
# ^^ we delegate to the system first since they may apply platform specific info
2022-08-05 04:19:01 +03:00
test:
dependencies:
2023-10-23 22:12:46 +03:00
github.com/tmux/tmux: ^3
freedesktop.org/pkg-config: ^0.29
2023-10-23 22:12:46 +03:00
script:
2024-02-10 00:10:34 +03:00
- |
ncursesw6-config --version | grep {{version.marketing}}
ncursesw6-config --terminfo-dirs | grep '{{prefix}}'
pkg-config --modversion ncursesw | grep {{version.marketing}}
pkg-config --libs ncursesw | grep '{{prefix}}'
2022-11-18 21:43:48 +03:00
2024-02-10 00:10:34 +03:00
# https://github.com/pkgxdev/pantry/issues/1658
- tmux -c ls
2023-10-23 22:12:46 +03:00
2022-11-18 21:43:48 +03:00
provides:
- bin/captoinfo
- bin/clear
- bin/infocmp
- bin/infotocap
- bin/ncursesw6-config
- bin/reset
- bin/tabs
- bin/tic
- bin/toe
- bin/tput
- bin/tset