Build with meson and disable libxpresent

This commit is contained in:
2026-06-14 11:05:40 +03:00
parent 85ce36bcba
commit fb853a2c65
3 changed files with 61 additions and 11 deletions
+7 -1
View File
@@ -1,7 +1,7 @@
name: xorg-xdpyinfo name: xorg-xdpyinfo
description: Display information utility for X description: Display information utility for X
version: 1.4.0 version: 1.4.0
revision: 2 revision: 3
url: https://xorg.freedesktop.org/ url: https://xorg.freedesktop.org/
license: custom license: custom
maintainers: maintainers:
@@ -17,5 +17,11 @@ depends:
- libxtst - libxtst
- libxxf86vm - libxxf86vm
make_depends: make_depends:
- meson
- xorg-util-macros - xorg-util-macros
- xorgproto - xorgproto
downloads:
- url: https://www.x.org/pub/individual/app/xdpyinfo-${BPM_PKG_VERSION}.tar.xz
extract_to: ${BPM_SOURCE}
extract_strip_components: 1
checksum: dc1de6e6e091ed46c4837b0ae9811e8182f7be0d2af638cab3e530ff081a48b6
+8 -10
View File
@@ -2,33 +2,31 @@
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
DOWNLOAD="https://www.x.org/pub/individual/app/xdpyinfo-${BPM_PKG_VERSION}.tar.xz"
FILENAME="${DOWNLOAD##*/}"
# The prepare function is executed in the root of the temp directory # The prepare function is executed in the root of the temp directory
# This function is used for downloading files and putting them into the correct location # This function is used for putting downloaded files to the correct location or applying patches
prepare() { prepare() {
wget "$DOWNLOAD" cd "$BPM_SOURCE"
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" patch -Np1 -i "$BPM_WORKDIR"/0001-Add-meson-toggle-for-building-with-libxpresent.patch
} }
# The build function is executed in the source directory # The build function is executed in the source directory
# This function is used to compile the source code # This function is used to compile the source code
build() { build() {
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-static meson setup build --prefix=/usr -Dxpresent=disabled
make meson compile -C build
} }
# The check function is executed in the source directory # The check function is executed in the source directory
# This function is used to run tests to verify the package has been compiled correctly # This function is used to run tests to verify the package has been compiled correctly
check() { check() {
make check meson test -C build
} }
# The package function is executed in the source directory # The package function is executed in the source directory
# This function is used to move the compiled files into the output directory # This function is used to move the compiled files into the output directory
package() { package() {
make DESTDIR="$BPM_OUTPUT" install meson install -C build --destdir="$BPM_OUTPUT"
# Install package license
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/xorg-xdpyinfo/COPYING install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/xorg-xdpyinfo/COPYING
} }
@@ -0,0 +1,46 @@
From e14b56a695f51bcfd92a5234990d3eba8982f85c Mon Sep 17 00:00:00 2001
From: EnumDev <[email protected]>
Date: Sun, 14 Jun 2026 09:52:45 +0300
Subject: [PATCH] Add meson toggle for building with libxpresent
---
meson.build | 7 +++++++
meson.options | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/meson.build b/meson.build
index 1b0d861..aa1a68f 100644
--- a/meson.build
+++ b/meson.build
@@ -65,6 +65,13 @@ dep_libxpresent = dependency('xpresent', required: false, disabler: true)
dep_libxrandr = dependency('xrandr', required: false, version: '>= 1.2',
disabler: true)
+if get_option('xpresent').allowed()
+ dep_libxpresent = dependency('xpresent', required: false, disabler: true)
+else
+ dep_libxpresent = disabler()
+endif
+summary('xpresent', dep_libxpresent.found())
+
if get_option('dga').allowed()
dep_libxxf86dga = dependency('xxf86dga', required: false, disabler: true)
else
diff --git a/meson.options b/meson.options
index 9ecc7dc..282b65c 100644
--- a/meson.options
+++ b/meson.options
@@ -1,3 +1,10 @@
+option(
+ 'xpresent',
+ type: 'feature',
+ value: 'enabled',
+ description: 'Enable xpresent support (default is enabled)'
+)
+
option(
'dga',
type: 'feature',
--
2.54.0