Re: X.Org modules which could use some help to release
On 16/07/2019 20:07, Adam Jackson wrote: On Mon, 2019-07-15 at 14:31 -0700, Alan Coopersmith wrote: On 7/15/19 4:02 AM, Thomas Klausner wrote: libWindowsWM This is supposed to only be useful on Cygwin, but a Cygwin package search says they don't ship it, and it hasn't had a release since 2009, so I wonder if anyone uses it, or just keeps building it because no one ever said "stop". I think this can be archived, so I'll say "Stop!" :-) In principle it would be useful for any window manager that happens to be driving a server with that extension (likely only on win32), but if you're running your wm on a different machine/os from your win32 display you are doing something kinda weird. In practice, I had trouble finding _any_ window manager that used this extension, and the server-side code has been deleted in master: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/178 I guess the corresponding proto header in xorgproto should be moved to attic/ as well. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: rfc: WIN32 vs _WIN32 and more
On 17/05/2019 21:00, Thomas Dickey wrote: On Fri, May 17, 2019 at 10:08:47AM +0200, walter harms wrote: Hi list, is there a common ground for using OS related defines ? I was look at some libs and found some defines that look pretty ancient. And some like WIN32 vs _WIN32 however, they're distinct: https://stackoverflow.com/questions/662084/whats-the-difference-between-the-win32-and-win32-defines-in-c Yeah, it's a total mess. IMHO, _WIN32 is the 'correct' thing to test on, since it's in the implementation reserved namespace (since it starts with an underscore). ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 9/9] gen_gl_wrappers: remove unused imports
On 23/03/2019 23:52, Konstantin Kharlamov wrote: Fixes LGTM warnings: * Import of 'cProfile' is not used. * Import of 'pdb' is not used. * Import of 'string' is not used. * Import of 'time' is not used. Signed-off-by: Konstantin Kharlamov --- hw/xwin/glx/gen_gl_wrappers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xwin/glx/gen_gl_wrappers.py b/hw/xwin/glx/gen_gl_wrappers.py index b9e8dda75..256f2d752 100755 --- a/hw/xwin/glx/gen_gl_wrappers.py +++ b/hw/xwin/glx/gen_gl_wrappers.py @@ -24,7 +24,7 @@ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -import sys, time, pdb, string, cProfile +import sys from reg import * # Default input / log files Thanks! Reviewed-by: Jon Turney ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH libXaw] Define PAGE_SIZE as USN_PAGE_SIZE on Windows
On 09/03/2019 14:45, James R Larrowe wrote: Thanks for the updated patch. Take no action on Cygwin. I'd like to see some commentary here about why this is needed, e.g. "Work-around AC_CHECK_FUNCS([getpagesize]) reporting a false positive when using MinGW gcc, due to it being present in libgcc.a" In general, saying something about why a change is needed helps provide context when reviewing. Signed-off-by: James R Larrowe --- src/OS.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/OS.c b/src/OS.c index 4c69005..bd633c3 100644 --- a/src/OS.c +++ b/src/OS.c @@ -17,6 +17,12 @@ #define HAS_SC_PAGESIZE /* _SC_PAGESIZE may be an enum for Linux */ #endif +#if defined(_WIN32) && !defined(__CYGWIN__) +# include +# define PAGE_SIZE USN_PAGE_SIZE Possibly this is technically the wrong value (since it relates to the NTFS USN Journal, and not the VM page size) I'd be just as happy with this if it only did undef HAVE_GETPAGESIZE and thus _XawGetPageSize returned 0 I haven't looked at how _XawGetPageSize() is used, and thus what difference using the correct page size would make (if any) :) +# undef HAVE_GETPAGESIZE +#endif + int _XawGetPageSize(void) { ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH libXaw] Add definition of getpagesize(), missing on Windows.
On 05/03/2019 17:43, Alan Coopersmith wrote: What's wrong with it is mainly that the set of people who know about X libraries on Windows is small, and the set of people who deal with libXaw is small, and the intersection of those two sets is tiny. (It also doesn't help that we've sucked for years at handling patches by email for the unmaintained modules like libXaw - we're trying to get better with gitlab merge requests now, but we're still not great - unmaintained modules are still not well maintained.) I was hoping one of our Windows folks would comment on whether or not that's the right way to handle this, or if there's some Windows header to include instead. But if no one pipes up soon, I'll likely just go ahead and push it and see if anyone complains afterwards that it broke something. -Alan Coopersmith- alan.coopersm...@oracle.com Oracle Solaris Engineering - https://blogs.oracle.com/alanc On 03/ 4/19 06:54 AM, James Larrowe wrote: Ping. Anything wrong with this? It's only defined in the plugin header files for gcc. I guess this means that you're using a MinGW-type Windows-targetted gcc and this function is present in libgcc.a (for who knows what historical reason...), which is turning on HAVE_GETPAGESIZE? In that environment, I think there is a unistd.h, which could be included to provide a prototype. Alternatively, since getpagesize() is a POSIX function, and not in the Windows API, it's possibly more correct for this code not to be used at all on Windows? James: Going forward, if you'd like to Cc: me on your patches, I will do my best to give them review. On Thu, Feb 28, 2019 at 12:56 PM James R Larrowe mailto:larrowe.sema...@gmail.com>> wrote: Fix build with --enable-selective-werror. Signed-off-by: James R Larrowe mailto:larrowe.sema...@gmail.com>> --- src/OS.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/OS.c b/src/OS.c index 4c69005..cd0c517 100644 --- a/src/OS.c +++ b/src/OS.c @@ -37,6 +37,9 @@ _XawGetPageSize(void) #endif #ifdef HAVE_GETPAGESIZE +# if defined(_WIN32) Also note that, unfortunately, since _WIN32 is overloaded as meaning both "the target is Win32" and "the Win32 API is available", this construction can cause difficulties when compiling for the Cygwin target if "windows.h" has got included somewhere. +extern int getpagesize(void); +# endif if (pagesize == -1) pagesize = getpagesize(); #endif -- 2.11.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] hw/xwin: Fix 'make distcheck'
Add internal.h to SOURCES, omitted from 126c1cfa Signed-off-by: Jon Turney --- hw/xwin/winclipboard/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xwin/winclipboard/Makefile.am b/hw/xwin/winclipboard/Makefile.am index a1079aec6..bfd302413 100644 --- a/hw/xwin/winclipboard/Makefile.am +++ b/hw/xwin/winclipboard/Makefile.am @@ -1,6 +1,7 @@ noinst_LTLIBRARIES = libXWinclipboard.la libXWinclipboard_la_SOURCES = \ + internal.h \ winclipboard.h \ textconv.c \ thread.c \ -- 2.17.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] meson: use absolute paths in manpage substitutions
paths returned by get_option('foodir') are potentially relative to prefix Noticed when comparing manpages generated by a meson build with those generated by an autotools build Signed-off-by: Jon Turney --- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index f2c71fe27..706228228 100644 --- a/meson.build +++ b/meson.build @@ -520,9 +520,9 @@ manpage_config.set('libmansuffix', '3') manpage_config.set('miscmansuffix', '7') manpage_config.set('filemansuffix', '5') manpage_config.set('logdir', log_dir) -manpage_config.set('datadir', get_option('datadir')) -manpage_config.set('mandir', get_option('mandir')) -manpage_config.set('sysconfdir', get_option('sysconfdir')) +manpage_config.set('datadir', join_paths(get_option('prefix'), get_option('datadir'))) +manpage_config.set('mandir', join_paths(get_option('prefix'), get_option('mandir'))) +manpage_config.set('sysconfdir', join_paths(get_option('prefix'), get_option('sysconfdir'))) manpage_config.set('xconfigdir', 'xorg.conf.d') manpage_config.set('xkbdir', xkb_dir) manpage_config.set('XKB_DFLT_RULES', get_option('xkb_default_rules')) -- 2.17.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xorgproto 2/2] Assorted typo fixes in headers
On 17/06/2018 17:55, Alan Coopersmith wrote: - ** o Convience Marcos + ** o Convenience Marcos "Convenience Macros" ? ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 1/3] meson: install xwinclip and Xwinrc man pages
Omitted from a1e8dc05 Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- hw/xwin/meson.build | 7 +++ hw/xwin/winclipboard/meson.build | 7 +++ 2 files changed, 14 insertions(+) diff --git a/hw/xwin/meson.build b/hw/xwin/meson.build index 1bf9891ed..7e1375cfd 100644 --- a/hw/xwin/meson.build +++ b/hw/xwin/meson.build @@ -172,3 +172,10 @@ xwin_man = configure_file( configuration: manpage_config, ) install_man(xwin_man) + +xwinrc_man = configure_file( +input: 'man/XWinrc.man', +output: 'XWinrc.5', +configuration: manpage_config, +) +install_man(xwinrc_man) diff --git a/hw/xwin/winclipboard/meson.build b/hw/xwin/winclipboard/meson.build index dd7b2d20e..0395eb32d 100644 --- a/hw/xwin/winclipboard/meson.build +++ b/hw/xwin/winclipboard/meson.build @@ -30,3 +30,10 @@ executable( dependencies: [dependency('x11')], install: true, ) + +xwinclip_man = configure_file( +input: 'xwinclip.man', +output: 'xwinclip.1', +configuration: manpage_config, +) +install_man(xwinclip_man) -- 2.17.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 3/3] meson: don't put literal 'PACKAGE_STRING' and 'XORG_MAN_PAGE' in man pages
Instead, substitute the same values as autotools does Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index c8df31b3b..f2c71fe27 100644 --- a/meson.build +++ b/meson.build @@ -507,8 +507,8 @@ top_srcdir_inc = include_directories('.') serverconfigdir = join_paths(get_option('libdir'), 'xorg') manpage_config = configuration_data() -manpage_config.set('vendorversion', 'PACKAGE_STRING XORG_MAN_PAGE') -manpage_config.set('xorgversion', 'PACKAGE_STRING XORG_MAN_PAGE') +manpage_config.set('vendorversion', '"xorg-server @0@" "X Version 11"'.format(meson.project_version())) +manpage_config.set('xorgversion', '"xorg-server @0@" "X Version 11"'.format(meson.project_version())) manpage_config.set('xservername', 'Xorg') manpage_config.set('xconfigfile', 'xorg.conf') manpage_config.set('projectroot', get_option('prefix')) -- 2.17.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 0/3] meson fixes
Small fixes to meson build for problems I noticed when trying to package 1.20.0 Jon Turney (3): meson: install xwinclip and Xwinrc man pages meson: don't install xorg wrapper manpages if suid-wrapper isn't being used meson: don't put literal 'PACKAGE_STRING' and 'XORG_MAN_PAGE' in man pages hw/xfree86/meson.build | 24 +--- hw/xwin/meson.build | 7 +++ hw/xwin/winclipboard/meson.build | 7 +++ meson.build | 4 ++-- 4 files changed, 29 insertions(+), 13 deletions(-) -- 2.17.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 2/3] meson: don't install xorg wrapper manpages if suid-wrapper isn't being used
Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- hw/xfree86/meson.build | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build index 133c96d89..cacf56d4c 100644 --- a/hw/xfree86/meson.build +++ b/hw/xfree86/meson.build @@ -190,17 +190,19 @@ install_man(configure_file( configuration: manpage_config, )) -install_man(configure_file( -input: 'man/Xorg.wrap.man', -output: 'Xorg.wrap.1', -configuration: manpage_config, -)) - -install_man(configure_file( -input: 'man/Xwrapper.config.man', -output: 'Xwrapper.config.5', -configuration: manpage_config, -)) +if get_option('suid_wrapper') +install_man(configure_file( +input: 'man/Xorg.wrap.man', +output: 'Xorg.wrap.1', +configuration: manpage_config, +)) + +install_man(configure_file( +input: 'man/Xwrapper.config.man', +output: 'Xwrapper.config.5', +configuration: manpage_config, +)) +endif install_man(configure_file( input: 'man/xorg.conf.man', -- 2.17.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] hw/xwin/glx: Allocate fbconfigs correctly
4b0a3cba fixed leaking of GLX fbconfigs, so now xwin needs to allocate them correctly (individually, rather than all at once), so they can be freed successfully. Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harri...@virgin.net> --- hw/xwin/glx/indirect.c | 70 -- 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c index fb46e1c6a..1aaa87d8f 100644 --- a/hw/xwin/glx/indirect.c +++ b/hw/xwin/glx/indirect.c @@ -1744,7 +1744,7 @@ fbConfigToPixelFormatIndex(HDC hdc, __GLXconfig * mode, static void glxWinCreateConfigs(HDC hdc, glxWinScreen * screen) { -GLXWinConfig *c, *result, *prev = NULL; +GLXWinConfig *first = NULL, *prev = NULL; int numConfigs = 0; int i = 0; int n = 0; @@ -1761,22 +1761,16 @@ glxWinCreateConfigs(HDC hdc, glxWinScreen * screen) LogMessage(X_INFO, "%d pixel formats reported by DescribePixelFormat\n", numConfigs); -/* alloc */ -result = malloc(sizeof(GLXWinConfig) * numConfigs); - -if (NULL == result) { -return; -} - -memset(result, 0, sizeof(GLXWinConfig) * numConfigs); n = 0; /* fill in configs */ for (i = 0; i < numConfigs; i++) { int rc; +GLXWinConfig temp; +GLXWinConfig *c = +GLXWinConfig *work; +memset(c, 0, sizeof(GLXWinConfig)); -c = &(result[i]); -c->base.next = NULL; c->pixelFormatIndex = i + 1; rc = DescribePixelFormat(hdc, i + 1, sizeof(PIXELFORMATDESCRIPTOR), @@ -1939,18 +1933,29 @@ glxWinCreateConfigs(HDC hdc, glxWinScreen * screen) n++; +// allocate and save +work = malloc(sizeof(GLXWinConfig)); +if (NULL == work) { +ErrorF("Failed to allocate GLXWinConfig\n"); +break; +} +*work = temp; + +// note the first config +if (!first) +first = work; + // update previous config to point to this config if (prev) -prev->base.next = &(c->base); - -prev = c; +prev->base.next = &(work->base); +prev = work; } GLWIN_DEBUG_MSG ("found %d pixelFormats suitable for conversion to fbConfigs", n); screen->base.numFBConfigs = n; -screen->base.fbconfigs = &(result->base); +screen->base.fbconfigs = first ? &(first->base) : NULL; } // helper function to access an attribute value from an attribute value array by attribute @@ -1980,7 +1985,7 @@ getAttrValue(const int attrs[], int values[], unsigned int num, int attr, static void glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen) { -GLXWinConfig *c, *result, *prev = NULL; +GLXWinConfig *first = NULL, *prev = NULL; int i = 0; int n = 0; @@ -2006,14 +2011,6 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen) "%d pixel formats reported by wglGetPixelFormatAttribivARB\n", numConfigs); -/* alloc */ -result = malloc(sizeof(GLXWinConfig) * numConfigs); - -if (NULL == result) { -return; -} - -memset(result, 0, sizeof(GLXWinConfig) * numConfigs); n = 0; #define ADD_ATTR(a) { attrs[num_attrs++] = a; assert(num_attrs < ARRAY_SIZE(attrs)); } @@ -2074,9 +2071,11 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen) /* fill in configs */ for (i = 0; i < numConfigs; i++) { int values[num_attrs]; +GLXWinConfig temp; +GLXWinConfig *c = +GLXWinConfig *work; +memset(c, 0, sizeof(GLXWinConfig)); -c = &(result[i]); -c->base.next = NULL; c->pixelFormatIndex = i + 1; if (!wglGetPixelFormatAttribivARBWrapper @@ -2329,13 +2328,24 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen) n++; +// allocate and save +work = malloc(sizeof(GLXWinConfig)); +if (NULL == work) { +ErrorF("Failed to allocate GLXWinConfig\n"); +break; +} +*work = temp; + +// note the first config +if (!first) +first = work; + // update previous config to point to this config if (prev) -prev->base.next = &(c->base); - -prev = c; +prev->base.next = &(work->base); +prev = work; } screen->base.numFBConfigs = n; -screen->base.fbconfigs = &(result->base); +screen->base.fbconfigs = first ? &(first->base) : NULL; } -- 2.16.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] meson: Require libdrm for dri1/2/3 when configured 'auto' as well as 'true'
If dri1/2/3 are configured for auto-detection, libdrm is required, as well as the corresponding proto. (Practically we will always have the corresponding protos now, as they are part of xorgproto). Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- meson.build | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 3579d078a..32d72045b 100644 --- a/meson.build +++ b/meson.build @@ -279,20 +279,22 @@ endif build_glx = get_option('glx') +libdrm_dep = dependency('libdrm', version: '>= 2.4.89', required: false) + if get_option('dri1') == 'auto' -build_dri1 = xf86driproto_dep.found() +build_dri1 = xf86driproto_dep.found() and libdrm_dep.found() else build_dri1 = get_option('dri1') == 'true' endif if get_option('dri2') == 'auto' -build_dri2 = dri2proto_dep.found() +build_dri2 = dri2proto_dep.found() and libdrm_dep.found() else build_dri2 = get_option('dri2') == 'true' endif if get_option('dri3') == 'auto' -build_dri3 = dri3proto_dep.found() and xshmfence_dep.found() +build_dri3 = dri3proto_dep.found() and xshmfence_dep.found() and libdrm_dep.found() else build_dri3 = get_option('dri3') == 'true' if build_dri3 @@ -302,8 +304,11 @@ else endif endif -libdrm_required = (get_option('dri1') == 'true') or (get_option('dri2') == 'true') or (get_option('dri3') == 'true') -libdrm_dep = dependency('libdrm', version: '>= 2.4.89', required: libdrm_required) +libdrm_required = build_dri1 or build_dri2 or build_dri3 +if not libdrm_dep.found() and libdrm_required +error('DRI requested, but LIBDRM not found') +endif + build_modesetting = libdrm_dep.found() build_vbe = false -- 2.16.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH proto/xorgproto] Remove and .gitignore more autotools artefacts
Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- .gitignore | 2 + install-sh | 316 - missing| 360 - 3 files changed, 2 insertions(+), 676 deletions(-) delete mode 100755 install-sh delete mode 100755 missing diff --git a/.gitignore b/.gitignore index b674cd2..1baa360 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,8 @@ config.sub configure do-not-use-config.h do-not-use-config.h.in +install-sh man/Xprint.7 +missing stamp-h1 stamp-h2 diff --git a/install-sh b/install-sh deleted file mode 100755 index 77bc381..000 --- a/install-sh +++ /dev/null @@ -1,316 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2004-02-15.20 - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename= -transform_arg= -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd= -chgrpcmd= -stripcmd= -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src= -dst= -dir_arg= - -usage="Usage: $0 [OPTION]... SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 -d DIRECTORIES... - -In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. -In the second, create the directory path DIR. - -Options: --b=TRANSFORMBASENAME --c copy source (using $cpprog) instead of moving (using $mvprog). --d create directories instead of installing files. --g GROUP $chgrp installed files to GROUP. --m MODE$chmod installed files to MODE. --o USER$chown installed files to USER. --s strip installed files (using $stripprog). --t=TRANSFORM ---help display this help and exit. ---version display version info and exit. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG -" - -while test -n "$1"; do - case $1 in --b=*) transformbasename=`echo $1 | sed 's/-b=//'` -shift -continue;; - --c) instcmd=$cpprog -shift -continue;; - --d) dir_arg=true -shift -continue;; - --g) chgrpcmd="$chgrpprog $2" -shift -shift -continue;; - ---help) echo "$usage"; exit 0;; - --m) chmodcmd="$chmodprog $2" -shift -shift -continue;; - --o) chowncmd="$chownprog $2" -shift -shift -continue;; - --s)
Re: [PATCH util/modular] xorg.modules: Replace individual proto modules with xorgproto
On 28/02/2018 15:17, Emil Velikov wrote: On 28 February 2018 at 13:04, Jon Turney <jon.tur...@dronecode.org.uk> wrote: Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- xorg.modules | 845 ++- 1 file changed, 143 insertions(+), 702 deletions(-) diff --git a/xorg.modules b/xorg.modules index b34d14d..93bc8cf 100644 --- a/xorg.modules +++ b/xorg.modules @@ -65,35 +65,7 @@ - Should stay? Oops. + @@ -366,257 +338,13 @@ + I'd say keep this as autotools and toggle as 2/2... + - - - - .. hence this hunk will stay as-is and drop util-macros with 2/2? I don't really see using a meson as a change as this module didn't exists before, but I take your point that it reduces the diff. It's fairly fiddly to have the above subtleties within such a massive patch. With the above, tweaks: Reviewed-by: Emil Velikov <emil.veli...@collabora.com> Updated patch attached. From bde8ce73132a7c8c6cd1e2717019abc14d30e0d3 Mon Sep 17 00:00:00 2001 From: Jon Turney <jon.tur...@dronecode.org.uk> Date: Tue, 27 Feb 2018 22:08:19 + Subject: [PATCH util/modular] xorg.modules: Replace individual proto modules with xorgproto v2: Don't erroneously drop xcb-proto Use autotools not meson to build xorgproto Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- xorg.modules | 839 ++- 1 file changed, 142 insertions(+), 697 deletions(-) diff --git a/xorg.modules b/xorg.modules index b34d14d..8ef74fb 100644 --- a/xorg.modules +++ b/xorg.modules @@ -65,35 +65,8 @@ - - - - - - - - - - - - - - - - - - - - - + - - - - - - - @@ -366,250 +339,9 @@ --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -624,8 +356,7 @@ checkoutdir="xorg/lib/libAppleWM"/> - - + @@ -636,8 +367,7 @@ checkoutdir="xorg/lib/libFS"/> - - + @@ -647,7 +377,7 @@ checkoutdir="xorg/lib/libICE"/> - + @@ -668,7 +398,7 @@ checkoutdir="xorg/lib/libSM"/> - + @@ -682,12 +412,7 @@ checkoutdir="xorg/lib/libX11"/> - - - - - - + @@ -701,8 +426,7 @@ checkoutdir="xorg/lib/libXScrnSaver"/> - - + @@ -713,7 +437,7 @@ checkoutdir="xorg/lib/libXau"/> - + @@ -722,7 +446,7 @@ checkoutdir="xorg/lib/libXaw"/> - + @@ -738,7 +462,7 @@ checkoutdir="xorg/lib/libXaw3d"/> - + @@ -754,8 +478,7 @@ checkoutdir="xorg/lib/libXcomposite"/> - - + @@ -767,7 +490,7 @@ checkoutdir="xorg/lib/libXcursor"/> - + @@ -779,9 +502,7 @@ checkoutdir="xorg/lib/libXdamage"/> - - - + @@ -792,7 +513,7 @@ checkoutdir="xorg/lib/libXdmcp"/> - +
[PATCH util/modular] xorg.modules: Replace individual proto modules with xorgproto
Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- xorg.modules | 845 ++- 1 file changed, 143 insertions(+), 702 deletions(-) diff --git a/xorg.modules b/xorg.modules index b34d14d..93bc8cf 100644 --- a/xorg.modules +++ b/xorg.modules @@ -65,35 +65,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -366,257 +338,13 @@ --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -624,8 +352,7 @@ checkoutdir="xorg/lib/libAppleWM"/> - - + @@ -636,8 +363,7 @@ checkoutdir="xorg/lib/libFS"/> - - + @@ -647,7 +373,7 @@ checkoutdir="xorg/lib/libICE"/> - + @@ -668,7 +394,7 @@ checkoutdir="xorg/lib/libSM"/> - + @@ -682,12 +408,7 @@ checkoutdir="xorg/lib/libX11"/> - - - - - - + @@ -701,8 +422,7 @@ checkoutdir="xorg/lib/libXScrnSaver"/> - - + @@ -713,7 +433,7 @@ checkoutdir="xorg/lib/libXau"/> - + @@ -722,7 +442,7 @@ checkoutdir="xorg/lib/libXaw"/> - + @@ -738,7 +458,7 @@ checkoutdir="xorg/lib/libXaw3d"/> - + @@ -754,8 +474,7 @@ checkoutdir="xorg/lib/libXcomposite"/> - - + @@ -767,7 +486,7 @@ checkoutdir="xorg/lib/libXcursor"/> - + @@ -779,9 +498,7 @@ checkoutdir="xorg/lib/libXdamage"/> - - - + @@ -792,7 +509,7 @@ checkoutdir="xorg/lib/libXdmcp"/> - + @@ -804,8 +521,7 @@ checkoutdir="xorg/lib/libXext"/> - - + @@ -818,9 +534,7 @@ checkoutdir="xorg/lib/libXfixes"/> - - - + @@ -831,8 +545,7 @@ tag="da4246c98bc51297daeec47c15181e179df94013"/> - - + @@ -847,8 +560,7 @@ checkoutdir="xorg/lib/libXfont"/> - - + @@ -863,7 +575,7 @@ checkoutdir="xorg/lib/libXft"/> - + @@ -874,9 +586,7 @@ checkoutdir="xorg/lib/libXi"/> - - - + @@ -891,9 +601,7 @@ checkoutdir="xorg/lib/libXinerama"/> - - - + @@ -904,8 +612,7 @@ checkoutdir="xorg/lib/libXmu"/> - - + @@ -920,8 +627,7 @@ checkoutdir="xorg/lib/libXpm"/> - - + @@ -933,9 +639,7 @@
[PATCH xserver] hw/xwin: Update for glxvnd
- Link with libglxvnd in meson.build - Call xorgGlxCreateVendor() like all other DDX Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- hw/xwin/InitOutput.c | 2 ++ hw/xwin/meson.build | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index ef19f7941..9560c5684 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -1012,6 +1012,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[]) } } +xorgGlxCreateVendor(); + /* Generate a cookie used by internal clients for authorization */ if (g_fXdmcpEnabled || g_fAuthEnabled) winGenerateAuthorization(); diff --git a/hw/xwin/meson.build b/hw/xwin/meson.build index 87fa6c5cb..bee4a46a4 100644 --- a/hw/xwin/meson.build +++ b/hw/xwin/meson.build @@ -149,6 +149,7 @@ executable( libxserver_fb, libxserver, libxserver_glx, +libglxvnd, libxserver_xkb_stubs, libxserver_miext_shadow, libxserver_pseudoramix, -- 2.16.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH app/xkbcomp] pkgconfig: Add our bindir to xkbcomp.pc
On 07/11/2017 05:16, Peter Hutterer wrote: On Mon, Nov 06, 2017 at 12:55:20PM -0500, Adam Jackson wrote: Signed-off-by: Adam Jackson <a...@redhat.com> --- xkbcomp.pc.in | 1 + 1 file changed, 1 insertion(+) diff --git a/xkbcomp.pc.in b/xkbcomp.pc.in index b8d6023..4d138c8 100644 --- a/xkbcomp.pc.in +++ b/xkbcomp.pc.in @@ -1,4 +1,5 @@ prefix=@prefix@ +bindir=@bindir@ datarootdir=@datarootdir@ datadir=@datadir@ xkbconfigdir=@XKBCONFIGROOT@ -- 2.14.3 for some reason this doesn't work here. It gets replaced with: bindir=${exec_prefix}/bin but exec_prefix isn't set. With a --prefix=/opt/xorg, I still get: $> pkg-config --variable bindir xkbcomp /bin Adding this fixed it: diff --git a/xkbcomp.pc.in b/xkbcomp.pc.in index 4d138c8..a4791a9 100644 --- a/xkbcomp.pc.in +++ b/xkbcomp.pc.in @@ -1,4 +1,5 @@ prefix=@prefix@ +exec_prefix=@exec_prefix@ bindir=@bindir@ datarootdir=@datarootdir@ datadir=@datadir@ Yes, I found this necessary also, and I think it's correct, as bindir may be expressed in terms of exec_prefix. Reviewed-by: Jon Turney <jon.tur...@dronecode.org.uk> ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 1/2] meson: Enable SUN-DES-1 auth code
On 19/01/2018 11:37, Jon Turney wrote: On 18/01/2018 21:27, Adam Jackson wrote: On Wed, 2018-01-17 at 19:02 +, Jon Turney wrote: On 08/01/2018 20:50, Adam Jackson wrote: --- include/meson.build | 1 + meson_options.txt | 1 + os/meson.build | 4 3 files changed, 6 insertions(+) After this, I needed something like the attached. Eep, indeed you would. But I think we should actually prefer tirpc if it's available, glibc's rpc code has been deprecated for years and I believe the next Fedora release is going to try removing the headers for it again. I guess XTRANS_SECURE_RPC_FLAGS will also need adjusting to express that preference I took a brief look at this: as far as I can tell, the only users of XTRANS_SECURE_RPC_FLAGS are xserver, xhost and xdm. Of these, the only problem seems to be xdm, which uses getsecretkey(), which doesn't seem to be currently provided by libtirpc. This is not something I can easily test, so I think I'll leave it alone :) I'll see if I can revise this patch to prefer tirpc. Revised patch attached. From c4ac359e152eb8ea13f1c6d5894950563ab60b6b Mon Sep 17 00:00:00 2001 From: Jon Turney <jon.tur...@dronecode.org.uk> Date: Wed, 17 Jan 2018 13:43:47 + Subject: [PATCH xserver] meson: Use and prefer tirpc for Secure RPC authentication --- os/meson.build | 5 + 1 file changed, 5 insertions(+) diff --git a/os/meson.build b/os/meson.build index 54124d32a..ff3a4615b 100644 --- a/os/meson.build +++ b/os/meson.build @@ -54,7 +54,11 @@ if get_option('xdmcp') srcs_os += 'xdmcp.c' endif +rpc_dep = [] if get_option('secure-rpc') +# prefer libtirpc (if available), otherwise assume RPC functions are +# provided by libc. +rpc_dep = dependency('libtirpc', required: false) srcs_os += 'rpcauth.c' endif @@ -73,6 +77,7 @@ libxserver_os = static_library('libxserver_os', common_dep, dl_dep, sha1_dep, +rpc_dep, dependency('xau') ], link_with: libxlibc, -- 2.15.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 1/2] meson: Enable SUN-DES-1 auth code
On 18/01/2018 21:00, Eric Anholt wrote: Jon Turney writes: On 08/01/2018 20:50, Adam Jackson wrote: --- include/meson.build | 1 + meson_options.txt | 1 + os/meson.build | 4 3 files changed, 6 insertions(+) After this, I needed something like the attached. I'm curious, why tirpc instead of rpcsvc like xtrans did before? XTRANS_SECURE_RPC_FLAGS does something totally other (and doesn't think secure RPC can be used if the libc in use has no RPC functions) If RPC functions have been found in libc, it adds rpcsvr if it's needed to provide getsecretkey (claiming that's the case on BSD) ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 1/2] meson: Enable SUN-DES-1 auth code
On 18/01/2018 21:27, Adam Jackson wrote: On Wed, 2018-01-17 at 19:02 +, Jon Turney wrote: On 08/01/2018 20:50, Adam Jackson wrote: --- include/meson.build | 1 + meson_options.txt | 1 + os/meson.build | 4 3 files changed, 6 insertions(+) After this, I needed something like the attached. Eep, indeed you would. But I think we should actually prefer tirpc if it's available, glibc's rpc code has been deprecated for years and I believe the next Fedora release is going to try removing the headers for it again. I guess XTRANS_SECURE_RPC_FLAGS will also need adjusting to express that preference Is the extra-underscore thing really necessary? I'd have hoped meson would take care of that. This is not due to leading-underscore ABI issues, it's due to me looking at the following in os/rpcauth.c: #ifdef SVR4 if ((why = __authenticate(, )) != AUTH_OK) { #else if ((why = _authenticate(, )) != AUTH_OK) { #endif I've no idea if that's legitimate or not :) (This is the function that os/rpcauth.c actually uses, as opposed to the function(s) that XTRANS_SECURE_RPC_FLAGS check for) I'll see if I can revise this patch to prefer tirpc. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] meson.build: Fix hw/xwin build when dependencies are installed in a non-default location
Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- hw/xwin/glx/meson.build | 2 +- hw/xwin/winclipboard/meson.build | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xwin/glx/meson.build b/hw/xwin/glx/meson.build index e9969536d..57cce039d 100644 --- a/hw/xwin/glx/meson.build +++ b/hw/xwin/glx/meson.build @@ -75,7 +75,7 @@ xwin_glx = static_library( top_srcdir_inc, include_directories('../'), ], -dependencies: pixman_dep, +dependencies: common_dep, c_args: xwin_glx_c_args, ) diff --git a/hw/xwin/winclipboard/meson.build b/hw/xwin/winclipboard/meson.build index 1c784c384..dd7b2d20e 100644 --- a/hw/xwin/winclipboard/meson.build +++ b/hw/xwin/winclipboard/meson.build @@ -27,5 +27,6 @@ executable( srcs_xwinclip, link_with: xwin_clipboard, link_args: ['-lgdi32', '-lpthread'], +dependencies: [dependency('x11')], install: true, ) -- 2.15.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 1/2] meson: Enable SUN-DES-1 auth code
On 08/01/2018 20:50, Adam Jackson wrote: --- include/meson.build | 1 + meson_options.txt | 1 + os/meson.build | 4 3 files changed, 6 insertions(+) After this, I needed something like the attached. From 6f11847ccf0cc5833e73dba79380ec6ae5123782 Mon Sep 17 00:00:00 2001 From: Jon Turney <jon.tur...@dronecode.org.uk> Date: Wed, 17 Jan 2018 13:43:47 + Subject: [PATCH xserver] meson: look for Secure RPC authentication function in tirpc If Secure RPC authentication isn't found in libc, look for it in tirpc. Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- Notes: This does something different to XTRANS_SECURE_RPC_FLAGS, which I hadn't realized could be doing something like this. But maybe I should just default this to false for me, instead. os/meson.build | 5 + 1 file changed, 5 insertions(+) diff --git a/os/meson.build b/os/meson.build index 54124d32a..e2ab68346 100644 --- a/os/meson.build +++ b/os/meson.build @@ -54,7 +54,11 @@ if get_option('xdmcp') srcs_os += 'xdmcp.c' endif +rpc_dep = [] if get_option('secure-rpc') +if not (cc.has_function('_authenticate') or cc.has_function('__authenticate')) +rpc_dep = dependency('libtirpc') +endif srcs_os += 'rpcauth.c' endif @@ -73,6 +77,7 @@ libxserver_os = static_library('libxserver_os', common_dep, dl_dep, sha1_dep, +rpc_dep, dependency('xau') ], link_with: libxlibc, -- 2.15.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] meson: Correct the disabled int10 option choice
On 08/01/2018 19:31, Adam Jackson wrote: On Fri, 2017-12-22 at 18:49 +, Jon Turney wrote: hw/xfree/meson.build tests the int10 option against 'disabled', not 'false' to see if it shouldn't be built at all. I'd really prefer we be consistent that 'false' always turns things off; could we change hw/xfree86/meson.build instead? Sure. Amended patch attached. From 4e8bb8a61be0b9126a348af4546bd13b686c51bd Mon Sep 17 00:00:00 2001 From: Jon Turney <jon.tur...@dronecode.org.uk> Date: Fri, 22 Dec 2017 18:44:01 + Subject: [PATCH xserver] meson: Correct the option for disabled int10 from 'disabled' to 'false' Fix meson_option.txt to align with the check of the int10 option against 'disabled', not 'false' in hw/xfree/meson.build, to see if it shouldn't be built at all. This keeps everything consistent that 'false' always turns things off. Not noticed before as options weren't validated against choices until meson 0.43 Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- hw/xfree86/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build index 3b1aa17ff..629daf977 100644 --- a/hw/xfree86/meson.build +++ b/hw/xfree86/meson.build @@ -110,7 +110,7 @@ subdir('fbdevhw') if gbm_dep.found() subdir('glamor_egl') endif -if int10 != 'disabled' +if int10 != 'false' if int10 == 'x86emu' subdir('x86emu') endif -- 2.15.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 4/4] os: Use 64-bit tick count on Windows when available
On 27/12/2017 04:10, Jeff Smith wrote: On Windows, GetTickCount() returns a value that wraps after 49.7 days. Windows Vista and later offer GetTickCount64(), which does not have that issue. In places that can make use of more than 32 bits from the tick counter, use a 64-bit counter if availabile. Since Vista is EOL, I think we are ok with requiring it, and just linking directly with GetTickCount64(). doc/c-extensions should be updated to note the new minimum Windows version. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] meson: Correct the disabled int10 option choice
hw/xfree/meson.build tests the int10 option against 'disabled', not 'false' to see if it shouldn't be built at all. Not noticed before as options weren't validated against choices until meson 0.43 Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- meson_options.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson_options.txt b/meson_options.txt index d1341ede2..d6554d053 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -41,7 +41,7 @@ option('vendor_name_short', type: 'string', value: 'X.Org') option('vendor_web', type: 'string', value: 'http://wiki.x.org') option('os_vendor', type: 'string', value: '') -option('int10', type: 'combo', choices: ['stub', 'x86emu', 'vm86', 'auto', 'false'], +option('int10', type: 'combo', choices: ['stub', 'x86emu', 'vm86', 'auto', 'disabled'], value: 'auto', description: 'Xorg int10 backend (default: usually x86emu)') -- 2.15.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] meson: Don't use '' in link_with, ever
On 23/10/2017 21:21, Lyude Paul wrote: String arguments as elements in the array passed to the link_with argument in meson's executable() functions are not valid and will end up causing the build file generation to file. This actually ended up exposing a bug in meson that caused it not to report where in the meson.build file it was failing: https://github.com/mesonbuild/meson/pull/2527 The proper way to have a variable that can contain either an empty link target or an actual link target is: some_target = [] if some_cond some_target = static_library(...) endif This way if some_cond is False, some_target gets set to [], gets passed to executable() in the link_with array, and then gets removed by array flattening. This also unbreaks Xwayland builds with -Dglx=false, the thing that originally made me notice this. Signed-off-by: Lyude Paul <ly...@redhat.com> --- glx/meson.build| 2 +- hw/dmx/meson.build | 2 +- meson.build| 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Jon Turney <jon.tur...@dronecode.org.uk> ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] travis: Fix OSX build
Turn off homebrew autoupdating before installing ccache, to avoid: /usr/local/Homebrew/Library/Homebrew/brew.rb:12:in `': Homebrew must be run under Ruby 2.3! You're running 2.0.0. (RuntimeError) Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 498391d1d..bc54f3bc1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull jturney/xserver-travis:v2 ; fi install: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache ; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache ; fi before_script: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM jturney/xserver-travis:v2 > Dockerfile ; fi -- 2.14.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] meson: Don't forget to define DEBUG!
On 12/10/2017 00:15, Lyude Paul wrote: Signed-off-by: Lyude Paul--- include/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/meson.build b/include/meson.build index 90f8de3cb..8894885c6 100644 --- a/include/meson.build +++ b/include/meson.build @@ -196,6 +196,9 @@ conf_data.set('XvMCExtension', build_xv) conf_data.set('HAVE_SHA1_IN_LIBNETTLE', '1') # XXX +enable_debugging = (get_option('buildtype') == 'debug') or (get_option('buildtype') == 'debugoptimized') It seems you could also write this as: enable_debugging = get_option('buildtype').startswith('debug') ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 2/2] meson: Fix linkage of loadable modules for PE/COFF
For the loadable modules it makes sense to build for PE/COFF targets, link those loadable modules with the import library for the Xorg executable, so that symbols provided by the executable can be satisfied at link time (as required by PE/COFF). Since this uses the syntax of using the returned build target object from an executable() with an implib: kwarg to link_with:, introduced in meson 0.42 and a syntax error with older meson, also update the minimum meson version which we require in project() to that. Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- hw/xfree86/dixmods/meson.build | 5 - hw/xfree86/exa/meson.build | 2 +- hw/xfree86/fbdevhw/meson.build | 1 + hw/xfree86/meson.build | 3 ++- hw/xfree86/shadowfb/meson.build | 1 + meson.build | 2 +- 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/dixmods/meson.build b/hw/xfree86/dixmods/meson.build index 06ca56862..835d23215 100644 --- a/hw/xfree86/dixmods/meson.build +++ b/hw/xfree86/dixmods/meson.build @@ -6,6 +6,7 @@ fb = shared_module( c_args: xorg_c_args, dependencies: common_dep, link_whole: libxserver_fb, +link_with: e, install: true, install_dir: module_dir, @@ -19,6 +20,7 @@ shared_module( c_args: [ xorg_c_args, wfb_args ], dependencies: common_dep, link_whole: libxserver_wfb, +link_with: e, install: true, install_dir: module_dir, @@ -32,7 +34,7 @@ shared_module( c_args: xorg_c_args, dependencies: common_dep, link_whole: libxserver_miext_shadow, -link_with: fb, +link_with: [fb, e], install: true, install_dir: module_dir, @@ -47,6 +49,7 @@ if build_glx c_args: [ xorg_c_args, glx_align64 ], dependencies: [ common_dep, dl_dep ], link_whole: libxserver_glx, +link_with: e, install: true, install_dir: join_paths(module_dir, 'extensions') diff --git a/hw/xfree86/exa/meson.build b/hw/xfree86/exa/meson.build index bfc5590f8..5f5cf08a7 100644 --- a/hw/xfree86/exa/meson.build +++ b/hw/xfree86/exa/meson.build @@ -2,7 +2,7 @@ xorg_exa = shared_module('exa', 'examodule.c', include_directories: [inc, xorg_inc], dependencies: common_dep, -link_with: libxserver_exa, +link_with: [libxserver_exa, e], c_args: xorg_c_args, install: true, install_dir: module_dir, diff --git a/hw/xfree86/fbdevhw/meson.build b/hw/xfree86/fbdevhw/meson.build index 2f82e2d9f..35d66ef2c 100644 --- a/hw/xfree86/fbdevhw/meson.build +++ b/hw/xfree86/fbdevhw/meson.build @@ -11,6 +11,7 @@ shared_module('fbdevhw', c_args: xorg_c_args, install: true, install_dir: module_dir, +link_with: e, ) install_data('fbdevhw.h', install_dir: xorgsdkdir) diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build index 3c5f46f0b..3b1aa17ff 100644 --- a/hw/xfree86/meson.build +++ b/hw/xfree86/meson.build @@ -91,7 +91,7 @@ xorg_deps = [ libdrm_dep, ] -executable( +e = executable( 'Xorg', srcs_xorg, include_directories: [inc, xorg_inc], @@ -100,6 +100,7 @@ executable( link_args: linker_export_flags, c_args: xorg_c_args, install: true, +implib: true, ) # subdirs for modules loadable by Xorg diff --git a/hw/xfree86/shadowfb/meson.build b/hw/xfree86/shadowfb/meson.build index 0470ecbb5..7ecc9bc30 100644 --- a/hw/xfree86/shadowfb/meson.build +++ b/hw/xfree86/shadowfb/meson.build @@ -5,6 +5,7 @@ shared_module('shadowfb', c_args: xorg_c_args, install: true, install_dir: module_dir, +link_with: e, ) install_data('shadowfb.h', install_dir: xorgsdkdir) diff --git a/meson.build b/meson.build index d71cfed5a..123be7f8c 100644 --- a/meson.build +++ b/meson.build @@ -4,7 +4,7 @@ project('xserver', 'c', 'c_std=gnu99', ], version: '1.19.99.1', -meson_version: '>= 0.40.0', +meson_version: '>= 0.42.0', ) add_project_arguments('-DHAVE_DIX_CONFIG_H', language: 'c') cc = meson.get_compiler('c') -- 2.14.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 1/2] meson: Fix underlinkage of shadow loadable module
Future work: probably some other modules are underlinked? Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- hw/xfree86/dixmods/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/dixmods/meson.build b/hw/xfree86/dixmods/meson.build index ffaf3ef86..06ca56862 100644 --- a/hw/xfree86/dixmods/meson.build +++ b/hw/xfree86/dixmods/meson.build @@ -1,4 +1,4 @@ -shared_module( +fb = shared_module( 'fb', 'fbmodule.c', @@ -32,6 +32,7 @@ shared_module( c_args: xorg_c_args, dependencies: common_dep, link_whole: libxserver_miext_shadow, +link_with: fb, install: true, install_dir: module_dir, -- 2.14.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 0/4] meson building Xorg server on Cygwin
On 27/06/2017 17:45, Adam Jackson wrote: On Mon, 2017-06-26 at 14:54 +0100, Jon Turney wrote: Additions to meson build for building the Xorg server on Cygwin (cf. changes to autotools build in commit c7b16255) Note that 4/4 relies on a meson PR which is not yet accepted. Jon Turney (4): Move statically linked xorgxkb files from dixmods to a separate directory meson: Shuffle around subdirs so we build Xorg loadable modules after Xorg meson: Use --export-all-symbols when building PE/COFF objects 1/3 broke 'make check' because it missed test/Makefile.am. Fixed that up and merged these three: remote: E: failed to find patch for rev fbdd73fac68383c93f6f5c6a761586050303. remote: I: patch #163685 updated using rev b34abb3d2da46339d59a0feefd2240790a6a6a0e. remote: I: patch #163686 updated using rev 47a7b63f7455eaeacb634fd800e924f2087dacbd. remote: I: 2 patch(es) updated to state Accepted. To ssh://git.freedesktop.org/git/xorg/xserver 5c8fb7d12..47a7b63f7 master -> master meson: Fix linkage of loadable modules for PE/COFF I'll update meson with that PR locally and see if this works. I think it could also be made to have the same effect on ELF (if we build Xorg as a PIE), which would have the nice side effect of making loadables work sanely when built with -z now or using musl libc. Hmmm... this is all new to me, but I think that '-z now' just needs the loadable modules to not be underlinked? So, I've split this patch into two, the one bit of underlinking I needed to fix (since I don't build most modules), and the PE peculiarities (dealing with the fact that symbols from the executable are needed at link time, rather than load time). Applying the second one is probably not a good idea as it requires a very recent meson. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] meson: Add dependency on generated code fragments in hw/xwin/glx/
Somehow I'd managed to write this with this dependency missing, so this only works correctly when the generated files already exist and the correct automatic dependencies generated, but fails on a clean build. Including generated files with a .c extension into the sources for a target causes meson to want to compile them (and it seems to be hard to say "make the directory containing this generated file available to include"). So, change the extension of included generated C fragments to .ic Update the autotools build to align. Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- hw/xwin/glx/Makefile.am | 8 hw/xwin/glx/glshim.c | 2 +- hw/xwin/glx/glthunk.c | 2 +- hw/xwin/glx/meson.build | 9 ++--- hw/xwin/glx/wgl_ext_api.c | 2 +- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/hw/xwin/glx/Makefile.am b/hw/xwin/glx/Makefile.am index f19995086..1fc57f239 100644 --- a/hw/xwin/glx/Makefile.am +++ b/hw/xwin/glx/Makefile.am @@ -51,20 +51,20 @@ else GENGLWRAPPERSOPTS="-nodebug" endif -generated_wgl_wrappers.c: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/wgl.xml $(KHRONOS_SPEC_DIR)/reg.py +generated_wgl_wrappers.ic: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/wgl.xml $(KHRONOS_SPEC_DIR)/reg.py $(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/wgl.xml -prefix wgl -wrapper -preresolve $(GENGLWRAPPERSOPTS) -outfile $@ -generated_gl_shim.c: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py +generated_gl_shim.ic: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py $(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/gl.xml -shim $(GENGLWRAPPERSOPTS) -outfile $@ -generated_gl_thunks.c: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py +generated_gl_thunks.ic: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py $(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/gl.xml -thunk $(GENGLWRAPPERSOPTS) -outfile $@ generated_gl_thunks.def: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py $(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/gl.xml -thunkdefs $(GENGLWRAPPERSOPTS) -outfile $@ endif -BUILT_SOURCES = generated_gl_shim.c generated_gl_thunks.c generated_gl_thunks.def generated_wgl_wrappers.c +BUILT_SOURCES = generated_gl_shim.ic generated_gl_thunks.ic generated_gl_thunks.def generated_wgl_wrappers.ic CLEANFILES = $(BUILT_SOURCES) EXTRA_DIST = gen_gl_wrappers.py diff --git a/hw/xwin/glx/glshim.c b/hw/xwin/glx/glshim.c index df5a932ff..a27040257 100644 --- a/hw/xwin/glx/glshim.c +++ b/hw/xwin/glx/glshim.c @@ -106,7 +106,7 @@ int glWinSelectImplementation(int native) #define RESOLVED_PROC proc /* Include generated shims for direct linkage to GL functions which are in the ABI */ -#include "generated_gl_shim.c" +#include "generated_gl_shim.ic" /* Special wrapper for glAddSwapHintRectWIN for copySubBuffers diff --git a/hw/xwin/glx/glthunk.c b/hw/xwin/glx/glthunk.c index d49fe487c..3d2702ddb 100644 --- a/hw/xwin/glx/glthunk.c +++ b/hw/xwin/glx/glthunk.c @@ -84,4 +84,4 @@ glWinResolveHelper(PROC * cache, const char *symbol) found using wglGetProcAddress(), but also stdcall so still need wrappers... */ -#include "generated_gl_thunks.c" +#include "generated_gl_thunks.ic" diff --git a/hw/xwin/glx/meson.build b/hw/xwin/glx/meson.build index 7843a5f00..e9969536d 100644 --- a/hw/xwin/glx/meson.build +++ b/hw/xwin/glx/meson.build @@ -15,7 +15,7 @@ wgl_wrappers = custom_target( 'gen_wgl_wrappers', command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-prefix', 'wgl', '-wrapper', '-preresolve', '-outfile', '@OUTPUT@'], input: join_paths(khronos_spec_dir, 'wgl.xml'), -output: 'generated_wgl_wrappers.c', +output: 'generated_wgl_wrappers.ic', depend_files: join_paths(khronos_spec_dir, 'reg.py'), ) @@ -23,7 +23,7 @@ gl_shim = custom_target( 'gen_gl_shim', command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-shim', '-outfile', '@OUTPUT@'], input: join_paths(khronos_spec_dir, 'gl.xml'), -output: 'generated_gl_shim.c', +output: 'generated_gl_shim.ic', depend_files: join_paths(khronos_spec_dir, 'reg.py'), ) @@ -31,7 +31,7 @@ gl_thunks = custom_target( 'gen_gl_thunks', command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-thunk', '-outfile', '@OUTPUT@'], input: join_paths(khronos_spec_dir, 'gl.xml'), -output: 'generated_gl_thunks.c', +output: 'generated_gl_thunks.ic', depend_files: join_paths(khronos_spec_dir, 'reg.
Re: [PATCH xserver 0/2] AppVeyor CI
On 18/09/2017 18:09, Adam Jackson wrote: On Fri, 2017-09-15 at 14:36 +0100, Jon Turney wrote: Jon Turney (2): Revert "dmx: fix linking" Add an .appveyor.yml for AppVeyor CI .appveyor.yml | 29 + hw/dmx/Makefile.am | 3 +-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 .appveyor.yml This is awesome! Keeping the build working for win32 has always been tricky so it's really great to have a service double-check it, and indeed appveyor appears to be working for me: https://ci.appveyor.com/project/nwnk/xserver Merged: remote: I: patch #177052 updated using rev 7d0728d6c42f9200b90c58e0357776018de18496. remote: E: failed to find patch for rev de3b61869140768335daed0e855a5ae4bdb75020. remote: I: 1 patch(es) updated to state Accepted. To ssh://git.freedesktop.org/git/xorg/xserver fbd80b2c8e..de3b618691 master -> master (Failure on patch 2 because the second patch contained a ridiculously long line that broke in the middle.) Hmmm, yes. This would be much better wrapped, but the syntax for line continuation here is obscure to me. If someone wanted to wire up travis/osx too that'd be super. I've had a go at this, and it seems pretty straightforward, but my experience with building XQuartz is literally a handful of times, so I'm sure someone else could do it better... ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] travis: Also build on OSX
Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- .travis.yml | 14 -- test/scripts/build-travis-osx.sh | 31 +++ 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100755 test/scripts/build-travis-osx.sh diff --git a/.travis.yml b/.travis.yml index edeed0d90..a70b55f4c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,19 @@ language: c cache: ccache -dist: trusty -services: docker + +matrix: + include: + - os: linux + dist: trusty + services: docker + - os: osx before_install: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull anholt/xserver-travis ; fi +install: + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache ; fi + before_script: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM anholt/xserver-travis:v6 > Dockerfile ; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile ; fi @@ -13,3 +21,5 @@ before_script: script: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run --volume $HOME/.ccache:/root/.ccache withgit /bin/sh -c "cd /root && ./test/scripts/build-travis-deps.sh" ; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./test/scripts/build-travis-osx.sh ; fi + - ccache -s diff --git a/test/scripts/build-travis-osx.sh b/test/scripts/build-travis-osx.sh new file mode 100755 index 0..86e96e0c5 --- /dev/null +++ b/test/scripts/build-travis-osx.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +# +# based on instructions for building xorg-server in https://www.xquartz.org/Developer-Info.html +# + +# install XQuartz for libraries, headers, etc. +XQUARTZ_VERSION="2.7.11" +wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg +hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg +sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target / +hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION} + +# build environment +export PATH="/opt/X11/bin:${PATH}" +export PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}" +export ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal" +export CFLAGS="-Wall -O0 -ggdb3 -arch i386 -arch x86_64 -pipe" +export CXXFLAGS=$CFLAGS +export OBJCFLAGS=$CFLAGS +export LDFLAGS=$CFLAGS + +# travis currently requires explicit ccache setup on OSX +export PATH="/usr/local/opt/ccache/libexec:$PATH" + +# build +autoreconf -fvi +./configure --prefix=/opt/X11 --disable-dependency-tracking --with-apple-application-name=XQuartz --with-bundle-id-prefix=org.macosforge.xquartz +make +make check +make install DESTDIR=$(pwd)/staging -- 2.14.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] meson: Make it possible to build for 32-bit targets
Setting glx_align64 to '' gives a null string in the arguments list passed to the compiler. This is taken as an input filename, leading to: "cc: error: : No such file or directory" Instead, assign an empty list to glx_align64, which gets flattened to nothing in the arguments list. Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- include/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/meson.build b/include/meson.build index 05ef76930..a772d565f 100644 --- a/include/meson.build +++ b/include/meson.build @@ -31,7 +31,7 @@ else conf_data.set('X_BYTE_ORDER', 'X_BIG_ENDIAN') endif -glx_align64 = '' +glx_align64 = [] if cc.sizeof('unsigned long') == 8 conf_data.set('_XSERVER64', '1') glx_align64 = '-D__GLX_ALIGN64' -- 2.14.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 1/2] Revert "dmx: fix linking"
Since commit 3ef16dfb9830bd6b41ae428f4f213ae0c35c1056, "dmx: fix linking", linking dmx is broken for me: CCLD Xdmx.exe ../../render/.libs/librender.a(glyph.o): In function `HashGlyph': /wip/xserver/build.x86_64/../render/glyph.c:168: undefined reference to `x_sha1_init' /wip/xserver/build.x86_64/../render/glyph.c:174: undefined reference to `x_sha1_update' /wip/xserver/build.x86_64/../render/glyph.c:177: undefined reference to `x_sha1_update' /wip/xserver/build.x86_64/../render/glyph.c:180: undefined reference to `x_sha1_final' ../../render/.libs/librender.a(mipict.o): In function `miClipPictureReg': /wip/xserver/build.x86_64/../render/mipict.c:233: undefined reference to `pixman_region_n_rects' /wip/xserver/build.x86_64/../render/mipict.c:234: undefined reference to `pixman_region_n_rects' /wip/xserver/build.x86_64/../render/mipict.c:235: undefined reference to `pixman_region_rectangles' /wip/xserver/build.x86_64/../render/mipict.c:236: undefined reference to `pixman_region_rectangles' /wip/xserver/build.x86_64/../render/mipict.c:248: undefined reference to `pixman_region_init' /wip/xserver/build.x86_64/../render/mipict.c:251: undefined reference to `pixman_region_not_empty' /wip/xserver/build.x86_64/../render/mipict.c:261: undefined reference to `pixman_region_not_empty' ../../render/.libs/librender.a(mipict.o): In function `miComputeCompositeRegion': /wip/xserver/build.x86_64/../render/mipict.c:340: undefined reference to `pixman_region_init' The change this was fixing appears to be effectively reverted by 542d9f6807ac06b70f564ccab10af69fa21a1221, so just revert commit 3ef16dfb9830bd6b41ae428f4f213ae0c35c1056. Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- hw/dmx/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am index 38d6ac409..eef84cb66 100644 --- a/hw/dmx/Makefile.am +++ b/hw/dmx/Makefile.am @@ -80,8 +80,7 @@ XDMX_LIBS = \ Xdmx_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) Xdmx_DEPENDENCIES= $(XDMX_LIBS) -Xdmx_LDADD = $(XDMX_LIBS) $(XDMX_SYS_LIBS) $(XSERVER_SYS_LIBS) \ - $(top_builddir)/render/librender.la +Xdmx_LDADD = $(XDMX_LIBS) $(XDMX_SYS_LIBS) $(XSERVER_SYS_LIBS) relink: $(AM_V_at)rm -f Xdmx$(EXEEXT) && $(MAKE) Xdmx$(EXEEXT) -- 2.14.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 0/2] AppVeyor CI
Jon Turney (2): Revert "dmx: fix linking" Add an .appveyor.yml for AppVeyor CI .appveyor.yml | 29 + hw/dmx/Makefile.am | 3 +-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 .appveyor.yml -- 2.14.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 2/2] Add an .appveyor.yml for AppVeyor CI
This currently does an autotools build using Cygwin. Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- .appveyor.yml | 29 + 1 file changed, 29 insertions(+) create mode 100644 .appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 0..c638d2320 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,29 @@ +version: '{build}' +skip_tags: true +environment: + CYGWIN_MIRROR: http://cygwin.mirror.constant.com + CACHE: C:\cache + matrix: + - BUILD: i686-pc-cygwin + - BUILD: x86_64-pc-cygwin +install: +- if "%BUILD%"=="x86_64-pc-cygwin" set SETUP=setup-x86_64.exe && set CYGWIN_ROOT=C:\cygwin64 +- if "%BUILD%"=="i686-pc-cygwin" set SETUP=setup-x86.exe && set CYGWIN_ROOT=C:\cygwin +- curl -fsSL https://gist.githubusercontent.com/jon-turney/0338af595313f598bfab15a0ac0df847/raw/bd0eeca6be899e7846aa988fbcf15e4e12f5f842/zp_libtool_cleanlafiles.sh -o %CYGWIN_ROOT%\etc\postinstall\zp_libtool_cleanlafiles.sh +- echo Updating Cygwin and installing build prerequisites +- '%CYGWIN_ROOT%\%SETUP% -qnNdO -R "%CYGWIN_ROOT%" -s "%CYGWIN_MIRROR%" -l "%CACHE%" -g -P "autoconf,automake,binutils,bison,bzip2,diffutils,fileutils,findutils,flex,gawk,gcc-core,libtool,make,patch,pkg-config,python3,sed,tar,bigreqsproto,compositeproto,damageproto,dmxproto,fixesproto,fontsproto,glproto,inputproto,kbproto,presentproto,randrproto,recordproto,renderproto,resourceproto,scrnsaverproto,windowsdriproto,xcmiscproto,xextproto,xf86bigfontproto,xineramaproto,xproto,libdmx-devel,libfontenc-devel,libfreetype-devel,libGL-devel,libpixman1-devel,libX11-devel,libXRes-devel,libXau-devel,libXaw-devel,libXdmcp-devel,libXext-devel,libXfont2-devel,libXi-devel,libXinerama-devel,libXmu-devel,libXpm-devel,libXrender-devel,libXtst-devel,libxcb-ewmh-devel,libxcb-icccm-devel,libxcb-image-devel,libxcb-keysyms-devel,libxcb-randr-devel,libxcb-render-devel,libxcb-render-util-devel,libxcb-shape-devel,libxcb-util-devel,libxcb-xkb-devel,libxkbfile-devel,zlib,font-util,khronos-opengl-registry,python3 -lxml,xorg-util-macros,xtrans,xkbcomp,xkeyboard-config"' +- echo Install done +cache: +- C:\cache +build_script: +- SET PATH=%CYGWIN_ROOT%/bin +- '%CYGWIN_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; autoreconf -fvi"' +- '%CYGWIN_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; ./configure --prefix=/usr --disable-xv --disable-glamor --enable-xf86bigfont --enable-dmx --enable-kdrive --enable-xephyr --enable-xnest --enable-xvfb --enable-xwin --enable-xorg"' +- '%CYGWIN_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; make"' +test_script: +- '%CYGWIN_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; make check"' +after_test: +- '%CYGWIN_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; make install DESTDIR=$(pwd)/staging"' +artifacts: +- path: staging +deploy: off -- 2.14.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 0/7] xwin: misc small fixes
On 03/08/2017 20:15, Emil Velikov wrote: Hi all, Here's a few small cleanups that I had lying around for months. Patches are dead trivial, although completely untested. Please review, Thanks very much for doing this. Getting rid of those conditionals has been on my todo list for a long time... With the small corrections noted for 4/7 and 5/7, Reviewed-by: Jon Turney <jon.tur...@dronecode.org.uk> ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 4/7] xwin: remove always true/set XWIN_CLIPBOARD conditional/define
On 03/08/2017 20:15, Emil Velikov wrote: --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -264,9 +264,7 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; VisualPtr pVisual = NULL; -#if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW) int iReturn; -#endif /* Create framebuffer */ if (!(*pScreenPriv->pwinInitScreen) (pScreen)) { @@ -504,7 +502,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = pScreenPriv->pwinCloseScreen; -#if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW) /* Create a mutex for modules in separate threads to wait for */ iReturn = pthread_mutex_init(>pmServerStarted, NULL); if (iReturn != 0) { The matching #endif needs to be removed. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 0/4] meson building Xorg server on Cygwin
On 27/06/2017 17:45, Adam Jackson wrote: On Mon, 2017-06-26 at 14:54 +0100, Jon Turney wrote: Additions to meson build for building the Xorg server on Cygwin (cf. changes to autotools build in commit c7b16255) Note that 4/4 relies on a meson PR which is not yet accepted. Jon Turney (4): Move statically linked xorgxkb files from dixmods to a separate directory meson: Shuffle around subdirs so we build Xorg loadable modules after Xorg meson: Use --export-all-symbols when building PE/COFF objects 1/3 broke 'make check' because it missed test/Makefile.am. Fixed that up and merged these three: Thanks for catching that. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 1/4] Move statically linked xorgxkb files from dixmods to a separate directory
--- configure.ac | 1 + hw/xfree86/Makefile.am | 10 +- hw/xfree86/dixmods/Makefile.am | 4 +--- hw/xfree86/dixmods/meson.build | 14 +- hw/xfree86/meson.build | 3 ++- hw/xfree86/xkb/Makefile.am | 6 ++ hw/xfree86/xkb/meson.build | 12 hw/xfree86/{dixmods => xkb}/xkbKillSrv.c | 0 hw/xfree86/{dixmods => xkb}/xkbPrivate.c | 0 hw/xfree86/{dixmods => xkb}/xkbVT.c | 0 10 files changed, 28 insertions(+), 22 deletions(-) create mode 100644 hw/xfree86/xkb/Makefile.am create mode 100644 hw/xfree86/xkb/meson.build rename hw/xfree86/{dixmods => xkb}/xkbKillSrv.c (100%) rename hw/xfree86/{dixmods => xkb}/xkbPrivate.c (100%) rename hw/xfree86/{dixmods => xkb}/xkbVT.c (100%) diff --git a/configure.ac b/configure.ac index 40ac1e78d..e202770c1 100644 --- a/configure.ac +++ b/configure.ac @@ -2497,6 +2497,7 @@ hw/xfree86/shadowfb/Makefile hw/xfree86/vbe/Makefile hw/xfree86/vgahw/Makefile hw/xfree86/x86emu/Makefile +hw/xfree86/xkb/Makefile hw/xfree86/utils/Makefile hw/xfree86/utils/man/Makefile hw/xfree86/utils/cvt/Makefile diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am index 85bd0bed0..b876b79ab 100644 --- a/hw/xfree86/Makefile.am +++ b/hw/xfree86/Makefile.am @@ -36,13 +36,13 @@ endif SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \ ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \ - $(DRI2_SUBDIR) . $(VBE_SUBDIR) i2c dixmods \ + $(DRI2_SUBDIR) . $(VBE_SUBDIR) i2c dixmods xkb \ fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man \ $(GLAMOR_EGL_SUBDIR) drivers DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ parser ramdac shadowfb vbe vgahw \ - loader dixmods dri dri2 exa modes \ + loader dixmods xkb dri dri2 exa modes \ utils doc man glamor_egl drivers bin_PROGRAMS = Xorg @@ -66,7 +66,7 @@ LOCAL_LIBS = \ ddc/libddc.la \ i2c/libi2c.la \ $(XORG_LIBS) \ -dixmods/libxorgxkb.la \ +xkb/libxorgxkb.la \ $(DRI_LIB) \ $(DRI2_LIB) \ $(DRI3_LIB) \ @@ -148,5 +148,5 @@ i2c/libi2c.la: dixmods/libdixmods.la: $(AM_V_at)cd dixmods && $(MAKE) libdixmods.la -dixmods/libxorgxkb.la: - $(AM_V_at)cd dixmods && $(MAKE) libxorgxkb.la +xkb/libxorgxkb.la: + $(AM_V_at)cd xkb && $(MAKE) libxorgxkb.la diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am index d534c789b..856659f98 100644 --- a/hw/xfree86/dixmods/Makefile.am +++ b/hw/xfree86/dixmods/Makefile.am @@ -1,4 +1,4 @@ -noinst_LTLIBRARIES = libdixmods.la libxorgxkb.la +noinst_LTLIBRARIES = libdixmods.la if GLX GLXMODS = libglx.la @@ -46,5 +46,3 @@ libshadow_la_SOURCES = shmodule.c libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c libdixmods_la_CFLAGS = $(AM_CFLAGS) - -libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c diff --git a/hw/xfree86/dixmods/meson.build b/hw/xfree86/dixmods/meson.build index e4ffdba93..ffaf3ef86 100644 --- a/hw/xfree86/dixmods/meson.build +++ b/hw/xfree86/dixmods/meson.build @@ -1,16 +1,3 @@ -srcs_xorg_dixmods = [ -'xkbVT.c', -'xkbPrivate.c', -'xkbKillSrv.c', -] - -xorg_dixmods = static_library('xorg_dixmods', -srcs_xorg_dixmods, -include_directories: [inc, xorg_inc], -dependencies: common_dep, -c_args: xorg_c_args, -) - shared_module( 'fb', 'fbmodule.c', @@ -36,6 +23,7 @@ shared_module( install: true, install_dir: module_dir, ) + shared_module( 'shadow', 'shmodule.c', diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build index 1df7313fe..ee872de9b 100644 --- a/hw/xfree86/meson.build +++ b/hw/xfree86/meson.build @@ -57,6 +57,7 @@ endif if build_vgahw subdir('vgahw') endif +subdir('xkb') if build_modesetting subdir('drivers/modesetting') endif @@ -75,7 +76,7 @@ xorg_link = [ xorg_common, xorg_loader, xorg_ddc, -xorg_dixmods, +xorg_xkb, xorg_i2c, xorg_modes, xorg_os_support, diff --git a/hw/xfree86/xkb/Makefile.am b/hw/xfree86/xkb/Makefile.am new file mode 100644 index 0..252cf3b5d --- /dev/null +++ b/hw/xfree86/xkb/Makefile.am @@ -0,0 +1,6 @@ +noinst_LTLIBRARIES = libxorgxkb.la + +AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ +AM_CPPFLAGS = @XORG_INCS@ + +libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c diff --git a/hw/xfree86/xkb/meson.build b/hw/xfree86/xkb/meson.build new file mode 100644 index 0..894aa5ca3 --- /dev/null +++ b/hw/xfree86/xkb/meson.build @@ -0,0 +1,12 @@ +srcs_xorg_xkb = [ +'xkbVT.c', +'xkbPrivate.c', +'xkbKillSrv.c', +] + +xorg_xkb = static_library('xorg_xkb', +srcs_xorg_xkb, +include_directories: [inc, xorg_inc], +dependencies: common_dep, +c_args: xorg_c_args, +) diff --git
[PATCH xserver 0/4] meson building Xorg server on Cygwin
Additions to meson build for building the Xorg server on Cygwin (cf. changes to autotools build in commit c7b16255) Note that 4/4 relies on a meson PR which is not yet accepted. Jon Turney (4): Move statically linked xorgxkb files from dixmods to a separate directory meson: Shuffle around subdirs so we build Xorg loadable modules after Xorg meson: Use --export-all-symbols when building PE/COFF objects meson: Fix linkage of loadable modules for PE/COFF configure.ac | 1 + hw/xfree86/Makefile.am | 10 ++--- hw/xfree86/dixmods/Makefile.am | 4 +- hw/xfree86/dixmods/meson.build | 20 +++--- hw/xfree86/exa/meson.build | 2 +- hw/xfree86/fbdevhw/meson.build | 1 + hw/xfree86/meson.build | 66 ++-- hw/xfree86/shadowfb/meson.build | 1 + hw/xfree86/xkb/Makefile.am | 6 +++ hw/xfree86/xkb/meson.build | 12 ++ hw/xfree86/{dixmods => xkb}/xkbKillSrv.c | 0 hw/xfree86/{dixmods => xkb}/xkbPrivate.c | 0 hw/xfree86/{dixmods => xkb}/xkbVT.c | 0 13 files changed, 72 insertions(+), 51 deletions(-) create mode 100644 hw/xfree86/xkb/Makefile.am create mode 100644 hw/xfree86/xkb/meson.build rename hw/xfree86/{dixmods => xkb}/xkbKillSrv.c (100%) rename hw/xfree86/{dixmods => xkb}/xkbPrivate.c (100%) rename hw/xfree86/{dixmods => xkb}/xkbVT.c (100%) -- 2.12.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 4/4] meson: Fix linkage of loadable modules for PE/COFF
For the loadable modules it makes sense to build for PE/COFF targets, link those loadable modules with the import library for the Xorg executable, so that symbols provided by the executable can be satisfied at link time (as required by PE/COFF). This requires a meson with PR #1955. Since this uses the implib: kwarg for executable() introduced in that PR, which is a syntax error with older meson, this patch cannot be applied until that PR is in a meson release, and we can update the minimum meson version which we require in project() to that. --- hw/xfree86/dixmods/meson.build | 6 +- hw/xfree86/exa/meson.build | 2 +- hw/xfree86/fbdevhw/meson.build | 1 + hw/xfree86/meson.build | 3 ++- hw/xfree86/shadowfb/meson.build | 1 + 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/dixmods/meson.build b/hw/xfree86/dixmods/meson.build index ffaf3ef86..835d23215 100644 --- a/hw/xfree86/dixmods/meson.build +++ b/hw/xfree86/dixmods/meson.build @@ -1,4 +1,4 @@ -shared_module( +fb = shared_module( 'fb', 'fbmodule.c', @@ -6,6 +6,7 @@ shared_module( c_args: xorg_c_args, dependencies: common_dep, link_whole: libxserver_fb, +link_with: e, install: true, install_dir: module_dir, @@ -19,6 +20,7 @@ shared_module( c_args: [ xorg_c_args, wfb_args ], dependencies: common_dep, link_whole: libxserver_wfb, +link_with: e, install: true, install_dir: module_dir, @@ -32,6 +34,7 @@ shared_module( c_args: xorg_c_args, dependencies: common_dep, link_whole: libxserver_miext_shadow, +link_with: [fb, e], install: true, install_dir: module_dir, @@ -46,6 +49,7 @@ if build_glx c_args: [ xorg_c_args, glx_align64 ], dependencies: [ common_dep, dl_dep ], link_whole: libxserver_glx, +link_with: e, install: true, install_dir: join_paths(module_dir, 'extensions') diff --git a/hw/xfree86/exa/meson.build b/hw/xfree86/exa/meson.build index bfc5590f8..5f5cf08a7 100644 --- a/hw/xfree86/exa/meson.build +++ b/hw/xfree86/exa/meson.build @@ -2,7 +2,7 @@ xorg_exa = shared_module('exa', 'examodule.c', include_directories: [inc, xorg_inc], dependencies: common_dep, -link_with: libxserver_exa, +link_with: [libxserver_exa, e], c_args: xorg_c_args, install: true, install_dir: module_dir, diff --git a/hw/xfree86/fbdevhw/meson.build b/hw/xfree86/fbdevhw/meson.build index 2f82e2d9f..35d66ef2c 100644 --- a/hw/xfree86/fbdevhw/meson.build +++ b/hw/xfree86/fbdevhw/meson.build @@ -11,6 +11,7 @@ shared_module('fbdevhw', c_args: xorg_c_args, install: true, install_dir: module_dir, +link_with: e, ) install_data('fbdevhw.h', install_dir: xorgsdkdir) diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build index 3c5f46f0b..3b1aa17ff 100644 --- a/hw/xfree86/meson.build +++ b/hw/xfree86/meson.build @@ -91,7 +91,7 @@ xorg_deps = [ libdrm_dep, ] -executable( +e = executable( 'Xorg', srcs_xorg, include_directories: [inc, xorg_inc], @@ -100,6 +100,7 @@ executable( link_args: linker_export_flags, c_args: xorg_c_args, install: true, +implib: true, ) # subdirs for modules loadable by Xorg diff --git a/hw/xfree86/shadowfb/meson.build b/hw/xfree86/shadowfb/meson.build index 0470ecbb5..7ecc9bc30 100644 --- a/hw/xfree86/shadowfb/meson.build +++ b/hw/xfree86/shadowfb/meson.build @@ -5,6 +5,7 @@ shared_module('shadowfb', c_args: xorg_c_args, install: true, install_dir: module_dir, +link_with: e, ) install_data('shadowfb.h', install_dir: xorgsdkdir) -- 2.12.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 3/4] meson: Use --export-all-symbols when building PE/COFF objects
--- hw/xfree86/meson.build | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build index 0975104c2..3c5f46f0b 100644 --- a/hw/xfree86/meson.build +++ b/hw/xfree86/meson.build @@ -71,6 +71,12 @@ if build_dri2 xorg_link += xorg_dri2 endif +if host_machine.system() == 'cygwin' or host_machine.system() == 'windows' +linker_export_flags = '-Wl,--export-all-symbols' +else +linker_export_flags = '-Wl,--export-dynamic' +endif + xorg_deps = [ pixman_dep, m_dep, @@ -91,7 +97,7 @@ executable( include_directories: [inc, xorg_inc], link_whole: xorg_link, dependencies: xorg_deps, -link_args: '-Wl,--export-dynamic', +link_args: linker_export_flags, c_args: xorg_c_args, install: true, ) @@ -127,7 +133,7 @@ xorgserver_lib = shared_library( include_directories: [inc, xorg_inc], link_whole: xorg_link, dependencies: xorg_deps, -link_args: '-Wl,--export-dynamic', +link_args: linker_export_flags, c_args: xorg_c_args, install: false, ) -- 2.12.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 2/4] meson: Shuffle around subdirs so we build Xorg loadable modules after Xorg
--- hw/xfree86/meson.build | 50 ++ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build index ee872de9b..0975104c2 100644 --- a/hw/xfree86/meson.build +++ b/hw/xfree86/meson.build @@ -23,44 +23,22 @@ if get_option('pciaccess') pciaccess_dep = dependency('pciaccess', version: '>= 0.12.901') endif +# subdirs for convenience libraries statically linked into Xorg subdir('common') subdir('ddc') -subdir('dixmods') -subdir('exa') -subdir('fbdevhw') -if gbm_dep.found() -subdir('glamor_egl') -endif -subdir('i2c') if build_dri1 subdir('dri') endif if build_dri2 subdir('dri2') endif - -if int10 != 'disabled' -if int10 == 'x86emu' -subdir('x86emu') -endif -subdir('int10') -endif +subdir('i2c') subdir('loader') subdir('modes') subdir('os-support') subdir('parser') subdir('ramdac') -subdir('shadowfb') -if build_vbe -subdir('vbe') -endif -if build_vgahw -subdir('vgahw') -endif subdir('xkb') -if build_modesetting - subdir('drivers/modesetting') -endif srcs_xorg = [ '../../mi/miinitext.c' @@ -118,6 +96,30 @@ executable( install: true, ) +# subdirs for modules loadable by Xorg +subdir('dixmods') +subdir('exa') +subdir('fbdevhw') +if gbm_dep.found() +subdir('glamor_egl') +endif +if int10 != 'disabled' +if int10 == 'x86emu' +subdir('x86emu') +endif +subdir('int10') +endif +subdir('shadowfb') +if build_vbe +subdir('vbe') +endif +if build_vgahw +subdir('vgahw') +endif +if build_modesetting + subdir('drivers/modesetting') +endif + # For symbol presence testing only xorgserver_lib = shared_library( 'xorgserver', -- 2.12.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] xfree86: Move DRICreatePCIBusID to xf86Pci.h
On 21/06/2017 20:58, Adam Jackson wrote: xf86str.h is parsed into sdksyms unconditionally but the symbol is only defined when building with PCI support. Move the decl to a header that sdksyms only parses when building PCI support. Signed-off-by: Adam Jackson <a...@redhat.com> --- hw/xfree86/common/xf86str.h | 2 -- hw/xfree86/os-support/bus/xf86Pci.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h index 79c4c9daf..edd91c745 100644 --- a/hw/xfree86/common/xf86str.h +++ b/hw/xfree86/common/xf86str.h @@ -771,6 +771,4 @@ typedef enum { ACTION_SWITCHSCREEN_PREV, } ActionEvent; -extern _X_EXPORT char *DRICreatePCIBusID(const struct pci_device *dev); - #endif /* _XF86STR_H */ diff --git a/hw/xfree86/os-support/bus/xf86Pci.h b/hw/xfree86/os-support/bus/xf86Pci.h index 210ab3d89..4dbe08bd7 100644 --- a/hw/xfree86/os-support/bus/xf86Pci.h +++ b/hw/xfree86/os-support/bus/xf86Pci.h @@ -234,5 +234,6 @@ /* Public PCI access functions */ extern _X_EXPORT Bool xf86scanpci(void); +extern _X_EXPORT char *DRICreatePCIBusID(const struct pci_device *dev); #endif /* _XF86PCI_H */ Thanks! That fixes things for me. Reviewed-by: Jon Turney <jon.tur...@dronecode.org.uk> ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 04/12] xfree86: Move DRICreatePCIBusID to the PCI code
On 16/06/2017 20:44, Adam Jackson wrote: This symbol is used by some DRI2+ drivers and there's nothing DRI1-specific about it. Signed-off-by: Adam Jackson--- hw/xfree86/common/xf86pciBus.c | 12 hw/xfree86/common/xf86str.h| 2 ++ hw/xfree86/dri/dri.c | 12 hw/xfree86/dri/dri.h | 2 -- 4 files changed, 14 insertions(+), 14 deletions(-) [...] diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h index edd91c745..79c4c9daf 100644 --- a/hw/xfree86/common/xf86str.h +++ b/hw/xfree86/common/xf86str.h @@ -771,4 +771,6 @@ typedef enum { ACTION_SWITCHSCREEN_PREV, } ActionEvent; +extern _X_EXPORT char *DRICreatePCIBusID(const struct pci_device *dev); + #endif /* _XF86STR_H */ It seems that moving DRICreatePCIBusID() to xf86str.h means that it now unconditionally appears in sdksyms.c. But the definition only exists if we're building with XORG_BUS_PCI. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PULL] meson patches
The following changes since commit 4212c884c423e5ce2cd3b4d67c0d656475fddc79: xfree86/modes: Use RRTransformEqual in xf86RandR12CrtcSet (2017-06-20 12:40:18 +0900) are available in the git repository at: git://people.freedesktop.org/~jturney/xserver for you to fetch changes up to fb212f2c1bcfb015112aa665dd1f25d9b80f86fc: meson: Make VBE and VGAHW modules optional (2017-06-20 13:07:20 +0100) Jon Turney (2): meson: Restore stub ossupport meson: Make VBE and VGAHW modules optional hw/xfree86/os-support/meson.build | 17 - meson.build | 24 ++-- meson_options.txt | 4 3 files changed, 42 insertions(+), 3 deletions(-) ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 1/2] meson: Restore stub ossupport
Don't build BSD ossupport when there is no specific support, build stubs Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- hw/xfree86/os-support/meson.build | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/os-support/meson.build b/hw/xfree86/os-support/meson.build index e48944761..dfb613e32 100644 --- a/hw/xfree86/os-support/meson.build +++ b/hw/xfree86/os-support/meson.build @@ -73,7 +73,7 @@ elif host_machine.system() == 'solaris' endif os_support_flags += '-DHAVE_SYSV_IPC' -else +elif host_machine.system().endswith('bsd') srcs_xorg_os_support += [ 'bsd/bsd_VTsw.c', 'bsd/bsd_bell.c', @@ -109,6 +109,21 @@ else else srcs_xorg_os_support += 'shared/agp_noop.c' endif +else +# stub ossupport +srcs_xorg_os_support += [ +'shared/VTsw_noop.c', +'shared/agp_noop.c', +'shared/ioperm_noop.c', +'shared/kmod_noop.c', +'shared/pm_noop.c', +'shared/vidmem.c', +'shared/posix_tty.c', +'shared/sigio.c', +'stub/stub_bell.c', +'stub/stub_init.c', +'stub/stub_video.c', +] endif xorg_os_support = static_library('xorg_os_support', -- 2.12.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 2/2] meson: Make VBE and VGAHW modules optional
Don't build them on platforms where they aren't meaningful. Note that autoconf defines WITH_VGAHW when building the VGAHW module, but that doesn't seem to be used anywhere, so we just drop that. Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- meson.build | 24 ++-- meson_options.txt | 4 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index f0b1ef0a2..79da23740 100644 --- a/meson.build +++ b/meson.build @@ -260,6 +260,28 @@ if libdrm_dep.found() build_modesetting = libdrm_dep.version().version_compare('>= 2.4.46') endif +build_vbe = false +if get_option('vbe') == 'auto' +if (host_machine.system() != 'darwin' and +host_machine.system() != 'windows' and +host_machine.system() != 'cygwin') +build_vbe = true +endif +else +build_vbe = get_option('vbe') == 'yes' +endif + +build_vgahw = false +if get_option('vgahw') == 'auto' +if (host_machine.system() != 'darwin' and +host_machine.system() != 'windows' and +host_machine.system() != 'cygwin') +build_vgahw = true +endif +else +build_vgahw = get_option('vgahw') == 'yes' +endif + # XXX: Allow configuration of these. build_apm = false build_acpi = false @@ -267,8 +289,6 @@ build_dpms = true build_mitshm = true build_res = true build_screensaver = true -build_vbe = true -build_vgahw = true build_xace = true build_xsecurity = true build_xf86bigfont = true diff --git a/meson_options.txt b/meson_options.txt index 56d5afa19..fc66f9f08 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -49,6 +49,10 @@ option('hal', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Enable HAL integration') option('systemd_logind', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Enable systemd-logind integration') +option('vbe', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', + description: 'Xorg VBE module') +option('vgahw', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', + description: 'Xorg VGA access module') option('dri1', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Build DRI1 extension (default: auto)') option('dri2', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Build DRI2 extension (default: auto)') -- 2.12.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 0/2] Meson patches
Jon Turney (2): meson: Restore stub ossupport meson: Make VBE and VGAHW modules optional hw/xfree86/os-support/meson.build | 17 - meson.build | 24 ++-- meson_options.txt | 4 3 files changed, 42 insertions(+), 3 deletions(-) -- 2.12.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH driver/xf86-video-nested] Update for removal of virtualFrom from ScrnInfoRec
Removed in xserver commit 76ef102b. Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- src/driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/driver.c b/src/driver.c index 0e3cb29..67eab71 100644 --- a/src/driver.c +++ b/src/driver.c @@ -443,7 +443,7 @@ NestedValidateModes(ScrnInfoPtr pScrn) { pScrn->modePool = NULL; -/* Now set virtualX, virtualY, displayWidth and virtualFrom */ +/* Now set virtualX, virtualY and displayWidth*/ if (pScrn->display->virtualX >= pScrn->modes->HDisplay && pScrn->display->virtualY >= pScrn->modes->VDisplay) { @@ -465,7 +465,6 @@ NestedValidateModes(ScrnInfoPtr pScrn) { pScrn->virtualX = maxX; pScrn->virtualY = maxY; } -pScrn->virtualFrom = X_DEFAULT; pScrn->displayWidth = pScrn->virtualX; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Virtual size: %dx%d\n", -- 2.12.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PULL] meson.build for hw/xwin
The following changes since commit 4f29366f1e5678505fb882143c9b4a892d5b8273: xwayland: Don't load extension list more than once (2017-05-31 21:42:04 +1000) are available in the git repository at: git://people.freedesktop.org/~jturney/xserver for you to fetch changes up to e678a51ab1e3c6fbdf0ff377010ff2cc2f94b7f0: Add meson.build for XWin server (v2) (2017-06-02 15:10:48 +0100) Jon Turney (3): hw/xwin: Don't unconditionally include rootless.h hw/xwin: Remove pretense of Xv support Add meson.build for XWin server (v2) configure.ac | 2 - hw/meson.build | 4 + hw/xwin/Makefile.am | 16 +--- hw/xwin/dri/meson.build | 14 +++ hw/xwin/glx/meson.build | 100 hw/xwin/meson.build | 170 ++ hw/xwin/win.h| 2 + hw/xwin/winclipboard/meson.build | 31 +++ hw/xwin/winvideo.c | 191 --- include/meson.build | 32 +-- include/xwin-config.h.meson.in | 24 + meson.build | 13 ++- meson_options.txt| 5 + 13 files changed, 392 insertions(+), 212 deletions(-) create mode 100644 hw/xwin/dri/meson.build create mode 100644 hw/xwin/glx/meson.build create mode 100644 hw/xwin/meson.build create mode 100644 hw/xwin/winclipboard/meson.build delete mode 100644 hw/xwin/winvideo.c create mode 100644 include/xwin-config.h.meson.in ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 3/3] Add meson.build for XWin server
On 23/05/2017 00:17, Eric Anholt wrote: Jon Turney <jon.tur...@dronecode.org.uk> writes: This needs a meson with PRs #1784, #1792 and #1794 Future work: remove conditionals which are always on, and simplify redundant CYGDEBUG conditionals This looks pretty good! Just a few little cleanups I see. Thanks for taking a look. +# There seem to be some stray comment markers in this file. Removed. + +xwin_glx_c_args = [] +xwin_glx_c_args += '-DXWIN_MULTIWINDOW' +xwin_glx_c_args += '-DXWIN_GLX_WINDOWS' This variable seems to be dead. +xwin_glx = static_library( +'XwinGLX', +srcs_windows_glx, +include_directories: [ +inc, +top_srcdir_inc, +include_directories('../'), +], +dependencies: pixman_dep, +c_args: xwin_c_args, ... should have been used here. + +if build_glx +if build_windowsdri +xwin_c_args += '-DXWIN_WINDOWS_DRI' +subdir('dri') +endif + xwin_c_args += '-DXWIN_GLX_WINDOWS' + xwin_sys_libs += '-lopengl32' + subdir('glx') Mismatched indentation Fixed. +if cc.sizeof('unsigned long') == 8 + xwin_data.set('_XSERVER64', '1') +endif xwin-config.h's definition of this one seems to be redundant with dix-config.h's. I think you could just drop this block and the value in xwin-config.h.meson.in. Yes, removed. Updated patch attached. From b614ffd5034faf2b720dab2e6c08689a11a330bd Mon Sep 17 00:00:00 2001 From: Jon Turney <jon.tur...@dronecode.org.uk> Date: Sun, 7 May 2017 20:53:04 +0100 Subject: [PATCH xserver 3/3] Add meson.build for XWin server (v2) This needs a meson with PRs #1784, #1792 and #1794 Future work: remove conditionals which are always on, and simplify redundant CYGDEBUG conditionals --- hw/meson.build | 4 + hw/xwin/dri/meson.build | 14 hw/xwin/glx/meson.build | 100 +++ hw/xwin/meson.build | 170 +++ hw/xwin/winclipboard/meson.build | 31 +++ include/meson.build | 32 ++-- include/xwin-config.h.meson.in | 24 ++ meson.build | 13 ++- meson_options.txt| 5 ++ 9 files changed, 386 insertions(+), 7 deletions(-) create mode 100644 hw/xwin/dri/meson.build create mode 100644 hw/xwin/glx/meson.build create mode 100644 hw/xwin/meson.build create mode 100644 hw/xwin/winclipboard/meson.build create mode 100644 include/xwin-config.h.meson.in diff --git a/hw/meson.build b/hw/meson.build index c389a995b..c0d2db3f5 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -23,3 +23,7 @@ endif if build_xwayland subdir('xwayland') endif + +if build_xwin +subdir('xwin') +endif diff --git a/hw/xwin/dri/meson.build b/hw/xwin/dri/meson.build new file mode 100644 index 0..0d8703c38 --- /dev/null +++ b/hw/xwin/dri/meson.build @@ -0,0 +1,14 @@ +srcs_windows_dri = [ +'windowsdri.c', +'windowsdri.h', +] + +xwin_windowsdri = static_library( +'WindowsDRI', +srcs_windows_dri, +include_directories: [ inc, include_directories('../') ], +dependencies: [ +windowsdri_dep, +pixman_dep, +], +) diff --git a/hw/xwin/glx/meson.build b/hw/xwin/glx/meson.build new file mode 100644 index 0..77ffeda28 --- /dev/null +++ b/hw/xwin/glx/meson.build @@ -0,0 +1,100 @@ +python3 = import('python3') + +# XWin requires OpenGL spec files in order to generate wrapper code for native GL functions +py3 = python3.find_python() +if run_command(py3, '-c', 'import lxml;').returncode() != 0 +error('python3 lxml module not found') +endif + +khronos_spec_dir = dependency('khronos-opengl-registry').get_pkgconfig_variable('specdir') + +gen_gl_wrappers_opts= ['-nodebug'] +gen_gl_wrappers_cmd = ['env', 'PYTHONPATH=' + khronos_spec_dir, py3, files('./gen_gl_wrappers.py'), gen_gl_wrappers_opts] + +wgl_wrappers = custom_target( +'gen_wgl_wrappers', +command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-prefix', 'wgl', '-wrapper', '-preresolve', '-outfile', '@OUTPUT@'], +input: join_paths(khronos_spec_dir, 'wgl.xml'), +output: 'generated_wgl_wrappers.c', +depend_files: join_paths(khronos_spec_dir, 'reg.py'), +) + +gl_shim = custom_target( +'gen_gl_shim', +command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-shim', '-outfile', '@OUTPUT@'], +input: join_paths(khronos_spec_dir, 'gl.xml'), +output: 'generated_gl_shim.c', +depend_files: join_paths(khronos_spec_dir, 'reg.py'), +) + +gl_thunks = custom_target( +'gen_gl_thunks', +command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-thunk', '-outfile', '@OUTPUT@'], +input: join_paths(khronos_spec_dir, 'gl.xml'), +output: 'generated_gl_thunks.c', +depend_files: join_paths(khronos_spec_dir, 'reg.py'), +) + +gl_thunks_def = custom_target( +'gen_gl_thunks_def', +command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-thunkdefs', '-outfile', '@OUTPUT@'], +input
[PATCH xserver 3/3] Add meson.build for XWin server
This needs a meson with PRs #1784, #1792 and #1794 Future work: remove conditionals which are always on, and simplify redundant CYGDEBUG conditionals --- hw/meson.build | 4 + hw/xwin/dri/meson.build | 14 hw/xwin/glx/meson.build | 101 +++ hw/xwin/meson.build | 170 +++ hw/xwin/winclipboard/meson.build | 31 +++ include/meson.build | 35 ++-- include/xwin-config.h.meson.in | 27 +++ meson.build | 13 ++- meson_options.txt| 5 ++ 9 files changed, 393 insertions(+), 7 deletions(-) create mode 100644 hw/xwin/dri/meson.build create mode 100644 hw/xwin/glx/meson.build create mode 100644 hw/xwin/meson.build create mode 100644 hw/xwin/winclipboard/meson.build create mode 100644 include/xwin-config.h.meson.in diff --git a/hw/meson.build b/hw/meson.build index c389a995b..c0d2db3f5 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -23,3 +23,7 @@ endif if build_xwayland subdir('xwayland') endif + +if build_xwin +subdir('xwin') +endif diff --git a/hw/xwin/dri/meson.build b/hw/xwin/dri/meson.build new file mode 100644 index 0..0d8703c38 --- /dev/null +++ b/hw/xwin/dri/meson.build @@ -0,0 +1,14 @@ +srcs_windows_dri = [ +'windowsdri.c', +'windowsdri.h', +] + +xwin_windowsdri = static_library( +'WindowsDRI', +srcs_windows_dri, +include_directories: [ inc, include_directories('../') ], +dependencies: [ +windowsdri_dep, +pixman_dep, +], +) diff --git a/hw/xwin/glx/meson.build b/hw/xwin/glx/meson.build new file mode 100644 index 0..5ce593c2b --- /dev/null +++ b/hw/xwin/glx/meson.build @@ -0,0 +1,101 @@ +python3 = import('python3') + +# XWin requires OpenGL spec files in order to generate wrapper code for native GL functions +py3 = python3.find_python() +if run_command(py3, '-c', 'import lxml;').returncode() != 0 +error('python3 lxml module not found') +endif + +khronos_spec_dir = dependency('khronos-opengl-registry').get_pkgconfig_variable('specdir') + +gen_gl_wrappers_opts= ['-nodebug'] +gen_gl_wrappers_cmd = ['env', 'PYTHONPATH=' + khronos_spec_dir, py3, files('./gen_gl_wrappers.py'), gen_gl_wrappers_opts] + +wgl_wrappers = custom_target( +'gen_wgl_wrappers', +command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-prefix', 'wgl', '-wrapper', '-preresolve', '-outfile', '@OUTPUT@'], +input: join_paths(khronos_spec_dir, 'wgl.xml'), +output: 'generated_wgl_wrappers.c', +depend_files: join_paths(khronos_spec_dir, 'reg.py'), +) + +gl_shim = custom_target( +'gen_gl_shim', +command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-shim', '-outfile', '@OUTPUT@'], +input: join_paths(khronos_spec_dir, 'gl.xml'), +output: 'generated_gl_shim.c', +depend_files: join_paths(khronos_spec_dir, 'reg.py'), +) + +gl_thunks = custom_target( +'gen_gl_thunks', +command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-thunk', '-outfile', '@OUTPUT@'], +input: join_paths(khronos_spec_dir, 'gl.xml'), +output: 'generated_gl_thunks.c', +depend_files: join_paths(khronos_spec_dir, 'reg.py'), +) + +gl_thunks_def = custom_target( +'gen_gl_thunks_def', +command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-thunkdefs', '-outfile', '@OUTPUT@'], +input: join_paths(khronos_spec_dir, 'gl.xml'), +output: 'generated_gl_thunks.def', +depend_files: join_paths(khronos_spec_dir, 'reg.py'), +) + +# +srcs_windows_glx = [ +'winpriv.c', +'winpriv.h', +'glwindows.h', +'glshim.c', +'indirect.c', +'indirect.h', +'wgl_ext_api.c', +'wgl_ext_api.h', +] + +if build_windowsdri +srcs_windows_glx += [ +'dri_helpers.c', +'dri_helpers.h', +] +endif + +xwin_glx_c_args = [] +xwin_glx_c_args += '-DXWIN_MULTIWINDOW' +xwin_glx_c_args += '-DXWIN_GLX_WINDOWS' + +xwin_glx = static_library( +'XwinGLX', +srcs_windows_glx, +include_directories: [ +inc, +top_srcdir_inc, +include_directories('../'), +], +dependencies: pixman_dep, +c_args: xwin_c_args, +) + +# +srcs_wgl_thunk = [ +'glthunk.c', +] + +WGLthunk = shared_library( +'nativeGLthunk', +srcs_wgl_thunk, +include_directories: [ +inc, +top_srcdir_inc, +], +c_args: [ + '-Wno-unused-function', + '-Wno-missing-prototypes', + '-Wno-missing-declarations', +], +link_args: ['-lopengl32'], +vs_module_defs: gl_thunks_def, +install: true, +) diff --git a/hw/xwin/meson.build b/hw/xwin/meson.build new file mode 100644 index 0..d12a68bb1 --- /dev/null +++ b/hw/xwin/meson.build @@ -0,0 +1,170 @@ +windows = import('windows') + +windowsdri_dep = dependency('windowsdriproto', required: false) + +build_windowsdri = windowsdri_dep.found() + +xwin_sys_libs = [] +xwin_sys_libs += '-ldxguid' + +if host_machine.system() == 'cygwin'
[PATCH xserver 2/3] hw/xwin: Remove pretense of Xv support
--- configure.ac| 2 - hw/xwin/Makefile.am | 12 +--- hw/xwin/winvideo.c | 191 3 files changed, 2 insertions(+), 203 deletions(-) delete mode 100644 hw/xwin/winvideo.c diff --git a/configure.ac b/configure.ac index faf0753d6..40ac1e78d 100644 --- a/configure.ac +++ b/configure.ac @@ -666,7 +666,6 @@ case $host_os in XF86UTILS=no XF86VIDMODE=no XSELINUX=no - XV=no SYMBOL_VISIBILITY=no ;; darwin*) @@ -2198,7 +2197,6 @@ AM_CONDITIONAL(XWIN_CLIPBOARD, [test "x$XWIN" = xyes]) AM_CONDITIONAL(XWIN_GLX_WINDOWS, [test "x$XWIN" = xyes && test "x$GLX" = xyes]) AM_CONDITIONAL(XWIN_WINDOWS_DRI, [test "x$XWIN" = xyes && test "x$WINDOWSDRI" = xyes]) AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes]) -AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes]) dnl Darwin / OS X DDX if test "x$XQUARTZ" = xyes; then diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am index 4d288c959..413722c71 100644 --- a/hw/xwin/Makefile.am +++ b/hw/xwin/Makefile.am @@ -52,12 +52,6 @@ SRCS_RANDR = \ DEFS_RANDR = -DXWIN_RANDR endif -if XWIN_XV -SRCS_XV = \ - winvideo.c -DEFS_XV = -DXWIN_XV -endif - SRCS = InitInput.c \ InitOutput.c \ winallpriv.c \ @@ -119,8 +113,7 @@ SRCS = InitInput.c \ $(SRCS_MULTIWINDOWEXTWM) \ $(SRCS_NATIVEGDI) \ $(SRCS_PRIMARYFB) \ - $(SRCS_RANDR) \ - $(SRCS_XV) + $(SRCS_RANDR) DEFS = $(DEFS_CLIPBOARD) \ $(DEFS_GLX_WINDOWS) \ @@ -128,8 +121,7 @@ SRCS = InitInput.c \ $(DEFS_MULTIWINDOWEXTWM) \ $(DEFS_NATIVEGDI) \ $(DEFS_PRIMARYFB) \ - $(DEFS_RANDR) \ - $(DEFS_XV) + $(DEFS_RANDR) XWin_SOURCES = $(SRCS) diff --git a/hw/xwin/winvideo.c b/hw/xwin/winvideo.c deleted file mode 100644 index 151538d10..0 --- a/hw/xwin/winvideo.c +++ /dev/null @@ -1,191 +0,0 @@ -/* - *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. - * - *Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - *"Software"), to deal in the Software without restriction, including - *without limitation the rights to use, copy, modify, merge, publish, - *distribute, sublicense, and/or sell copies of the Software, and to - *permit persons to whom the Software is furnished to do so, subject to - *the following conditions: - * - *The above copyright notice and this permission notice shall be - *included in all copies or substantial portions of the Software. - * - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - *NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR - *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF - *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - *Except as contained in this notice, the name of Harold L Hunt II - *shall not be used in advertising or otherwise to promote the sale, use - *or other dealings in this Software without prior written authorization - *from Harold L Hunt II. - * - * Authors:Harold L Hunt II - */ - -#ifdef HAVE_XWIN_CONFIG_H -#include -#endif -#include "win.h" -#include -#include - -void - winInitVideo(ScreenPtr pScreen); - -/* - * winInitVideo - Initialize support for the X Video (Xv) Extension. - */ - -void -winInitVideo(ScreenPtr pScreen) -{ -winScreenPriv(pScreen); -winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; - -if (pScreenInfo->dwBPP > 8) { - -} - -} - -#if 0 -#include "../xfree86/common/xf86.h" -#include "../Xext/xvdix.h" -#include "../xfree86/common/xf86xv.h" -#include -#endif - -#if 0 -/* client libraries expect an encoding */ -static XF86VideoEncodingRec DummyEncoding[1] = { -{ - 0, - "XV_IMAGE", - IMAGE_MAX_WIDTH, IMAGE_MAX_HEIGHT, - {1, 1} - } -}; - -#define NUM_FORMATS 3 - -static XF86VideoFormatRec Formats[NUM_FORMATS] = { -{15, TrueColor}, {16, TrueColor}, {24, TrueColor} -}; - -#define NUM_ATTRIBUTES 3 - -static XF86AttributeRec Attributes[NUM_ATTRIBUTES] = { -{XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLORKEY"}, -{XvSettable | XvGettable, -128, 127, "XV_BRIGHTNESS"}, -{XvSettable | XvGettable, 0, 255, "XV_CONTRAST"} -}; - -#define NUM_IMAGES 4 - -static XF86ImageRec Images[NUM_IMAGES] = { -XVIMAGE_YUY2, -XVIMAGE_YV12, -XVIMAGE_I420, -XVIMAGE_UYVY -}; - -/* - * winInitVideo - Initialize support for the X Video (Xv) Extension. - */ - -void -winInitVideo(ScreenPtr pScreen) -{ -winScreenPriv(pScreen); -winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; -XF86VideoAdaptorPtr newAdaptor = NULL; - -if
[PATCH xserver 1/3] hw/xwin: Don't unconditionally include rootless.h
Don't unconditionally include rootless.h, and so we don't need to add rootless to the include path unless building MWEXTWM. --- hw/xwin/Makefile.am | 4 ++-- hw/xwin/win.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am index e71240a79..4d288c959 100644 --- a/hw/xwin/Makefile.am +++ b/hw/xwin/Makefile.am @@ -43,6 +43,7 @@ SRCS_MULTIWINDOWEXTWM = \ winwindowswm.c DEFS_MULTIWINDOWEXTWM = -DXWIN_MULTIWINDOWEXTWM MULTIWINDOWEXTWM_LIBS = $(top_builddir)/miext/rootless/librootless.la +MULTIWINDOWEXTWM_CFLAGS = -I$(top_srcdir)/miext/rootless endif if XWIN_RANDR @@ -132,8 +133,6 @@ SRCS = InitInput.c \ XWin_SOURCES = $(SRCS) -AM_CPPFLAGS = -I$(top_srcdir)/miext/rootless - XWIN_SYS_LIBS += -ldxguid XWIN_LIBS += \ @@ -178,6 +177,7 @@ AM_LFLAGS = -i AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \ $(XWINMODULES_CFLAGS) \ -I$(top_srcdir) \ +$(MULTIWINDOWEXTWM_CFLAGS) \ -Wno-bad-function-cast xwinconfigdir = $(sysconfdir)/X11 diff --git a/hw/xwin/win.h b/hw/xwin/win.h index 103c4b9a9..93103c4f8 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -165,7 +165,9 @@ #include "miline.h" #include "shadow.h" #include "fb.h" +#ifdef XWIN_MULTIWINDOWEXTWM #include "rootless.h" +#endif #include "mipict.h" #include "picturestr.h" -- 2.12.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 0/3] meson.build for hw/xwin
Jon Turney (3): hw/xwin: Don't unconditionally include rootless.h hw/xwin: Remove pretense of Xv support Add meson.build for XWin server configure.ac | 2 - hw/meson.build | 4 + hw/xwin/Makefile.am | 16 +--- hw/xwin/dri/meson.build | 14 +++ hw/xwin/glx/meson.build | 101 + hw/xwin/meson.build | 170 ++ hw/xwin/win.h| 2 + hw/xwin/winclipboard/meson.build | 31 +++ hw/xwin/winvideo.c | 191 --- include/meson.build | 35 +-- include/xwin-config.h.meson.in | 27 ++ meson.build | 13 ++- meson_options.txt| 5 + 13 files changed, 399 insertions(+), 212 deletions(-) create mode 100644 hw/xwin/dri/meson.build create mode 100644 hw/xwin/glx/meson.build create mode 100644 hw/xwin/meson.build create mode 100644 hw/xwin/winclipboard/meson.build delete mode 100644 hw/xwin/winvideo.c create mode 100644 include/xwin-config.h.meson.in -- 2.12.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PULL] Mainly hw/xwin warning fixes
The following changes since commit 49c742557457ff9200a10f32daadfcea50d4911c: meson: Fix CLOCK_MONOTONIC test (2017-05-12 09:49:33 -0400) are available in the git repository at: git://people.freedesktop.org/~jturney/xserver for you to fetch changes up to 1520c6ad6783178a4d4538b7c549c7948e419af0: hw/xwin: Fix -Wunused-function warning for MessageName() in non-debug builds (2017-05-12 19:17:22 +0100) Jon Turney (4): Don't declare variables which will be unused if XSERVER_LIBPICACCESS isn't defined hw/xwin: Fix -Wmaybe-uninitialized warning in winWindowProc hw/xwin: Fix -Wmaybe-uninitialized warnings in engine CloseScreen wrappers hw/xwin: Fix -Wunused-function warning for MessageName() in non-debug builds hw/xfree86/common/xf86Config.c | 2 ++ hw/xwin/winmultiwindowwm.c | 2 ++ hw/xwin/winshadddnl.c | 2 +- hw/xwin/winshadgdi.c | 2 +- hw/xwin/winwndproc.c | 7 --- 5 files changed, 10 insertions(+), 5 deletions(-) ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 5/7] meson: Make XV optional
On 08/05/2017 18:13, Eric Anholt wrote: Jon Turney <jon.turney-grjqepx9rppajuda+fb...@public.gmane.org> writes: Signed-off-by: Jon Turney <jon.turney-grjqepx9rppajuda+fb...@public.gmane.org> --- meson.build | 11 ++- meson_options.txt | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index c7c9c79c3..5f30b996c 100644 --- a/meson.build +++ b/meson.build @@ -251,6 +251,16 @@ if libdrm_dep.found() build_modesetting = dependency('libdrm', version: '>= 2.4.46', required: false).found() endif +build_xv = false +if get_option('xv') == 'auto' +if (host_machine.system() != 'windows' and +host_machine.system() != 'cygwin') +build_xv = true +endif +else +build_xv = get_option('xv') == 'yes' +endif Optional XV seems a bit silly to me. Could we just do something like: build_xv = build_xorg || build_dmx || build_ephyr? I'm all for reducing the number of configuration options :) I think I'll just drop this patch. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 4/7] meson: Make driprotos and libdrm optional
On 08/05/2017 21:28, Jon Turney wrote: On 08/05/2017 18:12, Eric Anholt wrote: Jon Turney writes: +libxserver_dri3 = '' Pretty sure this should be = [] Yeah, me too. But when I try it: Meson encountered an error in file hw/kdrive/ephyr/meson.build, line 40, column 0: Link target [] is not library. Hmmm.. if I add it with libxserver += libxserver_dri3, it works, so it seems there is some kind of list flattening failure somewhere... Yes, it seems link_with: doesn't get flattened. https://github.com/mesonbuild/meson/issues/1764 Attached is a revised patch, which does the flattening by hand. From 5a0e35a7e32b1a40a8d453e7e297722e2474a955 Mon Sep 17 00:00:00 2001 From: Jon Turney <jon.tur...@dronecode.org.uk> Date: Sun, 16 Apr 2017 13:14:28 +0100 Subject: [PATCH xserver 4/7] meson: Make driprotos and libdrm optional Add options for DRI{1,2,3} shmfence is required for DRI3 libdrm is required for any DRI{1,2,3} Consolidate calls to dependency('libdrm') Set WITH_LIBDRM when building with libdrm (configure.ac had LIBDRM as independently disableable even if DRI{1,2,3} was enabled, but does that make sense?) v2: Initialize libxserver_dri3 to [] Manually flatten libxserver, since meson doesn't (currently) Use version_compare rather than circumloctions with dependency() Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- dri3/meson.build | 15 + hw/xfree86/dri/meson.build | 2 +- hw/xfree86/dri2/meson.build| 2 +- hw/xfree86/drivers/modesetting/meson.build | 2 +- hw/xfree86/meson.build | 6 ++-- hw/xfree86/os-support/meson.build | 2 +- include/meson.build| 4 +-- meson.build| 49 +- meson_options.txt | 4 +++ 9 files changed, 64 insertions(+), 22 deletions(-) diff --git a/dri3/meson.build b/dri3/meson.build index abb13c63a..3d05020e6 100644 --- a/dri3/meson.build +++ b/dri3/meson.build @@ -4,9 +4,12 @@ srcs_dri3 = [ 'dri3_screen.c', ] -libxserver_dri3 = static_library('libxserver_dri3', - srcs_dri3, - include_directories: inc, - dependencies: common_dep, - c_args: '-DHAVE_XORG_CONFIG_H' -) +libxserver_dri3 = [] +if build_dri3 +libxserver_dri3 = static_library('libxserver_dri3', +srcs_dri3, +include_directories: inc, +dependencies: common_dep, +c_args: '-DHAVE_XORG_CONFIG_H' +) +endif diff --git a/hw/xfree86/dri/meson.build b/hw/xfree86/dri/meson.build index 9baae100c..53d1e4f26 100644 --- a/hw/xfree86/dri/meson.build +++ b/hw/xfree86/dri/meson.build @@ -8,7 +8,7 @@ xorg_dri = static_library('xorg_dri', include_directories: [inc, xorg_inc], dependencies: [ common_dep, -dependency('libdrm'), +libdrm_dep, ], c_args: xorg_c_args, ) diff --git a/hw/xfree86/dri2/meson.build b/hw/xfree86/dri2/meson.build index 9e997d2f7..087a21131 100644 --- a/hw/xfree86/dri2/meson.build +++ b/hw/xfree86/dri2/meson.build @@ -8,7 +8,7 @@ xorg_dri2 = static_library('xorg_dri2', include_directories: [inc, xorg_inc], dependencies: [ common_dep, -dependency('libdrm'), +libdrm_dep, ], c_args: xorg_c_args, ) diff --git a/hw/xfree86/drivers/modesetting/meson.build b/hw/xfree86/drivers/modesetting/meson.build index 518d6c19e..e97dac36d 100644 --- a/hw/xfree86/drivers/modesetting/meson.build +++ b/hw/xfree86/drivers/modesetting/meson.build @@ -18,7 +18,7 @@ shared_module( dependencies: [ common_dep, udev_dep, -dependency('libdrm', version: '>= 2.4.46'), +libdrm_dep, ], install: true, diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build index 22de2fdd6..5360c22b9 100644 --- a/hw/xfree86/meson.build +++ b/hw/xfree86/meson.build @@ -57,7 +57,9 @@ endif if build_vgahw subdir('vgahw') endif -subdir('drivers/modesetting') +if build_modesetting + subdir('drivers/modesetting') +endif srcs_xorg = [ '../../mi/miinitext.c' @@ -106,7 +108,7 @@ executable( xfont2_dep, xshmfence_dep, config_dep, -dependency('libdrm'), +libdrm_dep, ], link_args: '-Wl,--export-dynamic', c_args: xorg_c_args, diff --git a/hw/xfree86/os-support/meson.build b/hw/xfree86/os-support/meson.build index a3c3b5688..e48944761 100644 --- a/hw/xfree86/os-support/meson.build +++ b/hw/xfree86/os-support/meson.build @@ -117,7 +117,7 @@ xorg_os_support = static_library('xorg_os_support', dependencies: [ common_dep, dbus_dep, -dependency('libdrm'), +libdrm_dep, ], c_args: xorg_c_args, ) diff --git a/include/meson.build b/include/meson.build index b7414bd67..a95cd7a19 100644 --- a/include/meson.build +++ b/include/meson.build @@ -61,8 +61,8 @@ conf_data.set_quoted('SHMDIR', '/tmp')
Re: [PATCH xserver 4/7] meson: Make driprotos and libdrm optional
On 08/05/2017 18:12, Eric Anholt wrote: Jon Turney writes: +libxserver_dri3 = '' Pretty sure this should be = [] Yeah, me too. But when I try it: Meson encountered an error in file hw/kdrive/ephyr/meson.build, line 40, column 0: Link target [] is not library. Hmmm.. if I add it with libxserver += libxserver_dri3, it works, so it seems there is some kind of list flattening failure somewhere... +libdrm_required = (get_option('dri1') == 'yes') or (get_option('dri2') == 'yes') or (get_option('dri3') == 'yes') +libdrm_dep = dependency('libdrm', version: '>= 2.3.1', required: libdrm_required) +build_modesetting = false +if libdrm_dep.found() + if build_dri2 +# 2.4.65 is required for drmGetDevice +dependency('libdrm', version: '>= 2.4.65') + endif + # 2.4.46 is required for cursor hotspot support. + build_modesetting = dependency('libdrm', version: '>= 2.4.46', required: false).found() +endif I think this is more clearly stated as: build_modesetting = libdrm_dep.version().version_compare('>= 2.4.46') Yes, much better. It's a bit of an odd choice (modesetting driver if you have dri1/2/3 enabled, or if libdrm happened to be found anyway), but that should be true so often I don't think it's worth worrying about. Yeah, it seems a bit strange to me that there is no explicit --enable-modesetting-driver in configure.ac ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 4/7] meson: Make driprotos and libdrm optional
Add options for DRI{1,2,3} shmfence is required for DRI3 libdrm is required for any DRI{1,2,3} Consolidate calls to dependency('libdrm') Set WITH_LIBDRM when building with libdrm (configure.ac had LIBDRM as independently disableable even if DRI{1,2,3} was enabled, but does that make sense?) Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- dri3/meson.build | 15 + hw/xfree86/dri/meson.build | 2 +- hw/xfree86/dri2/meson.build| 2 +- hw/xfree86/drivers/modesetting/meson.build | 2 +- hw/xfree86/meson.build | 6 ++-- hw/xfree86/os-support/meson.build | 2 +- include/meson.build| 4 +-- meson.build| 53 +- meson_options.txt | 4 +++ 9 files changed, 68 insertions(+), 22 deletions(-) diff --git a/dri3/meson.build b/dri3/meson.build index abb13c63a..736ffaa49 100644 --- a/dri3/meson.build +++ b/dri3/meson.build @@ -4,9 +4,12 @@ srcs_dri3 = [ 'dri3_screen.c', ] -libxserver_dri3 = static_library('libxserver_dri3', - srcs_dri3, - include_directories: inc, - dependencies: common_dep, - c_args: '-DHAVE_XORG_CONFIG_H' -) +libxserver_dri3 = '' +if build_dri3 +libxserver_dri3 = static_library('libxserver_dri3', +srcs_dri3, +include_directories: inc, +dependencies: common_dep, +c_args: '-DHAVE_XORG_CONFIG_H' +) +endif diff --git a/hw/xfree86/dri/meson.build b/hw/xfree86/dri/meson.build index 9baae100c..53d1e4f26 100644 --- a/hw/xfree86/dri/meson.build +++ b/hw/xfree86/dri/meson.build @@ -8,7 +8,7 @@ xorg_dri = static_library('xorg_dri', include_directories: [inc, xorg_inc], dependencies: [ common_dep, -dependency('libdrm'), +libdrm_dep, ], c_args: xorg_c_args, ) diff --git a/hw/xfree86/dri2/meson.build b/hw/xfree86/dri2/meson.build index 9e997d2f7..087a21131 100644 --- a/hw/xfree86/dri2/meson.build +++ b/hw/xfree86/dri2/meson.build @@ -8,7 +8,7 @@ xorg_dri2 = static_library('xorg_dri2', include_directories: [inc, xorg_inc], dependencies: [ common_dep, -dependency('libdrm'), +libdrm_dep, ], c_args: xorg_c_args, ) diff --git a/hw/xfree86/drivers/modesetting/meson.build b/hw/xfree86/drivers/modesetting/meson.build index 518d6c19e..e97dac36d 100644 --- a/hw/xfree86/drivers/modesetting/meson.build +++ b/hw/xfree86/drivers/modesetting/meson.build @@ -18,7 +18,7 @@ shared_module( dependencies: [ common_dep, udev_dep, -dependency('libdrm', version: '>= 2.4.46'), +libdrm_dep, ], install: true, diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build index 22de2fdd6..5360c22b9 100644 --- a/hw/xfree86/meson.build +++ b/hw/xfree86/meson.build @@ -57,7 +57,9 @@ endif if build_vgahw subdir('vgahw') endif -subdir('drivers/modesetting') +if build_modesetting + subdir('drivers/modesetting') +endif srcs_xorg = [ '../../mi/miinitext.c' @@ -106,7 +108,7 @@ executable( xfont2_dep, xshmfence_dep, config_dep, -dependency('libdrm'), +libdrm_dep, ], link_args: '-Wl,--export-dynamic', c_args: xorg_c_args, diff --git a/hw/xfree86/os-support/meson.build b/hw/xfree86/os-support/meson.build index a3c3b5688..e48944761 100644 --- a/hw/xfree86/os-support/meson.build +++ b/hw/xfree86/os-support/meson.build @@ -117,7 +117,7 @@ xorg_os_support = static_library('xorg_os_support', dependencies: [ common_dep, dbus_dep, -dependency('libdrm'), +libdrm_dep, ], c_args: xorg_c_args, ) diff --git a/include/meson.build b/include/meson.build index b7414bd67..a95cd7a19 100644 --- a/include/meson.build +++ b/include/meson.build @@ -61,8 +61,8 @@ conf_data.set_quoted('SHMDIR', '/tmp') conf_data.set('HAVE_SIGACTION', '1') # XXX conf_data.set('BUSFAULT', '1') # XXX -conf_data.set('XSHMFENCE', '1') # XXX -conf_data.set('WITH_LIBDRM', '1') # XXX +conf_data.set('XSHMFENCE', xshmfence_dep.found()) +conf_data.set('WITH_LIBDRM', libdrm_dep.found()) conf_data.set('GLAMOR_HAS_DRM_NAME_FROM_FD_2', dependency('libdrm', version: '>= 2.4.74', required: false).found()) conf_data.set('GLXEXT', build_glx) diff --git a/meson.build b/meson.build index df0d3aefa..c7c9c79c3 100644 --- a/meson.build +++ b/meson.build @@ -32,16 +32,16 @@ compositeproto_dep = dependency('compositeproto', version: '>= 0.4') recordproto_dep = dependency('recordproto', version: '>= 1.13.99.1') scrnsaverproto_dep = dependency('scrnsaverproto', version: '>= 1.1') resourceproto_dep = dependency('resourceproto', version: '>= 1.2.0') -xf86driproto_dep = dependency('xf86driproto', version: '>= 2.1.0') -dri2proto_dep = dependency('dri2proto', version: '>= 2.8') -dri3proto_dep = dependency
[PATCH xserver 7/7] meson: An empty array is not a dependency object
Using the meson idiom of initializing a variaible to an empty array to represent a null value does not work well for a variable expected to hold a dependency object, as trying to apply found() to it will fail (currently). I think this can be demonstrated by configuing with Dglamor=no, then gbm_dep is set to [] in meson.build, and then tested with found() in include/meson.build. Use dependency('') to create an empty dependency. Future work: In the autotools build GBM is required if build_xorg & build_glamor. I suspect that it was also required for build_xwayland & build_glamor, but that was never checked. That test seems to have gone missing in meson.build, the required:false when checking for gbm should possibly be dropped? Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index d3e0685bd..bc2323641 100644 --- a/meson.build +++ b/meson.build @@ -177,7 +177,7 @@ endif build_dbus = build_hal or build_systemd_logind -udev_dep = [] +udev_dep = dependency('', required:false) if build_udev udev_dep = dependency('libudev', version: '>= 143') endif @@ -198,7 +198,7 @@ else build_glamor = get_option('glamor') == 'yes' endif -gbm_dep = [] +gbm_dep = dependency('', required:false) if build_glamor gbm_dep = dependency('gbm', version: '>= 10.2', required: false) if gbm_dep.found() -- 2.12.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 6/7] meson: Refine build_dbus
As in autotools build, only turn on build_dbus (build dbus-core.c) if it's needed by build_hal or build_systemd_logind, not just because dbus is available. Building dbus-core.c without NEED_DBUS defined fails, as the contents of dbus-core.h are turned off. Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 5f30b996c..d3e0685bd 100644 --- a/meson.build +++ b/meson.build @@ -72,10 +72,8 @@ if host_machine.system() == 'windows' hal_option = 'no' endif -build_dbus = dbus_dep.found() - if get_option('systemd_logind') == 'auto' -build_systemd_logind = build_udev and build_dbus +build_systemd_logind = build_udev and dbus_dep.found() else build_systemd_logind = get_option('systemd_logind') == 'yes' endif @@ -177,6 +175,8 @@ if build_udev and build_hal error('Hotplugging through both libudev and hal not allowed') endif +build_dbus = build_hal or build_systemd_logind + udev_dep = [] if build_udev udev_dep = dependency('libudev', version: '>= 143') -- 2.12.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 5/7] meson: Make XV optional
Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- meson.build | 11 ++- meson_options.txt | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index c7c9c79c3..5f30b996c 100644 --- a/meson.build +++ b/meson.build @@ -251,6 +251,16 @@ if libdrm_dep.found() build_modesetting = dependency('libdrm', version: '>= 2.4.46', required: false).found() endif +build_xv = false +if get_option('xv') == 'auto' +if (host_machine.system() != 'windows' and +host_machine.system() != 'cygwin') +build_xv = true +endif +else +build_xv = get_option('xv') == 'yes' +endif + # XXX: Allow configuration of these. build_apm = false build_acpi = false @@ -265,7 +275,6 @@ build_xsecurity = true build_xf86bigfont = true build_xinerama = true build_xselinux = false -build_xv = true build_dga = false build_xf86vidmode = xf86vidmodeproto_dep.found() diff --git a/meson_options.txt b/meson_options.txt index 88423e25e..c1fb50dbe 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -33,6 +33,9 @@ option('vendor_name_short', type: 'string', value: 'X.Org') option('vendor_web', type: 'string', value: 'http://wiki.x.org') option('os_vendor', type: 'string', value: '') +option('xv', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', + description: 'Xv extension') + option('int10', type: 'combo', choices: ['stub', 'x86emu', 'vm86', 'auto', 'disabled'], value: 'auto', description: 'Xorg int10 backend (default: usually x86emu)') -- 2.12.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 1/7] meson: Remove stray whitespace
Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- include/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/meson.build b/include/meson.build index 761f158d7..b7414bd67 100644 --- a/include/meson.build +++ b/include/meson.build @@ -163,7 +163,7 @@ conf_data.set('XDMCP', get_option('xdmcp')) conf_data.set('XF86BIGFONT', build_xf86bigfont) conf_data.set('XF86DRI', build_dri1) conf_data.set('XF86VIDMODE', build_xf86vidmode) -conf_data.set('XFIXES ', '1') +conf_data.set('XFIXES', '1') conf_data.set('XINERAMA', build_xinerama) conf_data.set('XINPUT', '1') conf_data.set('XRECORD', '1') -- 2.12.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 2/7] meson: Nettle is required if it's the only SHA1 choice
Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 0a57ad24b..401b4064d 100644 --- a/meson.build +++ b/meson.build @@ -47,7 +47,7 @@ pixman_dep = dependency('pixman-1') libbsd_dep = dependency('libbsd', required: false) xkbfile_dep = dependency('xkbfile') xfont2_dep = dependency('xfont2', version: '>= 2.0') -nettle_dep = dependency('nettle', required: false) +nettle_dep = dependency('nettle') dbus_required = get_option('systemd_logind') == 'yes' dbus_dep = dependency('dbus-1', version: '>= 1.0', required: dbus_required) -- 2.12.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 3/7] meson: Don't require xf86dgaproto
This dependency is never used, and build_dga is hardwired to false later on, anyhow. Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 401b4064d..df0d3aefa 100644 --- a/meson.build +++ b/meson.build @@ -37,7 +37,7 @@ dri2proto_dep = dependency('dri2proto', version: '>= 2.8') dri3proto_dep = dependency('dri3proto', version: '>= 1.0') xineramaproto_dep = dependency('xineramaproto') xf86bigfontproto_dep = dependency('xf86bigfontproto', version: '>= 1.2.0') -xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1') +xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1', required: false) xf86vidmodeproto_dep = dependency('xf86vidmodeproto', version: '>= 2.2.99.1', required: false) windowswmproto_dep = dependency('windowswmproto', required: false) applewmproto_dep = dependency('applewmproto', version: '>= 1.4', required: false) -- 2.12.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 0/7] More meson fixes
Jon Turney (7): meson: Remove stray whitespace meson: Nettle is required if it's the only SHA1 choice meson: Don't require xf86dgaproto meson: Make driprotos and libdrm optional meson: Make XV optional meson: Refine build_dbus meson: An empty array is not a dependency object dri3/meson.build | 15 +++--- hw/xfree86/dri/meson.build | 2 +- hw/xfree86/dri2/meson.build| 2 +- hw/xfree86/drivers/modesetting/meson.build | 2 +- hw/xfree86/meson.build | 6 ++- hw/xfree86/os-support/meson.build | 2 +- include/meson.build| 6 +-- meson.build| 78 -- meson_options.txt | 7 +++ 9 files changed, 89 insertions(+), 31 deletions(-) -- 2.12.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 0/4] meson fixes
Jon Turney (4): meson: Test to build xserver_poll.c was inverted meson: Make xf86vidmode optional meson: Fix typoed filename meson: Fix typo in xephyr option description hw/xfree86/fbdevhw/meson.build | 2 +- include/meson.build| 2 +- meson.build| 3 ++- meson_options.txt | 2 +- os/meson.build | 4 ++-- 5 files changed, 7 insertions(+), 6 deletions(-) -- 2.12.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 2/4] meson: Make xf86vidmode optional
Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- include/meson.build | 2 +- meson.build | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/meson.build b/include/meson.build index a2f74ada9..761f158d7 100644 --- a/include/meson.build +++ b/include/meson.build @@ -162,7 +162,7 @@ conf_data.set('XCSECURITY', build_xsecurity) conf_data.set('XDMCP', get_option('xdmcp')) conf_data.set('XF86BIGFONT', build_xf86bigfont) conf_data.set('XF86DRI', build_dri1) -conf_data.set('XF86VIDMODE', '1') +conf_data.set('XF86VIDMODE', build_xf86vidmode) conf_data.set('XFIXES ', '1') conf_data.set('XINERAMA', build_xinerama) conf_data.set('XINPUT', '1') diff --git a/meson.build b/meson.build index c05249ae9..0a57ad24b 100644 --- a/meson.build +++ b/meson.build @@ -38,7 +38,7 @@ dri3proto_dep = dependency('dri3proto', version: '>= 1.0') xineramaproto_dep = dependency('xineramaproto') xf86bigfontproto_dep = dependency('xf86bigfontproto', version: '>= 1.2.0') xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1') -xf86vidmodeproto_dep = dependency('xf86vidmodeproto', version: '>= 2.2.99.1') +xf86vidmodeproto_dep = dependency('xf86vidmodeproto', version: '>= 2.2.99.1', required: false) windowswmproto_dep = dependency('windowswmproto', required: false) applewmproto_dep = dependency('applewmproto', version: '>= 1.4', required: false) xshmfence_dep = dependency('xshmfence', version: '>= 1.1') @@ -235,6 +235,7 @@ build_xinerama = true build_xselinux = false build_xv = true build_dga = false +build_xf86vidmode = xf86vidmodeproto_dep.found() m_dep = cc.find_library('m', required : false) dl_dep = cc.find_library('dl', required : false) -- 2.12.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 1/4] meson: Test to build xserver_poll.c was inverted
Test to build xserver_poll.c was inverted compared to autoconf. Build xserver_poll.c if poll is missing. Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- os/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os/meson.build b/os/meson.build index e1741bb50..724e6d1a8 100644 --- a/os/meson.build +++ b/os/meson.build @@ -42,10 +42,10 @@ endif if not cc.has_function('timingsafe_memcmp') srcs_libc += 'timingsafe_memcmp.c' endif - -if cc.has_function('poll') +if not cc.has_function('poll') srcs_os += 'xserver_poll.c' endif + if cc.has_function('sigaction') srcs_os += 'busfault.c' endif -- 2.12.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 4/4] meson: Fix typo in xephyr option description
Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- meson_options.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson_options.txt b/meson_options.txt index b89fdaa2c..a5d7de6f4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,7 +1,7 @@ option('xorg', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Enable Xorg X Server') option('xephyr', type: 'boolean', value: false, - description: 'Enable Xephyr nexted X server') + description: 'Enable Xephyr nested X server') option('xwayland', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Enable XWayland X server') option('glamor', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', -- 2.12.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 3/4] meson: Fix typoed filename
Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- hw/xfree86/fbdevhw/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/fbdevhw/meson.build b/hw/xfree86/fbdevhw/meson.build index 3cb841179..2f82e2d9f 100644 --- a/hw/xfree86/fbdevhw/meson.build +++ b/hw/xfree86/fbdevhw/meson.build @@ -1,7 +1,7 @@ if host_machine.system() == 'linux' srcs_fbdevhw = 'fbdevhw.c' else -srcs_fbdevhw = 'fbdevhwstubs.c' +srcs_fbdevhw = 'fbdevhwstub.c' endif shared_module('fbdevhw', -- 2.12.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 4/9] meson: Build libglx.so
On 27/04/2017 18:55, Adam Jackson wrote: Signed-off-by: Adam Jackson--- glx/meson.build| 5 + hw/xfree86/dixmods/meson.build | 15 +++ meson.build| 2 ++ 3 files changed, 22 insertions(+) diff --git a/glx/meson.build b/glx/meson.build index a29e53cfa..c5f5ecc8f 100644 --- a/glx/meson.build +++ b/glx/meson.build @@ -48,3 +48,8 @@ if build_glx ] ) endif + +srcs_glxdri2 = '' It seems this should be srcs_glxdri2 = [], otherwise it seems meson looks for a file named '' when the following condition isn't met. Meson encountered an error in file hw/xfree86/dixmods/meson.build, line 44, column 4: File does not exist. +if build_dri2 or build_dri3 +srcs_glxdri2 = files('glxdri2.c') +endif ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 3/3] Add a Meson build system alongside autotools.
On 26/04/2017 00:03, Eric Anholt wrote: This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest, and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but hasn't been built yet. The unit tests are also not done. man pages and documentation are also not done. I've more or less written XWin, so don't feel the need to do that :) diff --git a/glx/meson.build b/glx/meson.build [...] +libxserver_glx = '' +if build_glx +libxserver_glx = static_library('libxserver_glx', This doesn't seem to be right. If you mesonconf with -Dglx=false, this causes "Link target '' is not library." when it appears in link_with:. Attached is a patch with a few small fixes I made. Adding project(..., meson_version: '>0.40') seems like a good idea as well. From f7e55ca8051242de2d1782cbf85cda87b0a8f123 Mon Sep 17 00:00:00 2001 From: Jon Turney <jon.tur...@dronecode.org.uk> Date: Tue, 18 Apr 2017 13:37:35 +0100 Subject: [PATCH xserver 1/6] Various fixes and tweaks to meson.build Restore stub ossupport Make xf86vidmode optional, set XF86VIDMODE Make DGA optional, always disabled Nettle is required if it's the only SHA1 choice Test to build xserver_poll.c was inverted Typos --- hw/xfree86/os-support/meson.build | 17 - include/meson.build | 4 ++-- meson.build | 7 --- meson_options.txt | 2 +- os/meson.build| 4 ++-- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/hw/xfree86/os-support/meson.build b/hw/xfree86/os-support/meson.build index a3c3b5688..4cef618b0 100644 --- a/hw/xfree86/os-support/meson.build +++ b/hw/xfree86/os-support/meson.build @@ -73,7 +73,7 @@ elif host_machine.system() == 'solaris' endif os_support_flags += '-DHAVE_SYSV_IPC' -else +elif (host_machine.system() == 'freebsd') or (host_machine.system() == 'netbsd') or (host_machine.system() == 'openbsd') srcs_xorg_os_support += [ 'bsd/bsd_VTsw.c', 'bsd/bsd_bell.c', @@ -109,6 +109,21 @@ else else srcs_xorg_os_support += 'shared/agp_noop.c' endif +else +# stub ossupport +srcs_xorg_os_support += [ +'shared/VTsw_noop.c', +'shared/agp_noop.c', +'shared/ioperm_noop.c', +'shared/kmod_noop.c', +'shared/pm_noop.c', +'shared/vidmem.c', +'shared/posix_tty.c', +'shared/sigio.c', +'stub/stub_bell.c', +'stub/stub_init.c', +'stub/stub_video.c', +] endif xorg_os_support = static_library('xorg_os_support', diff --git a/include/meson.build b/include/meson.build index 75469ff0a..e066fc469 100644 --- a/include/meson.build +++ b/include/meson.build @@ -161,8 +161,8 @@ conf_data.set('XCSECURITY', build_xsecurity) conf_data.set('XDMCP', get_option('xdmcp')) conf_data.set('XF86BIGFONT', build_xf86bigfont) conf_data.set('XF86DRI', build_dri1) -conf_data.set('XF86VIDMODE', '1') -conf_data.set('XFIXES ', '1') +conf_data.set('XF86VIDMODE', build_xf86vidmode) +conf_data.set('XFIXES', '1') conf_data.set('XINERAMA', build_xinerama) conf_data.set('XINPUT', '1') conf_data.set('XRECORD', '1') diff --git a/meson.build b/meson.build index 30103f8d6..3955ad0bd 100644 --- a/meson.build +++ b/meson.build @@ -35,8 +35,8 @@ dri2proto_dep = dependency('dri2proto', version: '>= 2.8') dri3proto_dep = dependency('dri3proto', version: '>= 1.0') xineramaproto_dep = dependency('xineramaproto') xf86bigfontproto_dep = dependency('xf86bigfontproto', version: '>= 1.2.0') -xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1') -xf86vidmodeproto_dep = dependency('xf86vidmodeproto', version: '>= 2.2.99.1') +xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1', required: false) +xf86vidmodeproto_dep = dependency('xf86vidmodeproto', version: '>= 2.2.99.1', required: false) windowswmproto_dep = dependency('windowswmproto', required: false) applewmproto_dep = dependency('applewmproto', version: '>= 1.4', required: false) xshmfence_dep = dependency('xshmfence', version: '>= 1.1') @@ -45,7 +45,7 @@ pixman_dep = dependency('pixman-1') libbsd_dep = dependency('libbsd', required: false) xkbfile_dep = dependency('xkbfile') xfont2_dep = dependency('xfont2', version: '>= 2.0') -nettle_dep = dependency('nettle', required: false) +nettle_dep = dependency('nettle') dbus_required = get_option('systemd_logind') == 'yes' dbus_dep = dependency('dbus-1', version: '>= 1.0', required: dbus_required) @@ -233,6 +233,7 @@ build_xinerama = true build_xselinux = false build_xv = true build_dga = false +build_xf86vidmode = xf86vidmodeproto_dep.found() m_dep = cc.find_library('m', required : false) dl_dep = cc.find_library('dl', required : false) diff --git a/meson_options.txt b/meson_options.txt index b89fdaa2c..a5d7de6f4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,7 +1,7 @@ option('xorg', type: '
Re: [PATCH xserver 2/4] hw/xwin: Fix -Wmaybe-uninitialized warning in winWindowProc
On 18/04/2017 22:08, Adam Jackson wrote: On Tue, 2017-04-18 at 11:53 +0100, Jon Turney wrote: This is possibly an actual bug in failing to check we successfully retrieved the monitor size before using it to set the X screen size. It is indeed. @@ -261,6 +261,9 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) ErrorF("Monitor number %d no longer exists!\n", s_pScreenInfo->iMonitor); } +ErrorF("QueryMonitor %d failed!\n", + s_pScreenInfo->iMonitor); + This is inside if (QueryMonitor()), which returns true most of the time. It only returns false if the second argument is null (which it won't ever be since it's on the stack), and also ignores the return value from EnumDisplayMonitors. So basically you're now printing that it fails on every call. Oops! But yes, even if I'd managed to correctly put this in an else clause, this is pointless (and checking the return value of EnumDisplayMonitors() turns out the be not very useful either, see 5940580f), so I'll drop that part, and maybe make a patch to make QueryMonitor() less insane later... Thanks for catching this. Amended patch attached. From 4df504fda1a4a913f803b50da8081fe39927f50a Mon Sep 17 00:00:00 2001 From: Jon Turney <jon.tur...@dronecode.org.uk> Date: Wed, 19 Apr 2017 13:30:27 +0100 Subject: [PATCH xserver 2/4] hw/xwin: Fix -Wmaybe-uninitialized warning in winWindowProc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is possibly an actual bug in failing to check we successfuly retrieved the monitor size before using it to set the X screen size. ../hw/xwin/winwndproc.c: In function ‘winWindowProc’: ../hw/xwin/winwndproc.c:283:55: warning: ‘dwHeight’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xwin/winwndproc.c:240:32: note: ‘dwHeight’ was declared here ../hw/xwin/winwndproc.c:281:54: warning: ‘dwWidth’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xwin/winwndproc.c:240:23: note: ‘dwWidth’ was declared here Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- hw/xwin/winwndproc.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c index 7236a95..ad9f1b3 100644 --- a/hw/xwin/winwndproc.c +++ b/hw/xwin/winwndproc.c @@ -237,7 +237,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) fMultiWindow #endif )) { -DWORD dwWidth, dwHeight; +DWORD dwWidth = 0, dwHeight = 0; if (s_pScreenInfo->fMultipleMonitors) { /* resize to new virtual desktop size */ @@ -273,8 +273,9 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) */ /* Set screen size to match new size, if it is different to current */ -if ((s_pScreenInfo->dwWidth != dwWidth) || -(s_pScreenInfo->dwHeight != dwHeight)) { +if (((dwWidth != 0) && (dwHeight != 0)) && +((s_pScreenInfo->dwWidth != dwWidth) || + (s_pScreenInfo->dwHeight != dwHeight))) { winDoRandRScreenSetSize(s_pScreen, dwWidth, dwHeight, -- 2.8.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 0/4] Warning fixes
Experimenting with building with meson, it likes to use a different set of warning flags by default, which make the following a bit more obvious. Jon Turney (4): Don't declare variables which will be unused if XSERVER_LIBPICACCESS isn't defined hw/xwin: Fix -Wmaybe-uninitialized warning in winWindowProc hw/xwin: Fix -Wmaybe-uninitialized warnings in engine CloseScreen wrappers hw/xwin: Fix -Wunused-function warning for MessageName() in non-debug builds hw/xfree86/common/xf86Config.c | 2 ++ hw/xwin/winmultiwindowwm.c | 2 ++ hw/xwin/winshadddnl.c | 2 +- hw/xwin/winshadgdi.c | 2 +- hw/xwin/winwndproc.c | 10 +++--- 5 files changed, 13 insertions(+), 5 deletions(-) -- 2.8.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 2/4] hw/xwin: Fix -Wmaybe-uninitialized warning in winWindowProc
This is possibly an actual bug in failing to check we successfuly retrieved the monitor size before using it to set the X screen size. ../hw/xwin/winwndproc.c: In function ‘winWindowProc’: ../hw/xwin/winwndproc.c:283:55: warning: ‘dwHeight’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xwin/winwndproc.c:240:32: note: ‘dwHeight’ was declared here ../hw/xwin/winwndproc.c:281:54: warning: ‘dwWidth’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xwin/winwndproc.c:240:23: note: ‘dwWidth’ was declared here Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- hw/xwin/winwndproc.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c index 7236a95..53ef1f9 100644 --- a/hw/xwin/winwndproc.c +++ b/hw/xwin/winwndproc.c @@ -237,7 +237,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) fMultiWindow #endif )) { -DWORD dwWidth, dwHeight; +DWORD dwWidth = 0, dwHeight = 0; if (s_pScreenInfo->fMultipleMonitors) { /* resize to new virtual desktop size */ @@ -261,6 +261,9 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) ErrorF("Monitor number %d no longer exists!\n", s_pScreenInfo->iMonitor); } +ErrorF("QueryMonitor %d failed!\n", + s_pScreenInfo->iMonitor); + } } @@ -273,8 +276,9 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) */ /* Set screen size to match new size, if it is different to current */ -if ((s_pScreenInfo->dwWidth != dwWidth) || -(s_pScreenInfo->dwHeight != dwHeight)) { +if (((dwWidth != 0) && (dwHeight != 0)) && +((s_pScreenInfo->dwWidth != dwWidth) || + (s_pScreenInfo->dwHeight != dwHeight))) { winDoRandRScreenSetSize(s_pScreen, dwWidth, dwHeight, -- 2.8.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 3/4] hw/xwin: Fix -Wmaybe-uninitialized warnings in engine CloseScreen wrappers
../hw/xwin/winshadgdi.c: In function ‘winCloseScreenShadowGDI’: ../hw/xwin/winshadgdi.c:632:12: warning: ‘fReturn’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xwin/winshadgdi.c:579:10: note: ‘fReturn’ was declared here ../hw/xwin/winshadddnl.c: In function ‘winCloseScreenShadowDDNL’: ../hw/xwin/winshadddnl.c:711:12: warning: ‘fReturn’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xwin/winshadddnl.c:661:10: note: ‘fReturn’ was declared here Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- hw/xwin/winshadddnl.c | 2 +- hw/xwin/winshadgdi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xwin/winshadddnl.c b/hw/xwin/winshadddnl.c index 6ad32eb..825c1e0 100644 --- a/hw/xwin/winshadddnl.c +++ b/hw/xwin/winshadddnl.c @@ -658,7 +658,7 @@ winCloseScreenShadowDDNL(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; -Bool fReturn; +Bool fReturn = TRUE; #if CYGDEBUG winDebug("winCloseScreenShadowDDNL - Freeing screen resources\n"); diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c index 705cdfb..f8295be 100644 --- a/hw/xwin/winshadgdi.c +++ b/hw/xwin/winshadgdi.c @@ -576,7 +576,7 @@ winCloseScreenShadowGDI(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; -Bool fReturn; +Bool fReturn = TRUE; #if CYGDEBUG winDebug("winCloseScreenShadowGDI - Freeing screen resources\n"); -- 2.8.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 4/4] hw/xwin: Fix -Wunused-function warning for MessageName() in non-debug builds
../hw/xwin/winmultiwindowwm.c:188:1: warning: ‘MessageName’ defined but not used [-Wunused-function] Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- hw/xwin/winmultiwindowwm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c index df7e6d3..c68387d 100644 --- a/hw/xwin/winmultiwindowwm.c +++ b/hw/xwin/winmultiwindowwm.c @@ -184,6 +184,7 @@ static Bool g_shutdown = FALSE; * Translate msg id to text, for debug purposes */ +#if CYGMULTIWINDOW_DEBUG static const char * MessageName(winWMMessagePtr msg) { @@ -233,6 +234,7 @@ MessageName(winWMMessagePtr msg) break; } } +#endif /* -- 2.8.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 1/4] Don't declare variables which will be unused if XSERVER_LIBPICACCESS isn't defined
../hw/xfree86/common/xf86Config.c: In function ‘xf86HandleConfigFile’: ../hw/xfree86/common/xf86Config.c:2278:10: warning: unused variable ‘singlecard’ [-Wunused-variable] ../hw/xfree86/common/xf86Config.c:2277:17: warning: unused variable ‘scanptr’ [-Wunused-variable] Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- hw/xfree86/common/xf86Config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index c2b522a..ca80d5e 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -2274,8 +2274,10 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout) ConfigStatus xf86HandleConfigFile(Bool autoconfig) { +#ifdef XSERVER_LIBPCIACCESS const char *scanptr; Bool singlecard = 0; +#endif Bool implicit_layout = FALSE; XF86ConfLayoutPtr layout; -- 2.8.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH util/modular] xorg.modules: Update for mesonic rendercheck
Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- xorg.modules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xorg.modules b/xorg.modules index 961ff17..65d3621 100644 --- a/xorg.modules +++ b/xorg.modules @@ -1202,7 +1202,7 @@ - + @@ -1211,7 +1211,7 @@ - + http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] test: Use correct signature for XISetEventMask wrapper
This looks like it's always been wrong, but didn't matter before the single test binary changes as the wrapper was only in place for tests which didn't care about it's effects, so didn't forward to the real implementation. (see the changes to protocol-xiselectevents.c in 773fc07e) This fixes the protocol_xigetselectedevents_test for me. I'm a bit surprised that passes for anyone at the moment. Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- test/xi2/protocol-common.h | 4 ++-- test/xi2/protocol-xiselectevents.c | 10 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/xi2/protocol-common.h b/test/xi2/protocol-common.h index 7190ef0..8490529 100644 --- a/test/xi2/protocol-common.h +++ b/test/xi2/protocol-common.h @@ -144,8 +144,8 @@ void init_simple(void); /* Declarations for various overrides in the test files. */ void __wrap_WriteToClient(ClientPtr client, int len, void *data); -int __wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, int len, - unsigned char *mask); +int __wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client, + int len, unsigned char *mask); int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access); int __real_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, diff --git a/test/xi2/protocol-xiselectevents.c b/test/xi2/protocol-xiselectevents.c index 686e7d3..f136c23 100644 --- a/test/xi2/protocol-xiselectevents.c +++ b/test/xi2/protocol-xiselectevents.c @@ -65,15 +65,15 @@ static unsigned char *data[4096 * 20]; /* the request data buffer */ ClientRec client_window; int -__real_XISetEventMask(DeviceIntPtr dev, WindowPtr win, int len, - unsigned char *mask); +__real_XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client, + int len, unsigned char *mask); int -__wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, int len, - unsigned char *mask) +__wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client, + int len, unsigned char *mask) { if (!enable_XISetEventMask_wrap) -return __real_XISetEventMask(dev, win, len, mask); +return __real_XISetEventMask(dev, win, client, len, mask); return Success; } -- 2.8.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] sdksyms: Tighten up the symbols we add to the magic table
On 06/03/2017 22:20, Adam Jackson wrote: On Mon, 2017-03-06 at 18:23 +, Jon Turney wrote: Unfortunately, one of the possible definitions of _X_EXPORT in Xfuncproto.h is empty, in which case, this leaves us with nothing in sdksyms.c Though this be true, I'm not sure how it can matter. We only build xfree86 on systems where _X_EXPORT expands to something non-empty. And It has been possible to build an xfree86 server for Cygwin since this [1] patchset. This might even turn out to be useful, if the idea of removing Xephyr, Xnest and Xvfb servers [2], to be replaced by invoking the Xorg server with the xf86-video-dummy or xf86-video-nested drivers, ever happens. [1] https://lists.x.org/archives/xorg-devel/2012-April/030281.html [2] https://lists.x.org/archives/xorg-devel/2012-March/030059.html we rely on it expanding to something non-empty because we build the rest of the server with hidden visibility, so we need a positive way to declare that a symbol is exported; if the system does not have this facility, then the server isn't going to export the correct set of symbols to the drivers anyway. Well, that's not absolutely essential, I mean, sdksyms just ensures that symbols we want to export are actually referenced and so present in Xorg. But yeah, at the moment _X_EXPORT expands to nothing and -Wl,--export-all is used on Cygwin, which is wrong, strictly speaking, as that makes it possible to build a driver which uses a symbol it shouldn't. So, I guess I need to look at doing this properly with __attribute__((dllexport|dllimport)). ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] sdksyms: Tighten up the symbols we add to the magic table
On 16/02/2017 19:00, Adam Jackson wrote: The code as written would match anything declared extern. _X_EXPORT is what we really mean here. That's a macro, so check for what it expands to and skip if not found. --- hw/xfree86/sdksyms.sh | 4 1 file changed, 4 insertions(+) diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh index cf26892..10909d0 100755 --- a/hw/xfree86/sdksyms.sh +++ b/hw/xfree86/sdksyms.sh @@ -343,6 +343,10 @@ BEGIN { n = 1; } +# only match _X_EXPORT +if ($n !~ /^(__attribute__..visibility..default|__global)/) +next; + # skip attribute, if any while ($n ~ /^(__attribute__|__global)/ || # skip modifiers, if any Unfortunately, one of the possible definitions of _X_EXPORT in Xfuncproto.h is empty, in which case, this leaves us with nothing in sdksyms.c This would be much easier if we could use -fdirectives-only, but I guess this needs to be cpp-agnostic. Not sure how to fix this short of having a define to make Xfuncproto.h not define the _X_EXPORT macro, and turning that on when sdksyms.sh invokes cpp, and having sdksyms.sh recognize a literal X_EXPORT... ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] Workaround a sdksyms problem with gcc5 on Cygwin
The linemarkers in the preprocessor output from gcc5 on Cygwin have canonicalized paths to included files (e.g. xserver/build/../include/misc.h is canonicalized to xserver/build/include/misc.h). (see gcc svn rev 210264, which causes the transformation performed by -fcanonical-system-headers to be applied to all include pathnames) These canonicalized paths won't match $topdir, so sdksyms doesn't look at the contents of those headers for sdk exported symbols. Workaround this by canonicalizing all the paths we consider, using readlink. v2: Keep a cache of readlink results so it isn't quite so dreadfully slow. --- hw/xfree86/sdksyms.sh | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh index 10909d0..767ce21 100755 --- a/hw/xfree86/sdksyms.sh +++ b/hw/xfree86/sdksyms.sh @@ -296,7 +296,7 @@ cat > sdksyms.c << EOF EOF -topdir=$1 +topdir=$(readlink -f $1) shift LC_ALL=C export LC_ALL @@ -314,11 +314,24 @@ BEGIN { printf("sdksyms.c:") > "sdksyms.dep"; } /^# [0-9]+ "/ { -# Process text after a include in a relative path or when the -# processed file has a basename matching $top_srcdir. -# Note that indexing starts at 1; 0 means no match, and there -# is a starting ". -sdk = $3 !~ /^"\// || index($3, topdir) == 2; +# Match preprocessor linemarkers which have the form: +# # linenum "filename" flags +# +# Only process text for sdk exports where the linemarker filename has a +# relative path, or an absolute path matching $top_srcdir. +# + +# canonicalize filename +if ($3 in canonicalized) { + c = canonicalized[$3] +} else { + cmd = "readlink -f " $3 + cmd | getline c + close(cmd) +canonicalized[$3] = c +} +# note that index() starts at 1; 0 means no match. +sdk = $3 !~ /^"\// || index(c, topdir) == 1; if (sdk && $3 ~ /\.h"$/) { # remove quotes -- 2.8.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH v6 libX11] Compose sequences for rouble sign
On 14/02/2017 16:39, Adam Jackson wrote: On Fri, 2017-02-10 at 18:48 +0500, Mihail Konev wrote: Cyrillic combinations mirror the Qwerty-Jcuken keyboard layout. Also add Cyrillic sequences for hryvnia sign. Submitted-by: Victor V. KustovReviewed-by: Victor V. Kustov Signed-off-by: Mihail Konev remote: I: patch #138287 updated using rev d9e34061307748cb7318ed6b5f83ee5ee9b81fd0. remote: I: 1 patch(es) updated to state Accepted. To ssh://git.freedesktop.org/git/xorg/lib/libX11 23d9623..d9e3406 master -> master 'make check' seems to fail after this compose-check.pl.log: Clash with existing sequence in en_US.UTF-8/Compose on line 5309: line #5309:: "₽" U20bd # ROUBLE SIGN line #5289: : "₧" PesetaSign # PESETA SIGN Clash with existing sequence in en_US.UTF-8/Compose on line 5310: line #5310:: "₽" U20bd # ROUBLE SIGN line #5290: : "₰" U20B0 # GERMAN PENNY SIGN ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH v5 xserver 7/6] tests: fix --disable-xorg build
On 14/01/2017 10:19, Mihail Konev wrote: Commit ead5064581665ff40c177dd1b447949f1420e209 missed that xi1/ and xi2/ were conditioned on XORG, and made xfree86-only tests to be built unconditionally. Ifdef the tests and split tests_SOURCES. Commit 704a867f8fb7652a8b7d5569bbe44e188457db4e missed that when XORG is false, libxservertest.la isn't linked into anything. However, before putting them into tests_LDADD, its static libraries likely need to be reordered for linking not to fail. Remove the former libxservertest.la for !XORG, as its build was only triggered by 'make check'. XSERVER_LIBS were depending on it; remove them too. Commit 23f6dbc96e47be6cbeed78cc9ef303987c3e29a9 missed that -wrap arguments to 'ld' could only be present when HAVE_LD_WRAP is true. Can we see these 3 things as separate patches, please? Something is definitely needed to fix static linkage, but I can't really see what you've done when it's jumbled in with other stuff. (and hidden under a title of 'fix --disable-xorg build'. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH v3 xserver] tests: Fix typo
On 14/01/2017 07:51, Mihail Konev wrote: Remove redundrant/incorrect automake assignment. Buglink: https://lists.x.org/archives/xorg-devel/2017-January/052320.html Reported-by: Michel Dänzer <mic...@daenzer.net> Signed-off-by: Mihail Konev <k@ya.ru> --- v3: reword test/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/test/Makefile.am b/test/Makefile.am index 729402f104ce..b850dd8a7ce7 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -221,7 +221,6 @@ endif endif !XORG -tests_DEPENDENCIES = $(tests_LDADD) endif ENABLE_UNIT_TESTS EXTRA_DIST = \ Reviewed-by: Jon Turney <jon.tur...@dronecode.org.uk> ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PULL] Small fix for 1.19
The following changes since commit 5cb328338684d8e5b03913c47475bfcd7acffec4: inputthread: On Linux leave the main thread's name as-is (2016-10-27 09:53:01 +1000) are available in the git repository at: git://people.freedesktop.org/~jturney/xserver for you to fetch changes up to 03d99ef729178dd99268f185fb45320a29382091: glx/dri2: Don't build DRI loader if DRI2 isn't enabled (2016-10-27 14:25:42 +0100) Jon Turney (1): glx/dri2: Don't build DRI loader if DRI2 isn't enabled glx/Makefile.am| 11 --- hw/xfree86/dixmods/Makefile.am | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH v3 xserver] modesetting: fix glamor ifdef
On 15/10/2016 05:13, Mihail Konev wrote: Add a missing ifdef needed for --disable-glamor. Signed-off-by: Mihail Konev <k@ya.ru> Reviewed-by: Jon Turney <jon.tur...@dronecode.org.uk> ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] xwin: make glx optional again
On 14/10/2016 14:10, Emil Velikov wrote: On 14 October 2016 at 03:40, Mihail Konev <k@ya.ru> wrote: Commit 501d8e2b removed --enable-aiglx, but made xwin always be --enable-glx. This might have been the better idea indeed. Adding Jon just in case ;-) Yes, I was kind of wondering where this had gone. I guess this was not quite right before. Signed-off-by: Mihail Konev <k@ya.ru> --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 4bb014d0d837..25168cc67306 100644 --- a/configure.ac +++ b/configure.ac @@ -2233,7 +2233,7 @@ if test "x$XWIN" = xyes; then AC_DEFINE(DDXBEFORERESET, 1, [Use ddxBeforeReset ]) dnl XWin requires OpenGL spec files in order to generate wrapper code for native GL functions Nit: Xwin with GLX requires... - if [test "x$XWIN" = xyes] ; then + if [test "x$XWIN" = xyes && test "x$GLX" = xyes] ; then AC_CHECK_PROG(PYTHON3, python3, python3) if test -z "$PYTHON3"; then AC_MSG_ERROR([python3 not found]) @@ -2256,7 +2256,7 @@ AM_CONDITIONAL(XWIN, [test "x$XWIN" = xyes]) AM_CONDITIONAL(XWIN_MULTIWINDOW, [test "x$XWIN" = xyes]) AM_CONDITIONAL(XWIN_MULTIWINDOWEXTWM, [test "x$XWIN" = xyes && test "x$WINDOWSWM" = xyes]) AM_CONDITIONAL(XWIN_CLIPBOARD, [test "x$XWIN" = xyes]) -AM_CONDITIONAL(XWIN_GLX_WINDOWS, [test "x$XWIN" = xyes]) +AM_CONDITIONAL(XWIN_GLX_WINDOWS, [test "x$XWIN" = xyes && test "x$GLX" = xyes]) Regardless of the nitpick Reviewed-by: Emil Velikov <emil.l.veli...@gmail.com> Reviewed-by: Jon Turney <jon.tur...@dronecode.org.uk> ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 3/3] configure.ac: remove --enable-aiglx option
On 10/10/2016 19:31, Mihail Konev wrote: Hello. On Mon Oct 10 14:59:52 UTC 2016, Jon Turney wrote: @@ -16,11 +20,10 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/dri \ + -I$(top_srcdir)/hw/xfree86/dri2 -I$(top_srcdir)/mi \ -I$(top_srcdir)/present Shouldn't there be a backslash? Absolutely! Revised patch attached. I build-tested this on linux with --enable-dri2 and --disabl-dri2 From 549d3d4b82009319563c42b3d0113361ded257aa Mon Sep 17 00:00:00 2001 From: Jon Turney <jon.tur...@dronecode.org.uk> Date: Thu, 6 Oct 2016 22:13:07 +0100 Subject: [PATCH xserver] glx/dri2: Don't build DRI loader if DRI2 isn't enabled This partially reverts 501d8e2b. Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> --- glx/Makefile.am| 11 --- hw/xfree86/dixmods/Makefile.am | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/glx/Makefile.am b/glx/Makefile.am index fc0b76a..699de63 100644 --- a/glx/Makefile.am +++ b/glx/Makefile.am @@ -1,4 +1,8 @@ -noinst_LTLIBRARIES = libglx.la libglxdri.la +if DRI2 +GLXDRI_LIBRARY = libglxdri.la +endif + +noinst_LTLIBRARIES = libglx.la $(GLXDRI_LIBRARY) AM_CFLAGS = \ @DIX_CFLAGS@ \ @@ -16,11 +20,10 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/dri \ + -I$(top_srcdir)/hw/xfree86/dri2 \ -I$(top_srcdir)/mi \ -I$(top_srcdir)/present -AM_CPPFLAGS += -I$(top_srcdir)/hw/xfree86/dri2 - indirect_sources = \ indirect_dispatch.c \ indirect_dispatch.h \ @@ -33,7 +36,9 @@ indirect_sources =\ indirect_table.c libglxdri_la_SOURCES = +if DRI2 libglxdri_la_SOURCES += glxdri2.c +endif libglxdri_la_LIBADD = $(DLOPEN_LIBS) diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am index be43e8f..d534c78 100644 --- a/hw/xfree86/dixmods/Makefile.am +++ b/hw/xfree86/dixmods/Makefile.am @@ -29,10 +29,12 @@ libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER libglx_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) libglx_la_LIBADD = $(top_builddir)/glx/libglx.la $(GLX_SYS_LIBS) +if DRI2 libglx_la_LIBADD += $(top_builddir)/glx/libglxdri.la if NO_UNDEFINED libglx_la_LIBADD += $(LIBDRM_LIBS) $(PIXMAN_LIBS) endif +endif libglx_la_SOURCES = glxmodule.c libshadow_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) -- 2.8.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 3/3] configure.ac: remove --enable-aiglx option
On 09/10/2016 15:42, Emil Velikov wrote: On Friday, 7 October 2016, Jon Turney wrote: That's not quite enough, as building glxdri2.c also requires dri2proto headers. At the moment, configure.ac only requires dri2proto when --enable-dri2 turns on. So either that needs to be made unconditional, or building glxdri2.c made conditional on DRI2 (untested patch attached) You're correct. Wrapping it in DRI2 conditional is a good idea. Note creating an empty (no sources or static libs) library is likely to cause problems. Just use the form prior to my patch ? Yes, that seems possible. Updated patch attached. From 42f74bb44190be06b9630dfcaae48b27533a28cd Mon Sep 17 00:00:00 2001 From: Jon Turney <jon.tur...@dronecode.org.uk> Date: Thu, 6 Oct 2016 22:13:07 +0100 Subject: [PATCH xserver] glx/dri2: Don't build DRI loader if DRI2 isn't enabled This partially reverts 501d8e2b. --- glx/Makefile.am| 11 --- hw/xfree86/dixmods/Makefile.am | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/glx/Makefile.am b/glx/Makefile.am index fc0b76a..60bd84c 100644 --- a/glx/Makefile.am +++ b/glx/Makefile.am @@ -1,4 +1,8 @@ -noinst_LTLIBRARIES = libglx.la libglxdri.la +if DRI2 +GLXDRI_LIBRARY = libglxdri.la +endif + +noinst_LTLIBRARIES = libglx.la $(GLXDRI_LIBRARY) AM_CFLAGS = \ @DIX_CFLAGS@ \ @@ -16,11 +20,10 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/dri \ + -I$(top_srcdir)/hw/xfree86/dri2 -I$(top_srcdir)/mi \ -I$(top_srcdir)/present -AM_CPPFLAGS += -I$(top_srcdir)/hw/xfree86/dri2 - indirect_sources = \ indirect_dispatch.c \ indirect_dispatch.h \ @@ -33,7 +36,9 @@ indirect_sources =\ indirect_table.c libglxdri_la_SOURCES = +if DRI2 libglxdri_la_SOURCES += glxdri2.c +endif libglxdri_la_LIBADD = $(DLOPEN_LIBS) diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am index be43e8f..d534c78 100644 --- a/hw/xfree86/dixmods/Makefile.am +++ b/hw/xfree86/dixmods/Makefile.am @@ -29,10 +29,12 @@ libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER libglx_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) libglx_la_LIBADD = $(top_builddir)/glx/libglx.la $(GLX_SYS_LIBS) +if DRI2 libglx_la_LIBADD += $(top_builddir)/glx/libglxdri.la if NO_UNDEFINED libglx_la_LIBADD += $(LIBDRM_LIBS) $(PIXMAN_LIBS) endif +endif libglx_la_SOURCES = glxmodule.c libshadow_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) -- 2.8.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 3/3] configure.ac: remove --enable-aiglx option
On 06/10/2016 19:15, Emil Velikov wrote: On 6 October 2016 at 19:02, Jon Turney <jon.tur...@dronecode.org.uk> wrote: On 29/09/2016 18:41, Emil Velikov wrote: Presently the option guards both direct and accelerated indirect GLX. As such when one toggles it off they end up without any acceleration. Remove the option all together until we have the time to split/rework things. Cc: Jon Turney <jon.tur...@dronecode.org.uk> Cc: Adam Jackson <a...@redhat.com> Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com> --- Jon, I've not checked the Xwin side of things but considering that the option is enabled by default and having it for Xwin only will be confusing I've nuked the guards throughout the tree. Sorry I didn't get around to testing this before it was committed. This breaks my build (See [1]), as the DRI2 loader is now built unconditionally, which fails without drm.h I'm not sure exactly what problem this change is fixing, so I'm not sure how to address that. Is it ok to restore the part which makes building the DRI2 loader conditional? I had a bad feeling about this, fortunately it seems pretty easy to handle. From a quick look nothing in glx/glxdri2.c should require libdrm so we can nuke the drm.h and xf86drm.h includes, which will get you back up and going. Alternatively we can add those in a ifdef WITH_LIBDRM/endif block. That's not quite enough, as building glxdri2.c also requires dri2proto headers. At the moment, configure.ac only requires dri2proto when --enable-dri2 turns on. So either that needs to be made unconditional, or building glxdri2.c made conditional on DRI2 (untested patch attached) Even then we can make the compilation of the DRI2 loader but let's not call it AIGLX ;-) From db2fcb2636a659abd0998d82204813fd5dcd57ff Mon Sep 17 00:00:00 2001 From: Jon Turney <jon.tur...@dronecode.org.uk> Date: Thu, 6 Oct 2016 22:13:07 +0100 Subject: [PATCH xserver] Don't build DRI loader if DRI2 isn't enabled --- glx/Makefile.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/glx/Makefile.am b/glx/Makefile.am index fc0b76a..9af7080 100644 --- a/glx/Makefile.am +++ b/glx/Makefile.am @@ -16,11 +16,10 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/dri \ + -I$(top_srcdir)/hw/xfree86/dri2 -I$(top_srcdir)/mi \ -I$(top_srcdir)/present -AM_CPPFLAGS += -I$(top_srcdir)/hw/xfree86/dri2 - indirect_sources = \ indirect_dispatch.c \ indirect_dispatch.h \ @@ -33,7 +32,9 @@ indirect_sources =\ indirect_table.c libglxdri_la_SOURCES = +if DRI2 libglxdri_la_SOURCES += glxdri2.c +endif libglxdri_la_LIBADD = $(DLOPEN_LIBS) -- 2.8.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel