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