From 35aac4f06523ba6418df4d2e436fa27c18bd5b11 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sat, 10 Jan 2026 15:25:00 +0100 Subject: Windows CI builds are now linked against PDCursesMod v4.5.4 * Should fix scrolling in the Wincon port. CTRL modifiers are still "sticky" in WinGUI, though, even though it was supposed to be fixed long ago. * Also, there is now a Makefile to build/reproduce the freebsd14-sciteco and freebsd14-msys-sciteco containers via buildah. freebsd14-osx-sciteco and ubuntu22-appimage are still TODO. --- .fmsbw/10-freebsd14-msys-sciteco | 54 +++++++++++----------------------------- .fmsbw/20-freebsd14-osx-sciteco | 7 ++++-- .fmsbw/images/Makefile | 50 +++++++++++++++++++++++++++++++++++++ .fmsbw/images/msys-activate | 6 +++++ 4 files changed, 76 insertions(+), 41 deletions(-) create mode 100644 .fmsbw/images/Makefile create mode 100644 .fmsbw/images/msys-activate diff --git a/.fmsbw/10-freebsd14-msys-sciteco b/.fmsbw/10-freebsd14-msys-sciteco index 037ac66..d04593f 100755 --- a/.fmsbw/10-freebsd14-msys-sciteco +++ b/.fmsbw/10-freebsd14-msys-sciteco @@ -1,39 +1,5 @@ #!/usr/local/bin/bash set -ex -export ASSUME_ALWAYS_YES=yes - -# Already in freebsd14-sciteco -# TODO: Build this with buildah. -# Start with --network=host -#pkg update -#pkg install FreeBSD-clang FreeBSD-clibs-dev \ -# gmake pkgconf autoconf automake libtool \ -# glib gtk3 groff doxygen lowdown valgrind -# -#pkg install llvm21 gnugrep gmake coreutils gsed gawk git wget gnupg bash groff zip autoconf automake libtool python3 -#pkg remove FreeBSD-clang -#git clone https://github.com/HolyBlackCat/quasi-msys2.git /opt/quasi-msys2 -#cd /opt/quasi-msys2 -#ln -s /usr/local/bin/gpgv2 /usr/local/bin/gpgv -#ln -s /usr/local/bin/bash /bin/bash -#mkdir -p gnu-overrides -#ln -s /usr/local/bin/ggrep gnu-overrides/grep -#ln -s /usr/local/bin/gmake gnu-overrides/make -#ln -s /usr/local/bin/gsed gnu-overrides/sed -#ln -s /usr/local/bin/greadlink gnu-overrides/readlink -#ln -s /usr/local/bin/wine64 gnu-overrides/wine -#echo MINGW64 >msystem.txt -#cat >activate << EOF -#cd /opt/quasi-msys2 -#export PATH=`pwd`/gnu-overrides:$PATH -#export PKG_CONFIG=pkg-config -#set +ex -#. env/all.src -#set -ex -#EOF -#gmake install _autotools _gcc _libc++ _glib2 _pdcurses _gtk3 _librsvg -#ln -nfs "/opt/quasi-msys2/root/mingw64" /mingw64 -#pkg clean -a autoreconf -i mkdir build-freebsd @@ -75,7 +41,11 @@ cp ico/sciteco-48.png /opt/htdocs/graphics . /opt/quasi-msys2/activate cd /opt/build -export CURSES_CFLAGS=-I/mingw64/include/pdcurses/ +# NOTE: Sometimes the PDCursesMod MSYS upstream package is too old, +# so we also installed v4.5.4 into the container. +#export CURSES_CFLAGS=-I/mingw64/include/pdcurses/ +export CURSES_CFLAGS=-I/opt/PDCursesMod + # FIXME: glib on MinGW supports static linking but the gspawn # helper binaries are still linked dynamically, forcing us to ship # all DLLs anyway. Therefore it makes little sense to link SciTECO @@ -90,25 +60,31 @@ export LDFLAGS="-flto=thin -stdlib=libc++" # We cannot run Windows binaries automatically through Wine, # so we must still force cross-compilation with --host. +# There is a --with-launcher=wine64, but SciTECO is currently +# simply broken under Wine. #autoreconf -i mkdir build-wingui build-wincon cd build-wingui +# See above, we use a manually built PDCursesMod v4.5.4 +#export CURSES_LIBS="-lpdcurses_wingui -lgdi32 -lcomdlg32 -lwinmm" +export CURSES_LIBS="-L/opt/PDCursesMod/wingui -lpdcurses -lgdi32 -lcomdlg32 -lwinmm" ../configure --host=x86_64-w64-mingw32 \ --with-interface=pdcurses-gui --enable-html-docs --program-prefix=g \ --with-scitecodatadir=. \ - --disable-bootstrap \ - CURSES_LIBS="-lpdcurses_wingui -lgdi32 -lcomdlg32 -lwinmm" + --disable-bootstrap make make install-strip #make check TESTSUITEFLAGS="--verbose --color=never" cd ../build-wincon +# See above, we use a manually built PDCursesMod v4.5.4 +#export CURSES_LIBS="-lpdcurses_wincon -lgdi32 -lwinmm" +export CURSES_LIBS="-L/opt/PDCursesMod/wincon -lpdcurses -lgdi32 -lwinmm" ../configure --host=x86_64-w64-mingw32 \ --with-interface=pdcurses --enable-html-docs \ --with-scitecodatadir=. \ - --disable-bootstrap \ - CURSES_LIBS="-lpdcurses_wincon -lgdi32 -lwinmm" + --disable-bootstrap make make install-strip #make check TESTSUITEFLAGS="--verbose --color=never" diff --git a/.fmsbw/20-freebsd14-osx-sciteco b/.fmsbw/20-freebsd14-osx-sciteco index bef1cfb..5cbd49f 100755 --- a/.fmsbw/20-freebsd14-osx-sciteco +++ b/.fmsbw/20-freebsd14-osx-sciteco @@ -25,12 +25,14 @@ cd .. #UNATTENDED=1 ./build.sh #unset CPPFLAGS #export MACOSX_DEPLOYMENT_TARGET=10.13 -# FIXME: This is not unattended. Perhaps echo https://nue.de.packages.macports.org/macports/packages >target/macports/MIRROR +# FIXME: This is not unattended. +# Perhaps echo https://nue.de.packages.macports.org/macports/packages >target/macports/MIRROR # dylibbundler is available but can't be run naturally. +# FIXME: How to install variants, like the Quartz variant for Gtk3? #osxcross-macports install --static glib2-devel gtk3-devel # #pkg install cmake -#git clone https://github.com/auriamg/macdylibbundler.git /opt/macdylibbundler +#git clone --depth=1 https://github.com/auriamg/macdylibbundler.git /opt/macdylibbundler #cd /opt/macdylibbundler #cmake . #make @@ -68,6 +70,7 @@ cd .. # FIXME: Also build -arch arm64 and package with x86_64-apple-darwin25-lipo into universal binary. # x86_64-apple-darwin25-lipo -lipo -create -output sciteco x86_64/usr/local/bin/sciteco arm64/usr/local/bin/sciteco # TODO: Build Gtk version as well. +# Currently, we cannot install the Quartz variant. mkdir -p /opt/htdocs/downloads/nightly/ cp sciteco-curses_nightly_macos_x86_64.tar.gz /opt/htdocs/downloads/nightly/ diff --git a/.fmsbw/images/Makefile b/.fmsbw/images/Makefile new file mode 100644 index 0000000..74b54e5 --- /dev/null +++ b/.fmsbw/images/Makefile @@ -0,0 +1,50 @@ +# Don't build any image by default +all: + +# Base image for building SciTECO on FreeBSD. +freebsd14-sciteco: + buildah from --name $@-working --network=host quay.io/dougrabson/freebsd14.1-small + buildah config --env ASSUME_ALWAYS_YES=yes $@-working + buildah run $@-working pkg update + buildah run $@-working pkg install FreeBSD-clang FreeBSD-clibs-dev \ + gmake pkgconf autoconf automake libtool \ + glib gtk3 groff doxygen lowdown valgrind + buildah run $@-working pkg clean -a + buildah commit $@-working $@ + +freebsd14-msys-sciteco: + buildah from --name $@-working --network=host freebsd14-sciteco + buildah run $@-working pkg install llvm21 gnugrep gmake coreutils gsed gawk \ + git wget gnupg bash groff zip autoconf automake libtool python3 + buildah run $@-working pkg remove FreeBSD-clang + buildah run $@-working pkg clean -a + buildah run $@-working git clone --depth=1 https://github.com/HolyBlackCat/quasi-msys2.git /opt/quasi-msys2 + buildah config --workingdir /opt/quasi-msys2 $@-working + buildah run $@-working git checkout e41c4d0f7dde15031132348875d1d01c8d0ea857 + buildah run $@-working ln -s /usr/local/bin/gpgv2 /usr/local/bin/gpgv + buildah run $@-working ln -s /usr/local/bin/bash /bin/bash + buildah run $@-working mkdir -p gnu-overrides + buildah run $@-working ln -s /usr/local/bin/ggrep gnu-overrides/grep + buildah run $@-working ln -s /usr/local/bin/gmake gnu-overrides/make + buildah run $@-working ln -s /usr/local/bin/gsed gnu-overrides/sed + buildah run $@-working ln -s /usr/local/bin/greadlink gnu-overrides/readlink + buildah run $@-working ln -s /usr/local/bin/wine64 gnu-overrides/wine + buildah run $@-working echo MINGW64 '>msystem.txt' + buildah copy $@-working msys-activate activate + buildah run $@-working gmake install _autotools _gcc _libc++ _glib2 _pdcurses _gtk3 _librsvg + buildah run $@-working ln -nfs "/opt/quasi-msys2/root/mingw64" /mingw64 + # The upstream _pdcurses package is often too outdated, so we also build from sources. + buildah run $@-working git clone --depth=1 -b v4.5.4 https://github.com/Bill-Gray/PDCursesMod.git /opt/PDCursesMod + buildah run $@-working bash -c '. /opt/quasi-msys2/activate && gmake -j2 -C /opt/PDCursesMod/wincon CC=$CC AR=$AR' + buildah run $@-working bash -c '. /opt/quasi-msys2/activate && gmake -j2 -C /opt/PDCursesMod/wingui CC=$CC AR=$AR' + buildah commit $@-working $@ + +freebsd14-osx-sciteco: + false # TODO + +ubuntu22-appimage: + false # TODO + +# Remove all temporary containers +clean: + buildah rm --all diff --git a/.fmsbw/images/msys-activate b/.fmsbw/images/msys-activate new file mode 100644 index 0000000..655fcae --- /dev/null +++ b/.fmsbw/images/msys-activate @@ -0,0 +1,6 @@ +cd /opt/quasi-msys2 +export PATH=`pwd`/gnu-overrides:$PATH +export PKG_CONFIG=pkg-config +set +ex +. env/all.src +set -ex -- cgit v1.2.3