diff options
-rwxr-xr-x | .fmsbw/10-freebsd14-msys-sciteco | 120 | ||||
-rwxr-xr-x | .fmsbw/10-freebsd14-sciteco | 34 |
2 files changed, 120 insertions, 34 deletions
diff --git a/.fmsbw/10-freebsd14-msys-sciteco b/.fmsbw/10-freebsd14-msys-sciteco new file mode 100755 index 0000000..b3626c6 --- /dev/null +++ b/.fmsbw/10-freebsd14-msys-sciteco @@ -0,0 +1,120 @@ +#!/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 lowdown valgrind +# +#pkg install llvm20 gnugrep gmake coreutils gsed git wget gnupg bash groff zip autoconf automake libtool +#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/clang20 gnu-overrides/clang +# ln -s /usr/local/bin/clang++20 gnu-overrides/clang++ +# ln -s /usr/local/bin/llvm-windres20 gnu-overrides/llvm-windres +# 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 +#echo MINGW64 >msystem.txt +#echo 'cd /opt/quasi-msys2' >activate +#echo 'export PATH=`pwd`/gnu-overrides:$PATH' >>activate +#echo '. env/all.src' >>activate +#gmake install _autotools _gcc _glib2 _pdcurses _gtk3 _librsvg +#ln -nfs "/opt/quasi-msys2/root/mingw64" /mingw64 +#pkg clean -a + +autoreconf -i +mkdir build-freebsd +cd build-freebsd +../configure --with-interface=ncurses --enable-debug --enable-html-docs +gmake + +# NOTE: The test suite must be run in verbose mode because if it fails +# we won't be able to analyze testsuite.log. +gmake check TESTSUITEFLAGS="--verbose --color=never --valgrind" +# Includes a second test suite run, but without Valgrind. +# This is good since we had to exclude several test cases when running +# under CI with --valgrind. +gmake distcheck + +gmake install + +# Build and deploy website +cd ../www +sciteco -m build.tes +cp *.html /opt/htdocs/ +cd .. +cp ico/sciteco.ico /opt/htdocs/graphics +cp ico/sciteco-48.png /opt/htdocs/graphics + +# TODO: Should we also distribute FreeBSD binaries? + +# FIXME: This should be a separate job but currently we need the +# boostrapping with the FreeBSD version of SciTECO. +# Theoretically, we can also run SciTECO under Wine, +# but I am not sure how to do this by default since +# FreeBSD does not have binfmt_misc. +# Perhaps we will have to add build system support. +# Activate MSYS environment +. /opt/quasi-msys2/activate +cd /opt/build + +export CURSES_CFLAGS=-I/mingw64/include/pdcurses/ +# 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 +# itself statically - it only wastes a few MB. +# You will also have to add --enable-static-executables. +# The additional Windows libraries are for PDCursesMod/WinGUI: +# LIBGLIB_LIBS: -lglib-2.0 -lintl -liconv -lpcre -lole32 -lws2_32 -luuid +# FIXME: Once there is an --enable-lto, we should use that. +#CFLAGS: -O3 -flto -DGLIB_STATIC_COMPILATION +export CFLAGS="-O3 -flto" +export CXXFLAGS="-O3 -flto" +export LDFLAGS="-flto" + +#autoreconf -i +mkdir build-wingui build-wincon +cd build-wingui +../configure --with-interface=pdcurses-gui --enable-html-docs --program-prefix=g \ + --with-scitecodatadir=. \ + --disable-bootstrap \ + CURSES_LIBS="-lpdcurses_wingui -lgdi32 -lcomdlg32 -lwinmm" +make +make install-strip +#make check TESTSUITEFLAGS="--verbose --color=never" + +cd ../build-wincon +../configure --with-interface=pdcurses --enable-html-docs \ + --with-scitecodatadir=. \ + --disable-bootstrap \ + CURSES_LIBS="-lpdcurses_wincon -lgdi32 -lwinmm" +make +make install-strip +#make check TESTSUITEFLAGS="--verbose --color=never" + +cd .. +mkdir temp-bin/ +cd temp-bin/ +cp -r /mingw64/bin/{gsciteco.exe,sciteco.exe,grosciteco.tes,tedoc.tes} ./ +# datadir is relative to bindir +cp -r /mingw64/bin/{lib,*.tmac} ./ +cp /mingw64/bin/fallback.teco_ini .teco_ini +cp -r /mingw64/share/doc/sciteco/* ./ +cp ../COPYING ../ChangeLog ./ +cp /mingw64/bin/gspawn-win64-helper*.exe ./ +# Collect DLLs for all included binaries +for f in *.exe; do python3.11 ../contrib/mingw-bundledlls --copy $f; done +zip -9 -r ../sciteco-pdcurses_nightly_win64.zip . +cd .. + +mkdir -p /opt/htdocs/downloads/ci/ +cp sciteco-pdcurses_nightly_win64.zip /opt/htdocs/downloads/ci/ + +# TODO: Windows Gtk builds diff --git a/.fmsbw/10-freebsd14-sciteco b/.fmsbw/10-freebsd14-sciteco deleted file mode 100755 index 7ee77c5..0000000 --- a/.fmsbw/10-freebsd14-sciteco +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -set -ex -export ASSUME_ALWAYS_YES=yes - -# Already in freebsd14-sciteco -# TODO: Build this with buildah. -#pkg update -#pkg install FreeBSD-clang FreeBSD-clibs-dev \ -# gmake pkgconf autoconf automake libtool \ -# glib gtk3 groff lowdown valgrind - -autoreconf -i -./configure --with-interface=ncurses --enable-debug --enable-html-docs -gmake - -# NOTE: The test suite must be run in verbose mode because if it fails -# we won't be able to analyze testsuite.log. -gmake check TESTSUITEFLAGS="--verbose --color=never --valgrind" -# Includes a second test suite run, but without Valgrind. -# This is good since we had to exclude several test cases when running -# under CI with --valgrind. -gmake distcheck - -gmake install - -# Build and deploy website -cd www -sciteco -m build.tes -cp *.html /opt/htdocs/ -cd .. -cp ico/sciteco.ico /opt/htdocs/graphics -cp ico/sciteco-48.png /opt/htdocs/graphics - -# TODO: Should we also distribute FreeBSD binaries? |