a8fb842
#!/bin/sh
a8fb842
#
a8fb842
# The X server provides capabilities of the form:
a8fb842
#
a8fb842
# Provides: xserver-abi(ansic-0) = 4
a8fb842
#
a8fb842
# for an ABI version of 0.4.  The major number is encoded into the name so
a8fb842
# that major number changes force upgrades.  If we didn't, then
a8fb842
#
a8fb842
# Requires: xserver-abi(ansic) >= 0.4
a8fb842
#
a8fb842
# would also match 1.0, which is wrong since major numbers mean an ABI break.
a8fb842
a8fb842
ver=$(pkg-config --variable abi_$1 xorg-server)
a8fb842
a8fb842
major=$(echo $ver | cut -f 1 -d .)
a8fb842
minor=$(echo $ver | cut -f 2 -d .)
a8fb842
a8fb842
echo "xserver-abi($1-$major) >= $minor"