Skip to content

Commit 7510377

Browse files
committed
oksh: link ncurses for >= 7.9
oksh 7.9 dropped the NO_CURSES build guard: the screen-clear code is now guarded by #ifndef SMALL (was #if !defined(SMALL) && !defined(NO_CURSES)) and it calls initcurses()/setupterm(), so a --disable-curses build fails with emacs.c: 'ERR' undeclared. Gate versions >= 7.9 to build and link the reusable static musl ncurses (common/ncurses.sh, as zsh does) and configure without --disable-curses; versions <= 7.8 keep the exact --disable-curses path so their committed checksums stay valid. Built and probed on shvr-toolchain:probe-amd64 with CI paths: 7.9 builds, runs, and reproduces its checksum; a control rebuild of 7.8 still matches its committed checksum bit-for-bit. Promote 7.9 into versions/oksh.current (7.9/7.8), add its source + build checksums, and regenerate the .github matrix.
1 parent a90e686 commit 7510377

7 files changed

Lines changed: 44 additions & 5 deletions

File tree

.github/actions/downloads/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,11 @@ runs:
637637
shvr_shell: mksh
638638
shvr_version: "R30"
639639
cache_path: "mksh/R30"
640+
- uses: ./.github/actions/single-download
641+
with:
642+
shvr_shell: oksh
643+
shvr_version: "7.9"
644+
cache_path: "oksh/7.9"
640645
- uses: ./.github/actions/single-download
641646
with:
642647
shvr_shell: oksh

.github/workflows/docker.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,10 @@ jobs:
701701
shell: mksh
702702
version: "R30"
703703
cache_path: "mksh/R30"
704+
- target: oksh_7.9
705+
shell: oksh
706+
version: "7.9"
707+
cache_path: "oksh/7.9"
704708
- target: oksh_7.8
705709
shell: oksh
706710
version: "7.8"
@@ -1039,8 +1043,8 @@ jobs:
10391043
loksh_7.8
10401044
mksh_R59c
10411045
mksh_R58
1046+
oksh_7.9
10421047
oksh_7.8
1043-
oksh_7.7
10441048
osh_0.37.0
10451049
osh_0.36.0
10461050
posh_0.14.5
@@ -1180,6 +1184,7 @@ jobs:
11801184
mksh_R32
11811185
mksh_R31d
11821186
mksh_R30
1187+
oksh_7.9
11831188
oksh_7.8
11841189
oksh_7.7
11851190
oksh_7.6
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d17184677ba7fb40fdf26219164254210e1574a66e9fa44f952616328f038295 oksh
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
51b2d92515950c959dbf24f6fc33336db8c0526c2a50fee4ca598a18a6114a49 7.9.tar.gz

variants/oksh.sh

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44
# SPDX-License-Identifier: ISC
55

66
. "${SHVR_DIR_SELF}/common/musl-cross-make.sh"
7+
. "${SHVR_DIR_SELF}/common/ncurses.sh"
8+
9+
# oksh >= 7.9 dropped the NO_CURSES build guard and unconditionally needs a
10+
# curses library, so those versions link our static musl ncurses instead of
11+
# building with --disable-curses. Requires shvr_versioninfo_oksh to have run.
12+
shvr_oksh_needs_curses ()
13+
{
14+
test "$version_major" -gt 7 ||
15+
{ test "$version_major" -eq 7 && test "$version_minor" -ge 9; }
16+
}
717

818
shvr_static_oksh ()
919
{
@@ -61,6 +71,11 @@ shvr_download_oksh ()
6171
then
6272
shvr_fetch "https://github.com/ibara/oksh/releases/download/oksh-$version/oksh-$version.tar.gz" "${build_srcdir}.tar.gz"
6373
fi
74+
75+
if shvr_oksh_needs_curses
76+
then
77+
shvr_download_ncurses
78+
fi
6479
}
6580

6681
shvr_build_oksh ()
@@ -92,9 +107,20 @@ shvr_build_oksh ()
92107
export CFLAGS="-fcommon -frandom-seed=1"
93108
fi
94109

95-
./configure \
96-
--disable-curses \
97-
--prefix="${SHVR_DIR_OUT}/oksh_$version"
110+
if shvr_oksh_needs_curses
111+
then
112+
shvr_build_ncurses
113+
cd "${build_srcdir}"
114+
export CFLAGS="${CFLAGS} $(shvr_ncurses_cflags)"
115+
export LDFLAGS="${LDFLAGS} $(shvr_ncurses_ldflags)"
116+
117+
./configure \
118+
--prefix="${SHVR_DIR_OUT}/oksh_$version"
119+
else
120+
./configure \
121+
--disable-curses \
122+
--prefix="${SHVR_DIR_OUT}/oksh_$version"
123+
fi
98124

99125
make
100126

versions/oksh.all

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
7.9
12
7.8
23
7.7
34
7.6

versions/oksh.current

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1+
7.9
12
7.8
2-
7.7

0 commit comments

Comments
 (0)