summaryrefslogtreecommitdiff
path: root/x11-base
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-05 18:08:55 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-05 18:08:55 +0000
commit6b12f45fac8bc4f9d3ddbf6ed07c9798ffaec0ac (patch)
tree9902dcec42c3fc93fb5ec8d0d795f7ca3ad3ce9a /x11-base
parent09ebe3f1d1efc1ed745eb5d8cdd199aca4100a17 (diff)
x11-base/xorg-server : version bump
Diffstat (limited to 'x11-base')
-rw-r--r--x11-base/xorg-server/Manifest2
-rw-r--r--x11-base/xorg-server/files/xorg-server-21.1.1-DPI-revert.patch133
-rw-r--r--x11-base/xorg-server/files/xserver-autobind-hotplug.patch293
-rw-r--r--x11-base/xorg-server/xorg-server-21.1.1-r100.ebuild (renamed from x11-base/xorg-server/xorg-server-1.20.13-r100.ebuild)150
4 files changed, 189 insertions, 389 deletions
diff --git a/x11-base/xorg-server/Manifest b/x11-base/xorg-server/Manifest
index de7291d1..6b5fa2ca 100644
--- a/x11-base/xorg-server/Manifest
+++ b/x11-base/xorg-server/Manifest
@@ -1 +1 @@
-DIST xorg-server-1.20.13.tar.xz 5122260 BLAKE2B 4435d25d8b379142fcc4bf60d82e52417ac3ab22a77ededa1472785d67c23bfb95be8e10465fc4859645405b8e580d6dcb262caea39c408e724d0e5ea61b37af SHA512 4e0b7bd4e070dc52cb2c51c2056feb133de2c0487d359392ed63abba9702910cd2e2983e9415973d8d6e9672eac78be6f39202687fc56610877914ce722554b3
+DIST xorg-server-21.1.1.tar.xz 4958508 BLAKE2B fadac208773700b91003ef18d46e6f2c6b501e59b7491c943f406641e9ff3837a8126034c023e9b6d2d4131ee438c1ef94fa458af1828d4be325519b47069a79 SHA512 8608ed9c1537c95e8a3adea5e3e372a3c5eb841f8e27c84283093f22fb1909e16a800006510da684b13f8f237f33b8a4be3e2537f5f9ab9af4c5ad12770eef0d
diff --git a/x11-base/xorg-server/files/xorg-server-21.1.1-DPI-revert.patch b/x11-base/xorg-server/files/xorg-server-21.1.1-DPI-revert.patch
new file mode 100644
index 00000000..89d8e265
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-21.1.1-DPI-revert.patch
@@ -0,0 +1,133 @@
+https://gitlab.freedesktop.org/xorg/xserver/-/commit/35af1299e73483eaf93d913a960e1d1738bc7de6
+
+From: Povilas Kanapickas <povilas@radix.lt>
+Date: Sat, 13 Nov 2021 17:23:54 +0200
+Subject: [PATCH] Revert "hw/xfree86: Propagate physical dimensions from DRM
+ connector"
+
+Quite a lot of applications currently expect the screen DPI exposed by
+the X server to be 96 even when the real display DPI is different.
+Additionally, currently Xwayland completely ignores any hardware
+information and sets the DPI to 96. Accordingly the new behavior, even
+if it fixes a bug, should not be enabled automatically to all users.
+
+A better solution would be to make the default DPI stay as is and enable
+the correct behavior with a command line option (maybe -dpi auto, or
+similar). For now let's just revert the bug fix.
+
+This reverts commit 05b3c681ea2f478c0cb941c2f8279919cf78de6d.
+
+Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+--- a/hw/xfree86/common/xf86Helper.c
++++ b/hw/xfree86/common/xf86Helper.c
+@@ -55,7 +55,6 @@
+ #include "xf86Xinput.h"
+ #include "xf86InPriv.h"
+ #include "mivalidate.h"
+-#include "xf86Crtc.h"
+
+ /* For xf86GetClocks */
+ #if defined(CSRG_BASED) || defined(__GNU__)
+@@ -852,9 +851,8 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int y)
+ {
+ MessageType from = X_DEFAULT;
+ xf86MonPtr DDC = (xf86MonPtr) (pScrn->monitor->DDC);
+- int probedWidthmm, probedHeightmm;
++ int ddcWidthmm, ddcHeightmm;
+ int widthErr, heightErr;
+- xf86OutputPtr compat = xf86CompatOutput(pScrn);
+
+ /* XXX Maybe there is no need for widthmm/heightmm in ScrnInfoRec */
+ pScrn->widthmm = pScrn->monitor->widthmm;
+@@ -864,15 +862,11 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int y)
+ /* DDC gives display size in mm for individual modes,
+ * but cm for monitor
+ */
+- probedWidthmm = DDC->features.hsize * 10; /* 10mm in 1cm */
+- probedHeightmm = DDC->features.vsize * 10; /* 10mm in 1cm */
+- }
+- else if (compat && compat->mm_width > 0 && compat->mm_height > 0) {
+- probedWidthmm = compat->mm_width;
+- probedHeightmm = compat->mm_height;
++ ddcWidthmm = DDC->features.hsize * 10; /* 10mm in 1cm */
++ ddcHeightmm = DDC->features.vsize * 10; /* 10mm in 1cm */
+ }
+ else {
+- probedWidthmm = probedHeightmm = 0;
++ ddcWidthmm = ddcHeightmm = 0;
+ }
+
+ if (monitorResolution > 0) {
+@@ -898,15 +892,15 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int y)
+ pScrn->widthmm, pScrn->heightmm);
+
+ /* Warn if config and probe disagree about display size */
+- if (probedWidthmm && probedHeightmm) {
++ if (ddcWidthmm && ddcHeightmm) {
+ if (pScrn->widthmm > 0) {
+- widthErr = abs(probedWidthmm - pScrn->widthmm);
++ widthErr = abs(ddcWidthmm - pScrn->widthmm);
+ }
+ else {
+ widthErr = 0;
+ }
+ if (pScrn->heightmm > 0) {
+- heightErr = abs(probedHeightmm - pScrn->heightmm);
++ heightErr = abs(ddcHeightmm - pScrn->heightmm);
+ }
+ else {
+ heightErr = 0;
+@@ -915,17 +909,17 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int y)
+ /* Should include config file name for monitor here */
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Probed monitor is %dx%d mm, using Displaysize %dx%d mm\n",
+- probedWidthmm, probedHeightmm, pScrn->widthmm,
++ ddcWidthmm, ddcHeightmm, pScrn->widthmm,
+ pScrn->heightmm);
+ }
+ }
+ }
+- else if (probedWidthmm && probedHeightmm) {
++ else if (ddcWidthmm && ddcHeightmm) {
+ from = X_PROBED;
+ xf86DrvMsg(pScrn->scrnIndex, from, "Display dimensions: (%d, %d) mm\n",
+- probedWidthmm, probedHeightmm);
+- pScrn->widthmm = probedWidthmm;
+- pScrn->heightmm = probedHeightmm;
++ ddcWidthmm, ddcHeightmm);
++ pScrn->widthmm = ddcWidthmm;
++ pScrn->heightmm = ddcHeightmm;
+ if (pScrn->widthmm > 0) {
+ pScrn->xDpi =
+ (int) ((double) pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+--- a/hw/xfree86/modes/xf86Crtc.c
++++ b/hw/xfree86/modes/xf86Crtc.c
+@@ -3256,10 +3256,8 @@ xf86OutputSetEDID(xf86OutputPtr output, xf86MonPtr edid_mon)
+ free(output->MonInfo);
+
+ output->MonInfo = edid_mon;
+- if (edid_mon) {
+- output->mm_width = 0;
+- output->mm_height = 0;
+- }
++ output->mm_width = 0;
++ output->mm_height = 0;
+
+ if (debug_modes) {
+ xf86DrvMsg(scrn->scrnIndex, X_INFO, "EDID for output %s\n",
+--- a/hw/xfree86/modes/xf86RandR12.c
++++ b/hw/xfree86/modes/xf86RandR12.c
+@@ -806,12 +806,6 @@ xf86RandR12CreateScreenResources(ScreenPtr pScreen)
+ mmWidth = output->conf_monitor->mon_width;
+ mmHeight = output->conf_monitor->mon_height;
+ }
+- else if (output &&
+- (output->mm_width > 0 &&
+- output->mm_height > 0)) {
+- mmWidth = output->mm_width;
+- mmHeight = output->mm_height;
+- }
+ else {
+ /*
+ * Otherwise, just set the screen to DEFAULT_DPI
+GitLab
diff --git a/x11-base/xorg-server/files/xserver-autobind-hotplug.patch b/x11-base/xorg-server/files/xserver-autobind-hotplug.patch
deleted file mode 100644
index 86b96a23..00000000
--- a/x11-base/xorg-server/files/xserver-autobind-hotplug.patch
+++ /dev/null
@@ -1,293 +0,0 @@
-From 471289fa1dc359555ceed6302f7d9605ab6be3ea Mon Sep 17 00:00:00 2001
-From: Dave Airlie <airlied@redhat.com>
-Date: Mon, 2 Apr 2018 16:49:02 -0400
-Subject: [PATCH] autobind GPUs to the screen
-
-This is a modified version of a patch we've been carry-ing in Fedora and
-RHEL for years now. This patch automatically adds secondary GPUs to the
-master as output sink / offload source making e.g. the use of
-slave-outputs just work, with requiring the user to manually run
-"xrandr --setprovideroutputsource" before he can hookup an external
-monitor to his hybrid graphics laptop.
-
-There is one problem with this patch, which is why it was not upstreamed
-before. What to do when a secondary GPU gets detected really is a policy
-decission (e.g. one may want to autobind PCI GPUs but not USB ones) and
-as such should be under control of the Desktop Environment.
-
-Unconditionally adding autobinding support to the xserver will result
-in races between the DE dealing with the hotplug of a secondary GPU
-and the server itself dealing with it.
-
-However we've waited for years for any Desktop Environments to actually
-start doing some sort of autoconfiguration of secondary GPUs and there
-is still not a single DE dealing with this, so I believe that it is
-time to upstream this now.
-
-To avoid potential future problems if any DEs get support for doing
-secondary GPU configuration themselves, the new autobind functionality
-is made optional. Since no DEs currently support doing this themselves it
-is enabled by default. When DEs grow support for doing this themselves
-they can disable the servers autobinding through the servers cmdline or a
-xorg.conf snippet.
-
-Signed-off-by: Dave Airlie <airlied@gmail.com>
-[hdegoede@redhat.com: Make configurable, fix with nvidia, submit upstream]
-Signed-off-by: Hans de Goede <hdegoede@redhat.com>
----
- hw/xfree86/common/xf86Config.c | 19 +++++++++++++++++++
- hw/xfree86/common/xf86Globals.c | 2 ++
- hw/xfree86/common/xf86Init.c | 20 ++++++++++++++++++++
- hw/xfree86/common/xf86Priv.h | 1 +
- hw/xfree86/common/xf86Privstr.h | 1 +
- hw/xfree86/common/xf86platformBus.c | 4 ++++
- hw/xfree86/man/Xorg.man | 7 +++++++
- hw/xfree86/man/xorg.conf.man | 6 ++++++
- randr/randrstr.h | 3 +++
- randr/rrprovider.c | 22 ++++++++++++++++++++++
- 10 files changed, 85 insertions(+)
-
-diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
-index 2c1d335..d7d7c2e 100644
---- a/hw/xfree86/common/xf86Config.c
-+++ b/hw/xfree86/common/xf86Config.c
-@@ -643,6 +643,7 @@ typedef enum {
- FLAG_DRI2,
- FLAG_USE_SIGIO,
- FLAG_AUTO_ADD_GPU,
-+ FLAG_AUTO_BIND_GPU,
- FLAG_MAX_CLIENTS,
- FLAG_IGLX,
- FLAG_DEBUG,
-@@ -699,6 +700,8 @@ static OptionInfoRec FlagOptions[] = {
- {0}, FALSE},
- {FLAG_AUTO_ADD_GPU, "AutoAddGPU", OPTV_BOOLEAN,
- {0}, FALSE},
-+ {FLAG_AUTO_BIND_GPU, "AutoBindGPU", OPTV_BOOLEAN,
-+ {0}, FALSE},
- {FLAG_MAX_CLIENTS, "MaxClients", OPTV_INTEGER,
- {0}, FALSE },
- {FLAG_IGLX, "IndirectGLX", OPTV_BOOLEAN,
-@@ -779,6 +782,22 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
- }
- xf86Msg(from, "%sutomatically adding GPU devices\n",
- xf86Info.autoAddGPU ? "A" : "Not a");
-+
-+ if (xf86AutoBindGPUDisabled) {
-+ xf86Info.autoBindGPU = FALSE;
-+ from = X_CMDLINE;
-+ }
-+ else if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_BIND_GPU)) {
-+ xf86GetOptValBool(FlagOptions, FLAG_AUTO_BIND_GPU,
-+ &xf86Info.autoBindGPU);
-+ from = X_CONFIG;
-+ }
-+ else {
-+ from = X_DEFAULT;
-+ }
-+ xf86Msg(from, "%sutomatically binding GPU devices\n",
-+ xf86Info.autoBindGPU ? "A" : "Not a");
-+
- /*
- * Set things up based on the config file information. Some of these
- * settings may be overridden later when the command line options are
-diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
-index e890f05..7b27b4c 100644
---- a/hw/xfree86/common/xf86Globals.c
-+++ b/hw/xfree86/common/xf86Globals.c
-@@ -131,6 +131,7 @@ xf86InfoRec xf86Info = {
- #else
- .autoAddGPU = FALSE,
- #endif
-+ .autoBindGPU = TRUE,
- };
-
- const char *xf86ConfigFile = NULL;
-@@ -191,6 +192,7 @@ Bool xf86FlipPixels = FALSE;
- Gamma xf86Gamma = { 0.0, 0.0, 0.0 };
-
- Bool xf86AllowMouseOpenFail = FALSE;
-+Bool xf86AutoBindGPUDisabled = FALSE;
-
- #ifdef XF86VIDMODE
- Bool xf86VidModeDisabled = FALSE;
-diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
-index ea42ec9..ec255b6 100644
---- a/hw/xfree86/common/xf86Init.c
-+++ b/hw/xfree86/common/xf86Init.c
-@@ -76,6 +76,7 @@
- #include "xf86DDC.h"
- #include "xf86Xinput.h"
- #include "xf86InPriv.h"
-+#include "xf86Crtc.h"
- #include "picturestr.h"
- #include "randrstr.h"
- #include "glxvndabi.h"
-@@ -237,6 +238,19 @@ xf86PrivsElevated(void)
- return PrivsElevated();
- }
-
-+static void
-+xf86AutoConfigOutputDevices(void)
-+{
-+ int i;
-+
-+ if (!xf86Info.autoBindGPU)
-+ return;
-+
-+ for (i = 0; i < xf86NumGPUScreens; i++)
-+ RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]),
-+ xf86ScrnToScreen(xf86Screens[0]));
-+}
-+
- static void
- TrapSignals(void)
- {
-@@ -770,6 +784,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
- for (i = 0; i < xf86NumGPUScreens; i++)
- AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
-
-+ xf86AutoConfigOutputDevices();
-+
- xf86VGAarbiterWrapFunctions();
- if (sigio_blocked)
- input_unlock();
-@@ -1278,6 +1294,10 @@ ddxProcessArgument(int argc, char **argv, int i)
- xf86Info.iglxFrom = X_CMDLINE;
- return 0;
- }
-+ if (!strcmp(argv[i], "-noautoBindGPU")) {
-+ xf86AutoBindGPUDisabled = TRUE;
-+ return 1;
-+ }
-
- /* OS-specific processing */
- return xf86ProcessArgument(argc, argv, i);
-diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
-index 4fe2b5f..6566622 100644
---- a/hw/xfree86/common/xf86Priv.h
-+++ b/hw/xfree86/common/xf86Priv.h
-@@ -46,6 +46,7 @@
- extern _X_EXPORT const char *xf86ConfigFile;
- extern _X_EXPORT const char *xf86ConfigDir;
- extern _X_EXPORT Bool xf86AllowMouseOpenFail;
-+extern _X_EXPORT Bool xf86AutoBindGPUDisabled;
-
- #ifdef XF86VIDMODE
- extern _X_EXPORT Bool xf86VidModeDisabled;
-diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
-index 21c2e1f..6c71863 100644
---- a/hw/xfree86/common/xf86Privstr.h
-+++ b/hw/xfree86/common/xf86Privstr.h
-@@ -98,6 +98,7 @@ typedef struct {
-
- Bool autoAddGPU;
- const char *debug;
-+ Bool autoBindGPU;
- } xf86InfoRec, *xf86InfoPtr;
-
- /* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */
-diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
-index cef47da..913a324 100644
---- a/hw/xfree86/common/xf86platformBus.c
-+++ b/hw/xfree86/common/xf86platformBus.c
-@@ -49,6 +49,7 @@
- #include "Pci.h"
- #include "xf86platformBus.h"
- #include "xf86Config.h"
-+#include "xf86Crtc.h"
-
- #include "randrstr.h"
- int platformSlotClaimed;
-@@ -665,6 +666,9 @@ xf86platformAddDevice(int index)
- }
- /* attach unbound to 0 protocol screen */
- AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
-+ if (xf86Info.autoBindGPU)
-+ RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]),
-+ xf86ScrnToScreen(xf86Screens[0]));
-
- RRResourcesChanged(xf86Screens[0]->pScreen);
- RRTellChanged(xf86Screens[0]->pScreen);
-diff --git a/hw/xfree86/man/Xorg.man b/hw/xfree86/man/Xorg.man
-index 13a9dc3..745f986 100644
---- a/hw/xfree86/man/Xorg.man
-+++ b/hw/xfree86/man/Xorg.man
-@@ -283,6 +283,13 @@ is a comma separated list of directories to search for
- server modules. This option is only available when the server is run
- as root (i.e, with real-uid 0).
- .TP 8
-+.B \-noautoBindGPU
-+Disable automatically setting secondary GPUs up as output sinks and offload
-+sources. This is equivalent to setting the
-+.B AutoBindGPU
-+xorg.conf(__filemansuffix__) file option. To
-+.B false.
-+.TP 8
- .B \-nosilk
- Disable Silken Mouse support.
- .TP 8
-diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man
-index 9589262..8d51e06 100644
---- a/hw/xfree86/man/xorg.conf.man
-+++ b/hw/xfree86/man/xorg.conf.man
-@@ -672,6 +672,12 @@ Enabled by default.
- If this option is disabled, then no GPU devices will be added from the udev
- backend. Enabled by default. (May need to be disabled to setup Xinerama).
- .TP 7
-+.BI "Option \*qAutoBindGPU\*q \*q" boolean \*q
-+If enabled then secondary GPUs will be automatically set up as output-sinks and
-+offload-sources. Making e.g. laptop outputs connected only to the secondary
-+GPU directly available for use without needing to run
-+"xrandr --setprovideroutputsource". Enabled by default.
-+.TP 7
- .BI "Option \*qLog\*q \*q" string \*q
- This option controls whether the log is flushed and/or synced to disk after
- each message.
-diff --git a/randr/randrstr.h b/randr/randrstr.h
-index f94174b..092d726 100644
---- a/randr/randrstr.h
-+++ b/randr/randrstr.h
-@@ -1039,6 +1039,9 @@ RRProviderLookup(XID id, RRProviderPtr *provider_p);
- extern _X_EXPORT void
- RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider);
-
-+extern _X_EXPORT void
-+RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr masterScreen);
-+
- /* rrproviderproperty.c */
-
- extern _X_EXPORT void
-diff --git a/randr/rrprovider.c b/randr/rrprovider.c
-index e4bc2bf..e04c18f 100644
---- a/randr/rrprovider.c
-+++ b/randr/rrprovider.c
-@@ -485,3 +485,25 @@ RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider)
-
- WriteEventsToClient(client, 1, (xEvent *) &pe);
- }
-+
-+void
-+RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr masterScreen)
-+{
-+ rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen);
-+ rrScrPrivPtr masterPriv = rrGetScrPriv(masterScreen);
-+ RRProviderPtr provider = pScrPriv->provider;
-+ RRProviderPtr master_provider = masterPriv->provider;
-+
-+ if (!provider || !master_provider)
-+ return;
-+
-+ if ((provider->capabilities & RR_Capability_SinkOutput) &&
-+ (master_provider->capabilities & RR_Capability_SourceOutput)) {
-+ pScrPriv->rrProviderSetOutputSource(pScreen, provider, master_provider);
-+ RRInitPrimeSyncProps(pScreen);
-+ }
-+
-+ if ((provider->capabilities & RR_Capability_SourceOffload) &&
-+ (master_provider->capabilities & RR_Capability_SinkOffload))
-+ pScrPriv->rrProviderSetOffloadSink(pScreen, provider, master_provider);
-+}
---
-2.16.2
-
diff --git a/x11-base/xorg-server/xorg-server-1.20.13-r100.ebuild b/x11-base/xorg-server/xorg-server-21.1.1-r100.ebuild
index 4f6c1564..b8aa75db 100644
--- a/x11-base/xorg-server/xorg-server-1.20.13-r100.ebuild
+++ b/x11-base/xorg-server/xorg-server-21.1.1-r100.ebuild
@@ -5,7 +5,8 @@ EAPI=7
XORG_DOC=doc
XORG_TARBALL_SUFFIX="xz"
-inherit xorg-3 multilib flag-o-matic toolchain-funcs
+XORG_EAUTORECONF="no"
+inherit xorg-3 meson
EGIT_REPO_URI="https://gitlab.freedesktop.org/xorg/xserver.git"
DESCRIPTION="X.Org X servers"
@@ -14,8 +15,8 @@ if [[ ${PV} != 9999* ]]; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
fi
-IUSE_SERVERS="dmx kdrive xephyr xnest xorg xvfb"
-IUSE="${IUSE_SERVERS} debug +elogind ipv6 minimal selinux suid systemd test +udev unwind xcsecurity"
+IUSE_SERVERS="xephyr xnest xorg xvfb"
+IUSE="${IUSE_SERVERS} debug +elogind minimal selinux suid systemd test +udev unwind xcsecurity"
RESTRICT="!test? ( test )"
CDEPEND="
@@ -30,28 +31,14 @@ CDEPEND="
>=x11-libs/libXau-1.0.4
>=x11-libs/libXdmcp-1.0.2
>=x11-libs/libXfont2-2.0.1
+ >=x11-libs/libxcvt-0.1.0
>=x11-libs/libxkbfile-1.0.4
>=x11-libs/libxshmfence-1.1
>=x11-libs/pixman-0.27.2
>=x11-misc/xbitmaps-1.0.1
>=x11-misc/xkeyboard-config-2.4.1-r3
- dmx? (
- x11-libs/libXt
- >=x11-libs/libdmx-1.0.99.1
- >=x11-libs/libX11-1.1.5
- >=x11-libs/libXaw-1.0.4
- >=x11-libs/libXext-1.0.99.4
- >=x11-libs/libXfixes-5.0
- >=x11-libs/libXi-1.2.99.1
- >=x11-libs/libXmu-1.0.3
- x11-libs/libXrender
- >=x11-libs/libXres-1.0.3
- >=x11-libs/libXtst-1.0.99.2
- )
- kdrive? (
- >=x11-libs/libXext-1.0.5
- x11-libs/libXv
- )
+ >=x11-libs/libXext-1.0.5
+ x11-libs/libXv
xephyr? (
x11-libs/libxcb[xkb]
x11-libs/xcb-util
@@ -69,6 +56,7 @@ CDEPEND="
udev? ( virtual/libudev:= )
unwind? ( sys-libs/libunwind )
>=x11-apps/xinit-1.3.3-r1
+ selinux? ( sys-libs/libselinux )
systemd? (
sys-apps/dbus
sys-apps/systemd
@@ -81,16 +69,10 @@ CDEPEND="
!!x11-drivers/nvidia-drivers[-libglvnd(+)]
"
DEPEND="${CDEPEND}
- >=x11-base/xorg-proto-2018.4
+ >=x11-base/xorg-proto-2021.4.99.2
>=x11-libs/xtrans-1.3.5
- dmx? (
- doc? (
- || (
- www-client/links
- www-client/lynx
- www-client/w3m
- )
- )
+ doc? (
+ x11-base/xorg-sgml-doctools
)
"
RDEPEND="${CDEPEND}
@@ -107,10 +89,10 @@ REQUIRED_USE="!minimal? (
|| ( ${IUSE_SERVERS} )
)
elogind? ( udev )
- ?? ( elogind systemd )
- xephyr? ( kdrive )"
+ ?? ( elogind systemd )"
UPSTREAMED_PATCHES=(
+ "${FILESDIR}"/${P}-DPI-revert.patch
)
PATCHES=(
@@ -118,7 +100,6 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch
# needed for new eselect-opengl, bug #541232
"${FILESDIR}"/${PN}-1.18-support-multiple-Files-sections.patch
- "${FILESDIR}"/xserver-autobind-hotplug.patch
)
src_configure() {
@@ -127,83 +108,64 @@ src_configure() {
# sysconfdir is used for the xorg.conf location; same applies
# NOTE: fop is used for doc generating; and I have no idea if Gentoo
# package it somewhere
- local XORG_CONFIGURE_OPTIONS=(
- $(use_enable ipv6)
- $(use_enable debug)
- $(use_enable dmx)
- $(use_enable kdrive)
- $(use_enable test unit-tests)
- $(use_enable unwind libunwind)
- $(use_enable !minimal record)
- $(use_enable !minimal xfree86-utils)
- $(use_enable !minimal dri)
- $(use_enable !minimal dri2)
- $(use_enable !minimal dri3)
- $(use_enable !minimal glamor)
- $(use_enable !minimal glx)
- $(use_enable xcsecurity)
- $(use_enable xephyr)
- $(use_enable xnest)
- $(use_enable xorg)
- $(use_enable xvfb)
- $(use_enable udev config-udev)
- $(use_with doc doxygen)
- $(use_with doc xmlto)
- $(use_with systemd systemd-daemon)
- --disable-xwayland
- --enable-libdrm
- --sysconfdir="${EPREFIX}"/etc/X11
- --localstatedir="${EPREFIX}"/var
- --with-fontrootdir="${EPREFIX}"/usr/share/fonts
- --with-xkb-output="${EPREFIX}"/var/lib/xkb
- --disable-config-hal
- --disable-linux-acpi
- --without-dtrace
- --without-fop
- --with-os-vendor=Gentoo
- --with-sha1=libcrypto
- CPP="$(tc-getPROG CPP cpp)"
+
+ local emesonargs=(
+ --localstatedir "${EPREFIX}/var"
+ --sysconfdir "${EPREFIX}/etc/X11"
+ --buildtype $(usex debug debug plain)
+ -Db_ndebug=$(usex debug false true)
+ $(meson_use doc docs)
+ $(meson_use !minimal dri1)
+ $(meson_use !minimal dri2)
+ $(meson_use !minimal dri3)
+ $(meson_use !minimal glamor)
+ $(meson_use !minimal glx)
+ $(meson_use udev)
+ $(meson_use udev udev_kms)
+ $(meson_use unwind libunwind)
+ $(meson_use xcsecurity)
+ $(meson_use xephyr)
+ $(meson_use xnest)
+ $(meson_use xorg)
+ $(meson_use xvfb)
+ -Ddefault_font_path="${EPREFIX}"/usr/share/fonts
+ -Ddrm=true
+ -Ddtrace=false
+ -Dipv6=true
+ -Dhal=false
+ -Dlinux_acpi=false
+ -Dlinux_apm=false
+ -Dsha1=libcrypto
+ -Dxkb_output_dir="${EPREFIX}/var/lib/xkb"
)
if use systemd || use elogind; then
- XORG_CONFIGURE_OPTIONS+=(
- --enable-systemd-logind
- --disable-install-setuid
- $(use_enable suid suid-wrapper)
+ emesonargs+=(
+ -Dsystemd_logind=true
+ $(meson_use suid suid_wrapper)
)
else
- XORG_CONFIGURE_OPTIONS+=(
- --disable-systemd-logind
- --disable-suid-wrapper
- $(use_enable suid install-setuid)
+ emesonargs+=(
+ -Dsystemd_logind=false
+ $(meson_use suid suid_wrapper)
)
fi
- xorg-3_src_configure
+ meson_src_configure
}
-server_based_install() {
+src_install() {
+ meson_src_install
+
+ #The new meson build system do not leave X symlink
+ ln -s Xorg "${ED}"/usr/bin/X
+
if ! use xorg; then
rm -f "${ED}"/usr/share/man/man1/Xserver.1x \
"${ED}"/usr/$(get_libdir)/xserver/SecurityPolicy \
"${ED}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \
"${ED}"/usr/share/man/man1/Xserver.1x || die
fi
-}
-
-src_install() {
- xorg-3_src_install
-
- server_based_install
-
- if ! use minimal && use xorg; then
- # Install xorg.conf.example into docs
- dodoc "${S}"/hw/xfree86/xorg.conf.example
-
- rm \
- "${ED}"/usr/bin/cvt \
- "${ED}"/usr/share/man/man1/cvt.1 || die
- fi
# install the @x11-module-rebuild set for Portage
insinto /usr/share/portage/config/sets
@@ -212,8 +174,6 @@ src_install() {
# enable clicks using touchpad (https://bugs.redcorelinux.org/show_bug.cgi?id=48)
insinto /usr/share/X11/xorg.conf.d
doins "${FILESDIR}"/99-synaptics-overrides.conf
-
- find "${ED}"/var -type d -empty -delete || die
}
pkg_postrm() {