gpgme-config 511 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. # Parse gpgme-config-like flags, then invoke `pkg-config gpgme`:
  3. # * Pass --cflags and --libs through
  4. # * Map --version to --modversion
  5. # * Ignore --thread=pthread
  6. # Parse flags
  7. for arg in "$@"; do
  8. case "$arg" in
  9. --cflags|--libs|--modversion)
  10. flags="$flags $arg"
  11. ;;
  12. --version)
  13. flags="$flags --modversion"
  14. ;;
  15. --thread=pthread)
  16. ;;
  17. --prefix)
  18. flags="$flags --variable=prefix"
  19. ;;
  20. *)
  21. echo "Unknown flag: $arg" >&2
  22. exit 1
  23. ;;
  24. esac
  25. done
  26. exec pkg-config gpgme $flags