From 33c65cdc5b3213a494f56796fe20406a1201ccb5 Mon Sep 17 00:00:00 2001 From: hanez Date: Tue, 17 Nov 2026 05:01:56 +0100 Subject: [PATCH] Require Clang for package builds --- APKBUILD | 5 +++-- PKGBUILD | 5 +++-- README.md | 8 +++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/APKBUILD b/APKBUILD index a4fbff0..3a8808f 100644 --- a/APKBUILD +++ b/APKBUILD @@ -6,12 +6,13 @@ pkgdesc="Small persistent terminal multiplexer" url="https://codeberg.org/armin/murx" arch="all" license="Apache-2.0" +makedepends="clang" subpackages="$pkgname-doc" source="murx.c Makefile murx.1 README.md LICENSE" builddir="$srcdir" build() { - make CC="${CC:-cc}" CFLAGS="$CFLAGS -std=c99 -Wall -Wextra" + make CC=clang CFLAGS="$CFLAGS -std=c99 -Wall -Wextra" } check() { @@ -28,6 +29,6 @@ sha512sums=" efd4dd0bcfd3ef36b1e4b8285452690f684a29e7906c0ada7aa09f879143b998a6e9cb8ddc76eb861867f882c7cb7f5a1fb350ce102e67a632d8ea238eba9b65 murx.c 4f52ecfc78bb993f9bdbaa235f671fe54327497fa8e21517805a2696bea9f06d335e4da564d0019ec1fad86986c05bce90e4825dcebc2ef3c0bc66fb9a768030 Makefile 523ac85c9b789a7721c76e8f7691a1a8ab43d7fec2624f43b3850e5135451d94404d8711fa40422a67e9f13b7388470436ab06deb6ad7c87c7e72a37492ae617 murx.1 -b6595d86edb76ec4ef90a1b44dfc350543f501b1c5bd41dbd2fe5b479c57d871f83eff9021b0407bb8b791e410128c70c9c0772a9328cded90e67f70cc20b9d4 README.md +cf6f8e5804f3415d1107df1bb921764185076fd005fb25912a2b67a180bd61a5d28b0354299e59e3a399a95d4da3c8e645c8fb862cdf153df5daf92d439b7913 README.md 2fe33ba22c5f68e124904be594208f050be20f33d115f9a56f60cac93304102da32e6a7e78154e831d3704da7ca8bfefd7025e7b8901e65babcd83e7342f6382 LICENSE " diff --git a/PKGBUILD b/PKGBUILD index 673b1e2..1489fa0 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -7,18 +7,19 @@ arch=('x86_64' 'aarch64') url='https://codeberg.org/armin/murx' license=('Apache-2.0') depends=('glibc') +makedepends=('clang') source=('murx.c' 'Makefile' 'murx.1' 'README.md' 'LICENSE') sha256sums=( '921e2c446c2ba83192b883411bf2d9686da028374c8a10125086a97aa28e61f4' '1d77a97ff77ce6d876baef98e22b06cfa2109a4ae65cef8b75a91df4c02ad8ac' 'f07830b93f78674956a17b108738d52c3d3efd58f431dc29f137cc339d625ee5' - '8f658ba4ffc508e4fb3d267504d40e7fb9227189626a864a2cd644d3f8c976b0' + '664670a1ebba0e9ca7d41e84c95278deb28dc9e2e6010e86cc10ad5df797cfc7' '31c5556be4cdd9bf52bb55f18ead0c68a4f0e793c2c2dab0a2a2c6d92407d0d4' ) build() { cd "$srcdir" - make CC="${CC:-cc}" CFLAGS="$CFLAGS -std=c99 -Wall -Wextra" + make CC=clang CFLAGS="$CFLAGS -std=c99 -Wall -Wextra" } check() { diff --git a/README.md b/README.md index 9ef6655..507dab3 100644 --- a/README.md +++ b/README.md @@ -361,8 +361,8 @@ This is "very basic" by design: ## Build notes -Requires a C99 compiler and POSIX. Tested on macOS with clang; the code also -builds with gcc on Linux and with clang on FreeBSD. +Requires Clang and POSIX. Build with `make CC=clang`. GCC builds have known +runtime issues; use Clang even if GCC compiles the source successfully. ## Linux packages @@ -370,7 +370,9 @@ The root directory includes [APKBUILD](APKBUILD) for Alpine Linux and [PKGBUILD](PKGBUILD) for Arch Linux. Both build the local source files rather than downloading a release. Version `0.20261116` identifies an unreleased snapshot; update the version and release fields when packaging a newer snapshot. -The packages install under `/usr`, including the manual, README and license. +Both recipes declare Clang as a build dependency and explicitly compile with +`CC=clang`. The packages install under `/usr`, including the manual, README +and license. On Alpine, install `alpine-sdk`, configure your abuild signing key with `abuild-keygen -a -i`, and run as a regular user with abuild configured: