Skip to content
Permalink
Browse files

xorg-server-devel: Update to 1.20.x branch

  • Loading branch information
cjones051073 committed Sep 27, 2018
1 parent 910235c commit 62b3a45f30d243b2cb2c34721eb3b6ec209c8f74
@@ -1,49 +1,32 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortSystem 1.0
PortGroup compiler_blacklist_versions 1.0

name xorg-server-devel
name xorg-server-devel
conflicts xorg-server
set my_name xorg-server
version 1.19.99.1
categories x11 devel
set my_name xorg-server
version 1.20.1
categories x11 devel
license X11
maintainers {jeremyhu @jeremyhu} openmaintainer
description The X.org / Xquartz X server.
homepage https://www.x.org
platforms darwin macosx
maintainers {jeremyhu @jeremyhu} openmaintainer
description The X.org / Xquartz X server.
homepage https://www.x.org
platforms darwin macosx
long_description The X.org X server allows you to run X11 applications on your computer.

fetch.type git
git.url git://anongit.freedesktop.org/xorg/xserver
git.branch d16133e3e293fe16b291114d344fbd5a61d5ed65
#git.branch xorg-server-${version}
git.branch 1508ea68065b7976dbf56039f9b20dcaf0394431
#git.branch xorg-server-${version}

use_parallel_build yes

# Yes, mesa is a *BUILD* dependency
depends_build \
port:pkgconfig \
port:mesa \
port:xorg-applewmproto \
port:xorg-bigreqsproto \
port:xorg-damageproto \
port:xorg-fixesproto \
port:xorg-fontsproto \
port:xorg-glproto \
port:xorg-inputproto \
port:xorg-presentproto \
port:xorg-randrproto \
port:xorg-recordproto \
port:xorg-renderproto \
port:xorg-resourceproto \
port:xorg-scrnsaverproto \
port:xorg-videoproto \
port:xorg-xcmiscproto \
port:xorg-xproto \
port:xorg-xextproto \
port:xorg-xineramaproto \
port:xorg-xorgproto \
port:xorg-xtrans

# This xinit dependency needs to be port: not bin: because we specifically run ${prefix}/bin/startx from bundle-main.c
@@ -88,19 +71,34 @@ configure.args --with-apple-applications-dir=${applications_dir} \
# GL/internal/dri_interface.h is missing in prefix (provided by libdrm for the xorg DDX... not helpful for us)
configure.cppflags-append -I/usr/include -I${filespath}/dri -F${configure.sdkroot}/System/Library/Frameworks/ApplicationServices.framework/Frameworks

# Debugging ...
#configure.cppflags-append -g -fsanitize=address -fno-omit-frame-pointer
#configure.cflags-append -g -fsanitize=address -fno-omit-frame-pointer
#configure.cppflags-replace -Os -O1
#configure.cflags-replace -Os -O1

configure.env-append \
RAWCPP=${configure.cpp}

patchfiles \
0001-os-connection-Improve-abstraction-for-launchd-secure.patch \
0002-randr-Initialize-RandR-even-if-there-are-currently-n.patch \
0003-glx-Initialize-glx-even-if-there-are-currently-no-sc.patch \
5000-sdksyms.sh-Use-CPPFLAGS-not-CFLAGS.patch \
5001-Revert-dix-Restore-PaintWindow-screen-hook.patch \
5002-Workaround-the-GC-clipping-problem-in-miPaintWindow-.patch \
5003-Use-old-miTrapezoids-and-miTriangles-routines.patch \
5004-fb-Revert-fb-changes-that-broke-XQuartz.patch \
5005-fb-Revert-fb-changes-that-broke-XQuartz.patch
0001-os-connection-Improve-abstraction-for-launchd-secure.patch \
0002-randr-Initialize-RandR-even-if-there-are-currently-n.patch \
0003-glx-Initialize-glx-even-if-there-are-currently-no-sc.patch \
5000-sdksyms.sh-Use-CPPFLAGS-not-CFLAGS.patch \
5001-Revert-dix-Restore-PaintWindow-screen-hook.patch \
5002-Workaround-the-GC-clipping-problem-in-miPaintWindow-.patch \
5003-Use-old-miTrapezoids-and-miTriangles-routines.patch \
5004-fb-Revert-fb-changes-that-broke-XQuartz.patch \
5005-fb-Revert-fb-changes-that-broke-XQuartz.patch

# Fixes what appears to be a mis-match in the way
# hw/xquartz/GL/visualConfigs.c allocates __GLXconfig
# objects with a single calloc call to the way
# they are released in glxscreens.c with a loop and a
# free call to each struct. The patch below fixes
# this by individually allocating each
# https://bugzilla.freedesktop.org/show_bug.cgi?id=107555
patchfiles-append fix-calloc-free-mis-match-bug.patch

patch.pre_args -p1

@@ -33,10 +33,19 @@ Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
1 file changed, 21 deletions(-)

diff --git a/glx/glxext.c b/glx/glxext.c
index d595a05..d216c9d 100644
index 99f8661..29f5961 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -319,23 +319,6 @@ GlxPushProvider(__GLXprovider * provider)
@@ -51,7 +51,7 @@
/*
** X resources.
*/
-static int glxGeneration;
+//static int glxGeneration;
RESTYPE __glXContextRes;
RESTYPE __glXDrawableRes;

@@ -281,23 +281,23 @@ GlxPushProvider(__GLXprovider * provider)
__glXProviderStack = provider;
}

@@ -48,26 +57,62 @@ index d595a05..d216c9d 100644
- for (i = 0; i < screenInfo.numScreens; i++) {
- ScreenPtr screen = screenInfo.screens[i];
- for (j = 0; j < screen->numVisuals; j++) {
- if (screen->visuals[j].class == TrueColor ||
- screen->visuals[j].class == DirectColor)
- return True;
- if ((screen->visuals[j].class == TrueColor ||
- screen->visuals[j].class == DirectColor) &&
- screen->visuals[j].nplanes > 12)
- return TRUE;
- }
- }
-
- return False;
- return FALSE;
-}
-
+//static Bool
+//checkScreenVisuals(void)
+//{
+// int i, j;
+//
+// for (i = 0; i < screenInfo.numScreens; i++) {
+// ScreenPtr screen = screenInfo.screens[i];
+// for (j = 0; j < screen->numVisuals; j++) {
+// if ((screen->visuals[j].class == TrueColor ||
+// screen->visuals[j].class == DirectColor) &&
+// screen->visuals[j].nplanes > 12)
+// return TRUE;
+// }
+// }
+//
+// return FALSE;
+//}

static void
GetGLXDrawableBytes(void *value, XID id, ResourceSizePtr size)
@@ -471,10 +471,10 @@ xorgGlxGetDispatchAddress(CARD8 minorOpcode, CARD32 vendorCode)
static Bool
xorgGlxServerPreInit(const ExtensionEntry *extEntry)
{
@@ -371,10 +354,6 @@ GlxExtensionInit(void)
*stack = &__glXDRISWRastProvider;
}
- if (glxGeneration != serverGeneration) {
+ //if (glxGeneration != serverGeneration) {
/* Mesa requires at least one True/DirectColor visual */
- if (!checkScreenVisuals())
- return FALSE;
+ // if (!checkScreenVisuals())
+ // return FALSE;

- /* Mesa requires at least one True/DirectColor visual */
- if (!checkScreenVisuals())
- return;
-
__glXContextRes = CreateNewResourceType((DeleteType) ContextGone,
"GLXContext");
__glXDrawableRes = CreateNewResourceType((DeleteType) DrawableGone,
__glXContextRes = CreateNewResourceType((DeleteType) ContextGone,
"GLXContext");
@@ -497,10 +497,12 @@ xorgGlxServerPreInit(const ExtensionEntry *extEntry)
__glXregisterPresentCompleteNotify();
#endif

- glxGeneration = serverGeneration;
- }
+ // glxGeneration = serverGeneration;
+ //}
+
+ //return glxGeneration == serverGeneration;

- return glxGeneration == serverGeneration;
+ return TRUE;
}

static void
@@ -1,4 +1,4 @@
From 8d0796bfa8ab8599994b5d029182428d62398712 Mon Sep 17 00:00:00 2001
From da0dc81ea081657dba3ba492359593ba40d7245a Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston <jeremyhu@apple.com>
Date: Fri, 13 Jan 2012 12:00:57 -0800
Subject: [PATCH 5000/5005] sdksyms.sh: Use CPPFLAGS, not CFLAGS
@@ -1,4 +1,4 @@
From 5103ec7f937fc64a355da212c013619437dcf545 Mon Sep 17 00:00:00 2001
From 1d3dba846a7e51608b71797e7510d114555bfcd3 Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Sat, 26 Dec 2015 10:56:52 -0800
Subject: [PATCH 5001/5005] Revert "dix: Restore PaintWindow screen hook"
@@ -1,4 +1,4 @@
From 04d7c9360a106564666337e961da78c3f52bf72d Mon Sep 17 00:00:00 2001
From d6058fa4f68b68dff95c5ce826f9b9b498df3951 Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston <jeremyhu@apple.com>
Date: Fri, 30 Apr 2010 13:08:25 -0700
Subject: [PATCH 5002/5005] Workaround the GC clipping problem in miPaintWindow
@@ -1,4 +1,4 @@
From 963cad095b31c534f827019cb0b83a96b37cbef2 Mon Sep 17 00:00:00 2001
From 2850855f560451bb64dd5af3f005c6988961336e Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Sat, 2 Nov 2013 11:00:23 -0700
Subject: [PATCH 5003/5005] Use old miTrapezoids and miTriangles routines
@@ -1,4 +1,4 @@
From ede0b86e109653af9119013ff56e452346fef826 Mon Sep 17 00:00:00 2001
From 055a7bb8f22eb94a35cae6224d109daa435d288d Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston <jeremyhu@apple.com>
Date: Fri, 12 Feb 2010 19:48:52 -0800
Subject: [PATCH 5004/5005] fb: Revert fb changes that broke XQuartz
@@ -1,4 +1,4 @@
From 33dd8bad4b6a018d1bbe66b6e6de972c58cfc9f1 Mon Sep 17 00:00:00 2001
From 3475655620bc51071f0ba9cbc30b39587d9b0b44 Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Sat, 31 May 2014 13:14:20 -0700
Subject: [PATCH 5005/5005] fb: Revert fb changes that broke XQuartz
@@ -0,0 +1,67 @@
diff --git a/hw/xquartz/GL/visualConfigs.c b/hw/xquartz/GL/visualConfigs.c
index 69b18f6a0..79a4cce58 100644
--- a/hw/xquartz/GL/visualConfigs.c
+++ b/hw/xquartz/GL/visualConfigs.c
@@ -59,7 +59,7 @@
/* Based originally on code from indirect.c which was based on code from i830_dri.c. */
__GLXconfig *__glXAquaCreateVisualConfigs(int *numConfigsPtr, int screenNumber) {
int numConfigs = 0;
- __GLXconfig *visualConfigs, *c;
+ __GLXconfig *visualConfigs, *c, *last_c;
struct glCapabilities caps;
struct glCapabilitiesConfig *conf;
int stereo, depth, aux, buffers, stencil, accum, color, msample;
@@ -113,7 +113,7 @@ __GLXconfig *__glXAquaCreateVisualConfigs(int *numConfigsPtr, int screenNumber)
if(numConfigsPtr)
*numConfigsPtr = numConfigs;

- visualConfigs = calloc(sizeof(*visualConfigs), numConfigs);
+ visualConfigs = calloc(sizeof(*visualConfigs),1);

if(NULL == visualConfigs) {
ErrorF("xcalloc failure when allocating visualConfigs\n");
@@ -122,6 +122,7 @@ __GLXconfig *__glXAquaCreateVisualConfigs(int *numConfigsPtr, int screenNumber)
}

c = visualConfigs; /* current buffer */
+ int confCount = 0;
for(conf = caps.configurations; conf; conf = conf->next) {
for(stereo = 0; stereo < (conf->stereo ? 2 : 1); ++stereo) {
for(aux = 0; aux < (conf->aux_buffers ? 2 : 1); ++aux) {
@@ -134,10 +135,12 @@ __GLXconfig *__glXAquaCreateVisualConfigs(int *numConfigsPtr, int screenNumber)
for(depth = 0; depth < conf->total_depth_buffer_depths; ++depth) {
for(msample = 0; msample < (conf->multisample_buffers + 1); ++msample) {

+ ++confCount;
+
// Global
c->visualID = -1;
c->visualType = GLX_TRUE_COLOR;
- c->next = c + 1;
+ c->next = calloc(sizeof(*visualConfigs),1);

c->level = 0;
c->indexBits = 0;
@@ -260,6 +263,7 @@ __GLXconfig *__glXAquaCreateVisualConfigs(int *numConfigsPtr, int screenNumber)
/* EXT_framebuffer_sRGB */
c->sRGBCapable = GL_FALSE;

+ last_c = c;
c = c->next;
}
}
@@ -271,10 +275,11 @@ __GLXconfig *__glXAquaCreateVisualConfigs(int *numConfigsPtr, int screenNumber)
}
}

- (c-1)->next = NULL;
+ free(last_c->next);
+ last_c->next = NULL;

- if (c - visualConfigs != numConfigs) {
- FatalError("numConfigs calculation error in setVisualConfigs! numConfigs is %d i is %d\n", numConfigs, (int)(c - visualConfigs));
+ if (confCount != numConfigs) {
+ FatalError("numConfigs calculation error in setVisualConfigs! numConfigs is %d count is %d\n", numConfigs, confCount);
}

freeGlCapabilities(&caps);

0 comments on commit 62b3a45

Please sign in to comment.
You can’t perform that action at this time.