|
| 1 | +distributable: |
| 2 | + url: https://github.com/libfuse/libfuse/releases/download/{{version.tag}}/{{version.tag}}.tar.gz |
| 3 | + strip-components: 1 |
| 4 | + |
| 5 | +versions: |
| 6 | + github: libfuse/libfuse |
| 7 | + strip: /^fuse-/ |
| 8 | + |
| 9 | +platforms: |
| 10 | + - linux |
| 11 | + |
| 12 | +build: |
| 13 | + dependencies: |
| 14 | + mesonbuild.com: '*' |
| 15 | + ninja-build.org: '*' |
| 16 | + linux: |
| 17 | + gnu.org/gcc: '*' |
| 18 | + working-directory: build |
| 19 | + script: |
| 20 | + # -shared and -pie don't mix |
| 21 | + - run: |
| 22 | + - cp $PROP gcc-wrapper |
| 23 | + - chmod +x gcc-wrapper |
| 24 | + prop: | |
| 25 | + #!/bin/bash |
| 26 | + # Capture all arguments into an array |
| 27 | + ARGS=("$@") |
| 28 | +
|
| 29 | + # Check if the '-shared' flag is present in the arguments |
| 30 | + if printf "%s\n" "${ARGS[@]}" | grep -q -e '-shared'; then |
| 31 | +
|
| 32 | + # Use a loop to filter out the '-pie' flag from the arguments |
| 33 | + FILTERED_ARGS=() |
| 34 | + for arg in "${ARGS[@]}"; do |
| 35 | + if [ "$arg" != "-pie" ]; then |
| 36 | + FILTERED_ARGS+=("$arg") |
| 37 | + fi |
| 38 | + done |
| 39 | +
|
| 40 | + # Pass the filtered arguments to gcc |
| 41 | + exec gcc "${FILTERED_ARGS[@]}" |
| 42 | + else |
| 43 | + # Pass the original arguments to gcc |
| 44 | + exec gcc "${ARGS[@]}" |
| 45 | + fi |
| 46 | + working-directory: $HOME/.local/bin |
| 47 | + if: linux |
| 48 | + |
| 49 | + - run: meson setup build $ARGS |
| 50 | + working-directory: .. |
| 51 | + - meson compile |
| 52 | + - meson install |
| 53 | + env: |
| 54 | + linux: |
| 55 | + PATH: $HOME/.local/bin:$PATH |
| 56 | + CC: gcc-wrapper |
| 57 | + ARGS: |
| 58 | + - -Dudevrulesdir={{prefix}}/etc/udev/rules.d |
| 59 | + - -Dinitscriptdir={{prefix}}/etc/init.d |
| 60 | + - -Dsysconfdir={{prefix}}/etc |
| 61 | + - -Duseroot=false |
| 62 | + - --prefix={{prefix}} |
| 63 | + |
| 64 | +provides: |
| 65 | + - bin/fusermount3 |
| 66 | + |
| 67 | +test: |
| 68 | + - run: cc $FIXTURE -lfuse3 -o test |
| 69 | + fixture: |
| 70 | + extname: c |
| 71 | + content: | |
| 72 | + #define FUSE_USE_VERSION 31 |
| 73 | + #include <fuse3/fuse.h> |
| 74 | + #include <stdio.h> |
| 75 | + int main() { |
| 76 | + printf("%d%d\\n", FUSE_MAJOR_VERSION, FUSE_MINOR_VERSION); |
| 77 | + printf("%d\\n", fuse_version()); |
| 78 | + return 0; |
| 79 | + } |
| 80 | + - run: test "$(./test)" = "$(cat $FIXTURE)" |
| 81 | + fixture: | |
| 82 | + {{version.major}}{{version.minor}} |
| 83 | + {{version.major}}{{version.minor}} |
0 commit comments