Skip to content
  • Oleg Grenrus's avatar
    Introduce PkgconfigVersion and PkgconfigVersionRange · 01df85ed
    Oleg Grenrus authored
    - Don't accept leading zeros in Version or VersionRange
    - Fixes https://github.com/haskell/cabal/issues/163
      (pkg-config uses a more general version scheme)
    - Also resolves https://github.com/haskell/cabal/issues/5138
    - `PkgconfigVersion` is compared with `rpmvercmp`
    - `PkgconfigVersionRange` is subset of `VersionRange`
        - with `cabal-version` before 3.0 it's parsed like `VersionRange`,
          where version digits are arbitrary integral (leading spaces
          allowed)
        - starting from cabal spec 3.0 `== x.y.*` and `^>=`
          (and set `{ ..  }`) are disallowed.
          Yet, the version literals syntax is relaxed to accept
          alphanumerical + `-.` strings. E.g. openssl's `1.1.0h` is
          accepted.
    - Lax `PkgconfigVersion` parser is also used to parse
      `pkg-config --modversion` output.
    01df85ed