gpgme-config 458 B

1234567891011121314151617181920212223242526
  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. *)
  18. echo "Unknown flag: $arg" >&2
  19. exit 1
  20. ;;
  21. esac
  22. done
  23. exec pkg-config gpgme $flags