fix: noconfirm auto-selects first AUR match

This commit is contained in:
2026-05-08 11:01:02 +01:00
parent d39cdc3fd9
commit 153cca6132
8056 changed files with 1983098 additions and 779 deletions
@@ -0,0 +1,6 @@
#include <stdio.h>
#include "lib.h"
void c_func(void) {
printf("This is a " MODE " C library\n");
}
@@ -0,0 +1,22 @@
#pragma once
#if defined _WIN32 || defined __CYGWIN__
#if defined BUILDING_ADDER
#define DLL_PUBLIC __declspec(dllexport)
#else
#define DLL_PUBLIC __declspec(dllimport)
#endif
#else
#if defined __GNUC__
#if defined BUILDING_ADDER
#define DLL_PUBLIC __attribute__ ((visibility("default")))
#else
#define DLL_PUBLIC
#endif
#else
#pragma message("Compiler does not support symbol visibility.")
#define DLL_PUBLIC
#endif
#endif
DLL_PUBLIC void c_func(void);
@@ -0,0 +1,9 @@
extern "C" {
fn c_func();
}
fn main() {
unsafe {
c_func();
}
}
@@ -0,0 +1,18 @@
project('internal dependencies', 'c', 'rust')
test_prog = find_program('test.py')
static = static_library('static', 'lib.c', c_args : '-DMODE="static"')
# Add some -I compiler arguments to make sure they're not passed to the Rust
# compiler when handling the dependency.
static_dep = declare_dependency(link_with : static, compile_args : ['-Idoesnotexist'])
exe = executable('static', 'main.rs', dependencies : static_dep)
test('static linkage', test_prog, args : [exe, 'This is a static C library'])
# Shared linkage with rust doesn't work on macOS with meson, yet
if host_machine.system() != 'darwin'
shared = shared_library('shared', 'lib.c', c_args : '-DMODE="shared"')
shared_dep = declare_dependency(link_with : shared, compile_args : ['-Idoesnotexist'])
exe = executable('shared', 'main.rs', dependencies : shared_dep)
test('shared linkage', test_prog, args : [exe, 'This is a shared C library'])
endif
@@ -0,0 +1,25 @@
#!/usr/bin/env python3
import argparse
import subprocess
import sys
def main() -> None:
parser = argparse.ArgumentParser()
parser.add_argument('command')
parser.add_argument('expected')
args = parser.parse_args()
out = subprocess.run(args.command, stdout=subprocess.PIPE)
actual = out.stdout.decode().strip()
if args.expected != actual:
print('expected:', args.expected, file=sys.stderr)
print('actual: ', actual, file=sys.stderr)
sys.exit(1)
sys.exit(0)
if __name__ == "__main__":
main()