Fri May 10 19:08:43 2024 UTC (12d)
devel/libgit2: Fix build on NetBSD/aarch64

The package uses alloca(3), which is incompatible with -std=c99. Use -std=gnu99 instead.


(pho)
diff -r1.78 -r1.79 pkgsrc/devel/libgit2/Makefile

cvs diff -r1.78 -r1.79 pkgsrc/devel/libgit2/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/libgit2/Makefile 2024/05/06 06:22:09 1.78
+++ pkgsrc/devel/libgit2/Makefile 2024/05/10 19:08:43 1.79
@@ -1,30 +1,30 @@ @@ -1,30 +1,30 @@
1# $NetBSD: Makefile,v 1.78 2024/05/06 06:22:09 wiz Exp $ 1# $NetBSD: Makefile,v 1.79 2024/05/10 19:08:43 pho Exp $
2 2
3DISTNAME= libgit2-1.8.0 3DISTNAME= libgit2-1.8.0
4CATEGORIES= devel 4CATEGORIES= devel
5MASTER_SITES= ${MASTER_SITE_GITHUB:=libgit2/} 5MASTER_SITES= ${MASTER_SITE_GITHUB:=libgit2/}
6GITHUB_TAG= v${PKGVERSION_NOREV} 6GITHUB_TAG= v${PKGVERSION_NOREV}
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= https://libgit2.org/ 9HOMEPAGE= https://libgit2.org/
10COMMENT= Portable, pure C implementation of the Git core methods 10COMMENT= Portable, pure C implementation of the Git core methods
11LICENSE= gnu-gpl-v2 # linking exception (linking allowed in more ways) 11LICENSE= gnu-gpl-v2 # linking exception (linking allowed in more ways)
12 12
13USE_LANGUAGES= c 13USE_LANGUAGES= c
14USE_TOOLS+= pkg-config 14USE_TOOLS+= pkg-config
15 15
16USE_CC_FEATURES+= c99 16USE_CC_FEATURES+= c99
17FORCE_C_STD= c99 17FORCE_C_STD= gnu99 # src/cli/opt.c uses alloca(3)
18 18
19CMAKE_ARGS+= -DREGEX_BACKEND="pcre2" 19CMAKE_ARGS+= -DREGEX_BACKEND="pcre2"
20 20
21PKGCONFIG_OVERRIDE+= ${CMAKE_BUILD_DIR}/libgit2.pc 21PKGCONFIG_OVERRIDE+= ${CMAKE_BUILD_DIR}/libgit2.pc
22PKGCONFIG_OVERRIDE_STAGE= pre-install 22PKGCONFIG_OVERRIDE_STAGE= pre-install
23 23
24BUILDLINK_TRANSFORM+= rm:-Werror 24BUILDLINK_TRANSFORM+= rm:-Werror
25 25
26# In some environments, two tests might fail with permission problems 26# In some environments, two tests might fail with permission problems
27# https://github.com/libgit2/libgit2/issues/6647 27# https://github.com/libgit2/libgit2/issues/6647
28do-test: 28do-test:
29 cd ${WRKSRC}/${CMAKE_BUILD_DIR} && ctest 29 cd ${WRKSRC}/${CMAKE_BUILD_DIR} && ctest
30 30