From 198bbb22782523af529b73737a2f538719d1943a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asger=20Geel=20Weirs=C3=B8e?= Date: Wed, 30 Sep 2026 21:59:59 +0200 Subject: [PATCH] Build the PAM module on macOS (0.10.1) Cargo names a cdylib .dylib on macOS, so copying libahfail_pam.so out of the target directory failed there, as the first real macOS build in the Homebrew tap's Actions showed. The installed name stays .so. Claude-Session: https://claude.ai/code/session_012LCTmU2ewo8tnM1dByYAoG --- Cargo.lock | 2 +- crates/ahfail/Cargo.toml | 2 +- meson.build | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a20f69f..08ec019 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,7 +10,7 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "ahfail" -version = "0.10.0" +version = "0.10.1" dependencies = [ "ahfail-ui", "cc", diff --git a/crates/ahfail/Cargo.toml b/crates/ahfail/Cargo.toml index 0aa6bd9..8976d76 100644 --- a/crates/ahfail/Cargo.toml +++ b/crates/ahfail/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ahfail" -version = "0.10.0" +version = "0.10.1" edition = "2021" description = "Screen locker that says ah ah ah when you get the password wrong" license = "AGPL-3.0-only" diff --git a/meson.build b/meson.build index 43b5a98..c1c3922 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'ahfail', ['c', 'rust'], - version: '0.10.0', + version: '0.10.1', meson_version: '>=1.3.0', default_options: ['warning_level=3', 'c_std=c11'] ) @@ -36,8 +36,11 @@ is_linux = host_machine.system() == 'linux' cargo_pkgs = '-p ahfail-gtklock -p ahfail-pam -p ahfail-display' + (is_linux ? ' -p ahfail' : '') cargo_outputs = ['libahfail_module.a', 'libahfail_pam.so', 'ahfail-display'] + (is_linux ? ['ahfail'] : []) cargo_install_dirs = [false, get_option('libdir') / 'ahfail', get_option('libdir') / 'ahfail'] + (is_linux ? [get_option('bindir')] : []) +# Cargo names a cdylib .dylib on macOS. The installed name stays +# libahfail_pam.so: PAM loads the module by path, whatever the extension. +pam_built = host_machine.system() == 'darwin' ? 'libahfail_pam.dylib' : 'libahfail_pam.so' cargo_copy = (' && cp "@OUTDIR@/target/release/libahfail_module.a" "@OUTPUT0@"' - + ' && cp "@OUTDIR@/target/release/libahfail_pam.so" "@OUTPUT1@"' + + ' && cp "@OUTDIR@/target/release/' + pam_built + '" "@OUTPUT1@"' + ' && cp "@OUTDIR@/target/release/ahfail-display" "@OUTPUT2@"' + (is_linux ? ' && cp "@OUTDIR@/target/release/ahfail" "@OUTPUT3@"' : ''))