diff options
Diffstat (limited to 'freebsd')
| -rw-r--r-- | freebsd/Makefile | 8 | ||||
| -rw-r--r-- | freebsd/distinfo | 6 | ||||
| -rw-r--r-- | freebsd/files/opener.check-recovery.patch | 30 | ||||
| -rw-r--r-- | freebsd/files/sbrk.patch | 76 | ||||
| -rw-r--r-- | freebsd/pkg-plist | 1 |
5 files changed, 117 insertions, 4 deletions
diff --git a/freebsd/Makefile b/freebsd/Makefile index e18b7bc..fd8e284 100644 --- a/freebsd/Makefile +++ b/freebsd/Makefile @@ -1,5 +1,6 @@ PORTNAME= sciteco -DISTVERSION= 2.5.1 +DISTVERSION= 2.5.2 +PORTREVISION= 1 CATEGORIES= editors textproc devel MASTER_SITES= https://sciteco.fmsbw.de/downloads/v${DISTVERSION}/ \ SOURCEFORGE/${PORTNAME}/v${DISTVERSION}/ @@ -24,12 +25,17 @@ gtk_BUILD_DEPENDS= mcookie:devel/util-linux \ Xvfb:x11-servers/xorg-server@xvfb USES= compiler:c11 gmake gnome groff pkgconfig +# Only required because we patch configure.ac: +USES+= autoreconf USE_GNOME= glib20 GNU_CONFIGURE= yes CONFIGURE_ARGS= CONFIGURE_OUTSOURCE= yes +EXTRA_PATCHES= ${FILESDIR}/opener.check-recovery.patch:-p1 \ + ${FILESDIR}/sbrk.patch:-p1 + MAKEFILE= GNUmakefile TEST_TARGET= check diff --git a/freebsd/distinfo b/freebsd/distinfo index 65d7d37..9396b55 100644 --- a/freebsd/distinfo +++ b/freebsd/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1768082190 -SHA256 (sciteco-2.5.1.tar.gz) = cc99c6855f844f0514f2ed4879bf6a02f11eb489a3b77d88ad7f0bcfe1379fbf -SIZE (sciteco-2.5.1.tar.gz) = 4118025 +TIMESTAMP = 1776638070 +SHA256 (sciteco-2.5.2.tar.gz) = 94149fa3371e3adff723ae933502b5983804c4e06a681c6d00b0af19c439a978 +SIZE (sciteco-2.5.2.tar.gz) = 4113973 diff --git a/freebsd/files/opener.check-recovery.patch b/freebsd/files/opener.check-recovery.patch new file mode 100644 index 0000000..aef3c19 --- /dev/null +++ b/freebsd/files/opener.check-recovery.patch @@ -0,0 +1,30 @@ +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 new file mode 100644 index 0000000..66b94aa --- /dev/null +++ b/freebsd/files/sbrk.patch @@ -0,0 +1,76 @@ +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/pkg-plist b/freebsd/pkg-plist index ab74145..dd3e7cb 100644 --- a/freebsd/pkg-plist +++ b/freebsd/pkg-plist @@ -13,6 +13,7 @@ share/man/man7/%%PROGRAM_PREFIX%%sciteco.7.gz %%DATADIR%%/lib/getopt.tes %%DATADIR%%/lib/lexer.tes %%DATADIR%%/lib/repl.tes +%%DATADIR%%/lib/tank.tes %%DATADIR%%/lib/tecat.tes %%LEXILLA%%%%DATADIR%%/lib/lexers/abaqus.tes %%LEXILLA%%%%DATADIR%%/lib/lexers/ada.tes |
