testing/libtsm: fix build with gcc 14

This commit is contained in:
mio 2024-09-25 03:26:58 +00:00 committed by Patrycja Rosa
parent 9890e5537c
commit 0a0a2cff8f
2 changed files with 26 additions and 2 deletions
testing/libtsm

View file

@ -2,7 +2,7 @@
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=libtsm
pkgver=4.0.2
pkgrel=0
pkgrel=1
pkgdesc="Terminal-emulator State Machine"
url="https://github.com/Aetf/libtsm"
arch="all"
@ -10,7 +10,9 @@ license="MIT AND BSD-2-Clause"
makedepends="cmake samurai"
checkdepends="check-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/Aetf/libtsm/archive/refs/tags/v$pkgver.tar.gz"
source="$pkgname-$pkgver.tar.gz::https://github.com/Aetf/libtsm/archive/refs/tags/v$pkgver.tar.gz
gcc14.patch
"
build() {
cmake -B build -G Ninja -Wno-dev \
@ -30,4 +32,5 @@ package() {
sha512sums="
58eb955012fd154b7c165d799d0f80c9a71a504481e78471103fd299f2e73f3b7d89487387166895a9a5996165344335baa56f0550317caaa2eec6b0bad55e59 libtsm-4.0.2.tar.gz
6a5cb69f7a864e1705d644945a24cd5e13d2b0d43237f7dda0b55faf619918d982ea861445096420285bb7cdac913d8bd52af8901c03a3ee731e397551c4d887 gcc14.patch
"

View file

@ -0,0 +1,21 @@
Source: https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/libtsm/files/libtsm-clang16-static_assert-fix.patch
Fix -Wimplicit-function-declaration error with gcc 14.
```
/home/buildozer/aports/testing/libtsm/src/libtsm-4.0.2/src/shared/shl-macro.h:167:30: error: implicit declaration of function 'static_assert' [-Wimplicit-function-declaration]
167 | #define shl_assert_cc(_expr) static_assert(_expr, #_expr)
| ^~~~~~~~~~~~~
```
--
Bug: https://bugs.gentoo.org/895052
--- a/cmake/CompileOptions.cmake
+++ b/cmake/CompileOptions.cmake
@@ -1,5 +1,5 @@
# Set compiler flags
-set(CMAKE_C_STANDARD 99)
+set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
# analogous to AC_USE_SYSTEM_EXTENSIONS in configure.ac