Don’t set TERMINFO

Refs #1658
This commit is contained in:
Max Howell 2023-10-23 15:12:46 -04:00
parent 5575c5d788
commit 690793792f
2 changed files with 59 additions and 31 deletions

View file

@ -26,6 +26,10 @@ $ pkg build
# ^^ needs a zero permissions GITHUB_TOKEN to use the GitHub API
# either set `GITHUB_TOKEN` or run `gh auth login`
$ pkgx yq .provides <projects/$(pkg status | tr -d '[:space:]')/package.yml
- bin/foo
# ^^ purely demonstrative for the next step
$ foo
# ^^ anything in the `provides:` key will now run
@ -39,21 +43,17 @@ $ gh pr create
```
> * `pkg build` and `pkg test` take a `-L` flag to run in a Linux Docker container
> * All commands take an optional pkg-spec eg. `pkg build zlib.net^1.1`
> * All commands take an optional pkg-spec eg. `pkg build node@19`
While inside the pantry `dev` environment you can run commands from any built
packages provided you specified their `provides:` key.
## BrewKit
We use a special package called [`brewkit`] to build packages both here and
in CI/CD. `brewkit` provides the `pkg` command.
> We use a special package called [`brewkit`] to build packages both here and
> in CI/CD. `brewkit` provides the `pkg` command.
## GitHub Codespaces
`pantry` also works in GitHub Codespaces. The default configuration
provides with the repository will install/update `pkgx` at the time
you attach, so you should be able to quickly work on or test packages
provided with the repository will install/update `pkgx` at the time
you attach, so you should be able to quickly work on test packages
in a remote linux environment (or work from a device with just a web browser).
## Packaging Guide
@ -65,19 +65,29 @@ For other assistance, start a [discussion].
The best way to figure out solutions for your problems is to read other
examples from the pantry.
## After Your Contribution
# After Your Contribution
We build “bottles” (tard binaries) and upload them to our CDN. Thus your
contribution will be available at merge-time + build-time. `pkgx` should
contribution will be available at merge-time + build-time + CDN distribution
time.
`pkgx` should
automatically sync the pantry to your local machine if you ask for something
it doesnt know about, but in the case where that fails do a `pkgx --sync`
first.
The pantry automatically builds new releases of packages *as soon as they are
released* (usually starting the builds within seconds). There is no need to
submit PRs for updates.
> The pantry automatically builds new releases of packages *as soon as they are
> released* (usually starting the builds within seconds). There is no need to
> submit PRs for updates.
## Working on Other Peoples Pull Requests
Note that while in the pantry `dev` environment you can use your new package
if you built it. However this will not work outside the pantry `dev` unless
you either:
1. You set `PKGX_PANTRY_PATH`
2. Get your PR merged!
# Working on Other Peoples Pull Requests
Packaging can be fiddly so we all pitch in. If you want to help someone else
with their pull request then you can use GitHubs CLI:

View file

@ -6,30 +6,42 @@ versions:
github: mirror/ncurses/tags
strip: /v/
build:
dependencies:
freedesktop.org/pkg-config: ^0.29
script: |
script:
#FIXME because our build infra is recursive
- |
if [ -d {{prefix}}/include ]; then
rm -rf {{prefix}}/include
fi
- |
mkdir -p $PCDIR
./configure $ARGS
make --jobs {{ hw.concurrency }} install
# fix up symlinks
cd {{prefix}}/lib
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)
# 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
done
done
working-directory: ${{prefix}}/lib
# things often expect either no namespace or namespace
cd ../include
mv ncursesw/* .
rmdir ncursesw
ln -sf . ncursesw
# things often expect either no namespace or namespace
- run: |
mv ncursesw/* .
rmdir ncursesw
ln -sf . ncursesw
working-directory: ${{prefix}}/include
# fix hardcoded paths
# fix hardcoded paths
- |
sed -i.bak 's|{{prefix}}|\${pcfiledir}/../..|g' {{prefix}}/lib/pkgconfig/*.pc
rm {{prefix}}/lib/pkgconfig/*.bak
@ -48,21 +60,27 @@ build:
- --with-gpm=no
- --without-ada
- --with-pkg-config-libdir=$PCDIR
- --with-default-terminfo-dir=/usr/share/terminfo # or breaks on macOS
runtime:
env:
TERMINFO: /usr/share/terminfo:{{prefix}}/share/terminfo
TERMINFO_DIRS: ${{prefix}}/share/terminfo
# ^^ we delegate to the system first since they may apply platform specific info
test:
dependencies:
github.com/tmux/tmux: ^3
freedesktop.org/pkg-config: ^0.29
script: |
script:
- |
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}}'
# https://github.com/pkgxdev/pantry/issues/1658
- tmux -c ls
provides:
- bin/captoinfo
- bin/clear