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