From 9ab7e890269fdf7f2f610c51c420c51677375db7 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Fri, 30 May 2025 20:15:30 -0400 Subject: [PATCH] +libfuse --- .../github.com/libfuse/libfuse/package.yml | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 projects/github.com/libfuse/libfuse/package.yml diff --git a/projects/github.com/libfuse/libfuse/package.yml b/projects/github.com/libfuse/libfuse/package.yml new file mode 100644 index 0000000000..06836f6616 --- /dev/null +++ b/projects/github.com/libfuse/libfuse/package.yml @@ -0,0 +1,83 @@ +distributable: + url: https://github.com/libfuse/libfuse/releases/download/{{version.tag}}/{{version.tag}}.tar.gz + strip-components: 1 + +versions: + github: libfuse/libfuse + strip: /^fuse-/ + +platforms: + - linux + +build: + dependencies: + mesonbuild.com: '*' + ninja-build.org: '*' + linux: + gnu.org/gcc: '*' + working-directory: build + script: + # -shared and -pie don't mix + - run: + - cp $PROP gcc-wrapper + - chmod +x gcc-wrapper + prop: | + #!/bin/bash + # Capture all arguments into an array + ARGS=("$@") + + # Check if the '-shared' flag is present in the arguments + if printf "%s\n" "${ARGS[@]}" | grep -q -e '-shared'; then + + # Use a loop to filter out the '-pie' flag from the arguments + FILTERED_ARGS=() + for arg in "${ARGS[@]}"; do + if [ "$arg" != "-pie" ]; then + FILTERED_ARGS+=("$arg") + fi + done + + # Pass the filtered arguments to gcc + exec gcc "${FILTERED_ARGS[@]}" + else + # Pass the original arguments to gcc + exec gcc "${ARGS[@]}" + fi + working-directory: $HOME/.local/bin + if: linux + + - run: meson setup build $ARGS + working-directory: .. + - meson compile + - meson install + env: + linux: + PATH: $HOME/.local/bin:$PATH + CC: gcc-wrapper + ARGS: + - -Dudevrulesdir={{prefix}}/etc/udev/rules.d + - -Dinitscriptdir={{prefix}}/etc/init.d + - -Dsysconfdir={{prefix}}/etc + - -Duseroot=false + - --prefix={{prefix}} + +provides: + - bin/fusermount3 + +test: + - run: cc $FIXTURE -lfuse3 -o test + fixture: + extname: c + content: | + #define FUSE_USE_VERSION 31 + #include + #include + int main() { + printf("%d%d\\n", FUSE_MAJOR_VERSION, FUSE_MINOR_VERSION); + printf("%d\\n", fuse_version()); + return 0; + } + - run: test "$(./test)" = "$(cat $FIXTURE)" + fixture: | + {{version.major}}{{version.minor}} + {{version.major}}{{version.minor}}