git: ad1e41007a66 - main - lang/scm: try unbreaking on the architectures without sbrk(2)

From: Mikhail Teterin <mi_at_FreeBSD.org>
Date: Thu, 04 Jan 2024 21:27:07 UTC
The branch main has been updated by mi:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ad1e41007a66f02a4bb3f3de46db0bcae7bb1a99

commit ad1e41007a66f02a4bb3f3de46db0bcae7bb1a99
Author:     Mikhail Teterin <mi@FreeBSD.org>
AuthorDate: 2024-01-04 21:25:26 +0000
Commit:     Mikhail Teterin <mi@FreeBSD.org>
CommitDate: 2024-01-04 21:25:26 +0000

    lang/scm: try unbreaking on the architectures without sbrk(2)
    
    Upstream's code seems to have special-handling for such platforms.
---
 lang/scm/Makefile | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lang/scm/Makefile b/lang/scm/Makefile
index fb91abd3116d..528b8d5298ca 100644
--- a/lang/scm/Makefile
+++ b/lang/scm/Makefile
@@ -13,14 +13,11 @@ WWW=		https://people.csail.mit.edu/jaffer/SCM
 LICENSE=	LGPL3+
 LICENSE_FILES=	${WRKSRC}/COPYING.LESSER
 
-BROKEN_aarch64=		fails to link: missing sbrk
-BROKEN_riscv64=		fails to link: missing sbrk
+LIB_DEPENDS=	libgnuregex.so:devel/libgnuregex
 
-LIB_DEPENDS=	libgnuregex.so.[5-9]:devel/libgnuregex
+USES=		readline zip
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
-
-USES=		readline zip
 HAS_CONFIGURE=	yes
 CONFIGURE_ENV=	--prefix=${PREFIX}
 MAKE_JOBS_UNSAFE=	yes
@@ -61,6 +58,10 @@ SCM_MODULES_X11=x.so
 USES+=		compiler:gcc-c++11-lib
 .endif
 
+.if ${ARCH} == aarch64 || ${ARCH} == riscv64
+CFLAGS+=	-DLACK_SBRK
+.endif
+
 .include <bsd.port.pre.mk>
 
 .if ${PORT_OPTIONS:MX11}