Fix version's comparison

This commit is contained in:
Sunderland93 2019-01-26 01:15:18 +04:00
parent 677395f05e
commit 10d2d13004
2 changed files with 2 additions and 10 deletions

View File

@ -1,6 +1,5 @@
#!/bin/sh
WAYSCAN=/usr/bin/wayland-scanner
WAYSCAN_VER=$($WAYSCAN --version 2>&1 | awk '{print $2}')
WAYLAND_PROTOS=/usr/share/wayland-protocols
OUTPUT=gfx/common/wayland
@ -13,13 +12,6 @@ if [ ! -d $OUTPUT ]; then
mkdir $OUTPUT
fi
#Since Wayland 1.15 option "code" is deprecated. Recommended to use "private-code" option instead.
if [ "$WAYSCAN_VER -ge 1.15" ]; then
CODEGEN=private-code
else
CODEGEN=code
fi
#Generate xdg-shell_v6 header and .c files
$WAYSCAN client-header $WAYLAND_PROTOS/unstable/xdg-shell/xdg-shell-unstable-v6.xml $OUTPUT/xdg-shell-unstable-v6.h
$WAYSCAN $CODEGEN $WAYLAND_PROTOS/unstable/xdg-shell/xdg-shell-unstable-v6.xml $OUTPUT/xdg-shell-unstable-v6.c

View File

@ -463,10 +463,10 @@ check_val '' XEXT -lXext '' xext '' ''
check_val '' XF86VM -lXxf86vm '' xxf86vm '' ''
if [ "$HAVE_WAYLAND_PROTOS" = yes ] && [ "$HAVE_WAYLAND" = yes ]; then
check_pkgconf WAYLAND_SCANNER wayland-scanner 1.12
check_pkgconf WAYLAND_SCANNER wayland-scanner 1.15
./gfx/common/wayland/generate_wayland_protos.sh
else
die : 'Notice: wayland (>=1.12) or wayland-protocols (>=1.15) not found. Disabling Wayland support.'
die : 'Notice: wayland-egl or wayland-protocols not found, disabling wayland support.'
HAVE_WAYLAND='no'
fi