diff options
| author | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-07-05 16:03:19 +0200 |
|---|---|---|
| committer | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-07-05 16:03:19 +0200 |
| commit | ad9809e1e3c0f914cb927f3619e9b328f5a5870d (patch) | |
| tree | acb55a2b7b51291c0c7196e9e90339139ea134a2 | |
| parent | 01d77dafb8fc4d40f8603e0d776b9b4b9283918d (diff) | |
gtk-broadway-run.sh is now used in all headless builds
* It's already used on home:rhaberkorn:sciteco:UNSTABLE (OBS).
We cannot introduce it in STABLE though until the next stable release
which will contain the gtk-broadway-run.sh script.
* The FreeBSD packaging is actually not tested yet.
The package version had been dumped to 2.6.0 since it definitely
won't work with v2.5.2 tarballs.
The v2.5.2_1 patches have consequently also been removed.
You can still find them in the bugzilla ticket (not merged into ports yet).
| -rw-r--r-- | debian/control | 2 | ||||
| -rwxr-xr-x | debian/rules | 13 | ||||
| -rw-r--r-- | freebsd/Makefile | 12 | ||||
| -rw-r--r-- | freebsd/files/opener.check-recovery.patch | 30 | ||||
| -rw-r--r-- | freebsd/files/sbrk.patch | 76 | ||||
| -rwxr-xr-x | freebsd/files/xvfb-run.sh | 118 | ||||
| -rwxr-xr-x | gtk-broadway-run.sh | 3 |
7 files changed, 14 insertions, 240 deletions
diff --git a/debian/control b/debian/control index 0237784..25952b6 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 10), dh-exec, dh-autoreconf, gcc (>= 4:8.1), g++ (>= 4:8.1), libglib2.0-dev (>= 2.44), ncurses-term, libncurses-dev, - libgtk-3-dev (>= 3.24), xvfb, xauth, + libgtk-3-dev (>= 3.24), libgtk-3-bin (>= 3.24), groff (>= 1.19.2) Standards-Version: 4.5.0 Homepage: https://sciteco.fmsbw.de/ diff --git a/debian/rules b/debian/rules index cd684aa..f601cc5 100755 --- a/debian/rules +++ b/debian/rules @@ -63,13 +63,16 @@ build-gtk-stamp: autoreconf-stamp --with-scitecodatadir=../share/sciteco # NOTE: Since the Gtk+ version of SciTECO is called during the build, # we need an XServer which may be missing on the build server. -# That's why we use xvfb. - xvfb-run -a dh_auto_build -Bbuild-gtk - xvfb-run -a dh_auto_test -Bbuild-gtk --no-parallel +# That's why we use the GTK broadway backend. + ./gtk-broadway-run.sh dh_auto_build -Bbuild-gtk + ./gtk-broadway-run.sh dh_auto_test -Bbuild-gtk --no-parallel touch $@ -install: - xvfb-run -a dh install -Bbuild-gtk -psciteco-gtk +install: build-gtk-stamp + # Workaround for debian/sciteco-gtk.install loosing the executable flag. + # debtransform (OBS) doesn't preserve it. + chmod +x debian/sciteco-gtk.install + ./gtk-broadway-run.sh dh install -Bbuild-gtk -psciteco-gtk dh install -Bbuild-curses -psciteco-curses -psciteco-common # NOTE: This skips the dh_install* commands of `dh binary-arch` diff --git a/freebsd/Makefile b/freebsd/Makefile index fd8e284..c1769e0 100644 --- a/freebsd/Makefile +++ b/freebsd/Makefile @@ -1,6 +1,5 @@ PORTNAME= sciteco -DISTVERSION= 2.5.2 -PORTREVISION= 1 +DISTVERSION= 2.6.0 CATEGORIES= editors textproc devel MASTER_SITES= https://sciteco.fmsbw.de/downloads/v${DISTVERSION}/ \ SOURCEFORGE/${PORTNAME}/v${DISTVERSION}/ @@ -17,13 +16,6 @@ FLAVOR?= ${FLAVORS:[1]} curses_PKGNAMESUFFIX= -curses gtk_PKGNAMESUFFIX= -gtk -# As SciTECO uses itself during the build process, -# it makes sense to compile it running under a dummy XServer. -# This is both faster and works in headless environments as well. -gtk_BUILD_DEPENDS= mcookie:devel/util-linux \ - xauth:x11/xauth \ - Xvfb:x11-servers/xorg-server@xvfb - USES= compiler:c11 gmake gnome groff pkgconfig # Only required because we patch configure.ac: USES+= autoreconf @@ -88,7 +80,7 @@ LTO_LDFLAGS= -flto=thin .include <bsd.port.pre.mk> .if ${FLAVOR} == gtk -MAKE_CMD= ${SH} ${FILESDIR}/xvfb-run.sh ${GMAKE} +MAKE_CMD= ./gtk-broadway-run.sh ${GMAKE} .endif post-install: diff --git a/freebsd/files/opener.check-recovery.patch b/freebsd/files/opener.check-recovery.patch deleted file mode 100644 index aef3c19..0000000 --- a/freebsd/files/opener.check-recovery.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 14b7d1fc5621c3251115ccf577beaabf8ab0eccc Mon Sep 17 00:00:00 2001 -From: Robin Haberkorn <rhaberkorn@fmsbw.de> -Date: Mon, 27 Apr 2026 18:48:54 +0200 -Subject: [PATCH] opener.check-recovery: don't pollute Q-register `_` - -This has been broken since v2.5.2. ---- - lib/opener.tes | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lib/opener.tes b/lib/opener.tes -index 8bcd896..66a97e7 100644 ---- a/lib/opener.tes -+++ b/lib/opener.tes -@@ -44,10 +44,10 @@ - *! - @[opener.check-recovery]{ - :Q*"= ' -- [* -+ [*[_ - EQ.f G* I# R - <-A"I 1; ' :R;> - I# - 1:EN*Q.f"S 2Detected recovery file "Q.f" ' -- ]* -+ ]_]* - } --- -2.53.0 - diff --git a/freebsd/files/sbrk.patch b/freebsd/files/sbrk.patch deleted file mode 100644 index 66b94aa..0000000 --- a/freebsd/files/sbrk.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 62177d06bd9d31242e67995d4e33a755a3447ca2 Mon Sep 17 00:00:00 2001 -From: Robin Haberkorn <rhaberkorn@fmsbw.de> -Date: Tue, 19 May 2026 21:21:52 +0400 -Subject: [PATCH] check for sbrk() even on UNIX - -* Turns out that not all UNIXes support sbrk(). - FreeBSD arm64 and riscv ports don't implement sbrk(). - It's also apparently not in POSIX - so other systems might also - be affected. - This needs to be passed on to dlmalloc. -* We now use DLMALLOC_CPPFLAGS instead of conditionals to pass - on flags to dlmalloc. -* Should be backported to the FreeBSD v2.5.2 package - to fix Poudriere fallout. ---- - configure.ac | 9 ++++++++- - contrib/dlmalloc/Makefile.am | 7 ++----- - 2 files changed, 10 insertions(+), 6 deletions(-) - -diff --git a/configure.ac b/configure.ac -index b5cac0b..43b4d1b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -18,10 +18,10 @@ AC_CANONICAL_BUILD - AC_CANONICAL_HOST - - AX_CHECK_ENABLE_DEBUG --AM_CONDITIONAL(DEBUG, [test x$ax_enable_debug != xno]) - if [[ x$ax_enable_debug = xno ]]; then - # glib does not look at NDEBUG - AC_DEFINE(G_DISABLE_ASSERT, 1, [Disable g_assert()]) -+ DLMALLOC_CPPFLAGS="$DLMALLOC_CPPFLAGS -DINSECURE=1" - fi - - # Use the user provided CXXFLAGS for Scintilla as well. -@@ -224,6 +224,13 @@ case $host in - ;; - esac - -+# Optional UNIX libc functions. -+# FreeBSD arm64 and riscv are missing sbrk(), which can be used by dlmalloc. -+AC_CHECK_FUNCS([sbrk], , [ -+ DLMALLOC_CPPFLAGS="$DLMALLOC_CPPFLAGS -DHAVE_MORECORE=0" -+]) -+AC_SUBST(DLMALLOC_CPPFLAGS) -+ - # - # Config options - # -diff --git a/contrib/dlmalloc/Makefile.am b/contrib/dlmalloc/Makefile.am -index 223ed13..73232d7 100644 ---- a/contrib/dlmalloc/Makefile.am -+++ b/contrib/dlmalloc/Makefile.am -@@ -1,6 +1,6 @@ - # Source: http://gee.cs.oswego.edu/dl/html/malloc.html - # --# FIXME: On FreeBSD, we might implement a compatible mremap() based on the BSD mremap() and pass -+# FIXME: On NetBSD, we might implement a compatible mremap() based on the NetBSD mremap() and pass - # in -DHAVE_MREMAP=1 -DMREMAP=mremap_bsd. We'll have to add a declaration to malloc.c or - # use -include mremap_bsd.h in CPPFLAGS. - # -@@ -8,10 +8,7 @@ - # for increased portability. There is also AC_LIBOBJ, but it's usually for defining sources of - # replacement libraries. - --AM_CPPFLAGS = -DNO_MALLINFO=1 -DNO_MALLOC_STATS=1 -DUSE_LOCKS=1 -DUSE_DL_PREFIX --if !DEBUG --AM_CPPFLAGS += -DINSECURE=1 --endif -+AM_CPPFLAGS = @DLMALLOC_CPPFLAGS@ -DNO_MALLINFO=1 -DNO_MALLOC_STATS=1 -DUSE_LOCKS=1 -DUSE_DL_PREFIX - - # FIXME: This optimization is still broken as of GCC v9.3.0. - # This is a known GCC bug, triggered by memset() in calloc(). --- -2.53.0 - diff --git a/freebsd/files/xvfb-run.sh b/freebsd/files/xvfb-run.sh deleted file mode 100755 index b4fd5a0..0000000 --- a/freebsd/files/xvfb-run.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh -# --- T2-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# T2 SDE: package/.../xorg-server/xvfb-run.sh -# Copyright (C) 2005 The T2 SDE Project -# Copyright (C) XXXX - 2005 Debian -# -# More information can be found in the files COPYING and README. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. A copy of the -# GNU General Public License can be found in the file COPYING. -# --- T2-COPYRIGHT-NOTE-END --- - -# $Id: xvfb-run 2166 2005-01-27 07:54:19Z branden $ -# from: http://necrotic.deadbeast.net/xsf/XFree86/trunk/debian/local/xvfb-run - -# This script starts an instance of Xvfb, the "fake" X server, runs a command -# with that server available, and kills the X server when done. The return -# value of the command becomes the return value of this script. -# -# If anyone is using this to build a Debian package, make sure the package -# Build-Depends on xvfb, xbase-clients, and xfonts-base. -# -# This script has been modified by Robin Haberkorn to remove dependencies on -# GNU `fmt` and `getopt` for BSD compatibility. - -set -e - -PROGNAME=xvfb-run -SERVERNUM=99 -AUTHFILE= -ERRORFILE=/dev/null -STARTWAIT=3 -XVFBARGS="-screen 0 640x480x8" -LISTENTCP="-nolisten tcp" -XAUTHPROTO=. - -# Display a message, wrapping lines at the terminal width. -message () { - echo "$PROGNAME: $*" | fmt -} - -# Display an error message. -error () { - message "error: $*" >&2 -} - -# Find a free server number by looking at .X*-lock files in /tmp. -find_free_servernum() { - # Sadly, the "local" keyword is not POSIX. Leave the next line commented in - # the hope Debian Policy eventually changes to allow it in /bin/sh scripts - # anyway. - #local i - - i=$SERVERNUM - while [ -f /tmp/.X$i-lock ]; do - i=$(($i + 1)) - done - echo $i -} - -SERVERNUM=$(find_free_servernum) - -if [ -z "$*" ]; then - error "need a command to run" - exit 2 -fi - -if ! which xauth >/dev/null; then - error "xauth command not found" - exit 3 -fi - -# If the user did not specify an X authorization file to use, set up a temporary -# directory to house one. -if [ -z "$AUTHFILE" ]; then - XVFB_RUN_TMPDIR="${TMPDIR:-/tmp}/$PROGNAME.$$" - if ! mkdir -p -m 700 "$XVFB_RUN_TMPDIR"; then - error "temporary directory $XVFB_RUN_TMPDIR already exists" - exit 4 - fi - AUTHFILE=$(mktemp -p "$XVFB_RUN_TMPDIR" Xauthority) -fi - -# Start Xvfb. -MCOOKIE=$(mcookie) -XAUTHORITY=$AUTHFILE xauth add ":$SERVERNUM" "$XAUTHPROTO" "$MCOOKIE" \ - >"$ERRORFILE" 2>&1 -XAUTHORITY=$AUTHFILE Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >"$ERRORFILE" \ - 2>&1 & -XVFBPID=$! -sleep "$STARTWAIT" - -# Start the command and save its exit status. -set +e -DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1 -RETVAL=$? -set -e - -# Kill Xvfb now that the command has exited. -kill $XVFBPID - -# Clean up. -XAUTHORITY=$AUTHFILE xauth remove ":$SERVERNUM" >"$ERRORFILE" 2>&1 -if [ -n "$XVFB_RUN_TMPDIR" ]; then - if ! rm -r "$XVFB_RUN_TMPDIR"; then - error "problem while cleaning up temporary directory" - exit 5 - fi -fi - -# Return the executed command's exit status. -exit $RETVAL - -# vim:set ai et sts=4 sw=4 tw=80: diff --git a/gtk-broadway-run.sh b/gtk-broadway-run.sh index 9b20f7b..b09cea4 100755 --- a/gtk-broadway-run.sh +++ b/gtk-broadway-run.sh @@ -4,8 +4,11 @@ # # This is meant as a more reliable replacement to xvfb-run # when building SciTECO on headless systems. +# # WARNING: This will block indefinitely when letting # SciTECO (or any Gtk app) start up to its UI. +# FIXME: Parallel invocations are not yet supported and +# I don't know if they could work everywhere (e.g. on FreeBSD). set -e export GDK_BACKEND=broadway |
