pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/x11/modular-xorg-server



Module Name:    pkgsrc
Committed By:   dholland
Date:           Sun May 22 21:29:59 UTC 2022

Modified Files:
        pkgsrc/x11/modular-xorg-server: distinfo
        pkgsrc/x11/modular-xorg-server/patches:
            patch-hw_xfree86_os-support_bus_Sbus.c
Added Files:
        pkgsrc/x11/modular-xorg-server/patches:
            patch-hw_xfree86_os-support_solaris_sun__init.c
            patch-os_backtrace.c

Log Message:
modular-xorg-server: apply changes in PR 41501 to fix Solaris sparc build.

>From Claes Nästén.


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 pkgsrc/x11/modular-xorg-server/distinfo
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/x11/modular-xorg-server/patches/patch-hw_xfree86_os-support_bus_Sbus.c
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/x11/modular-xorg-server/patches/patch-hw_xfree86_os-support_solaris_sun__init.c
cvs rdiff -u -r0 -r1.3 \
    pkgsrc/x11/modular-xorg-server/patches/patch-os_backtrace.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/x11/modular-xorg-server/distinfo
diff -u pkgsrc/x11/modular-xorg-server/distinfo:1.116 pkgsrc/x11/modular-xorg-server/distinfo:1.117
--- pkgsrc/x11/modular-xorg-server/distinfo:1.116       Wed Dec 15 23:35:00 2021
+++ pkgsrc/x11/modular-xorg-server/distinfo     Sun May 22 21:29:58 2022
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.116 2021/12/15 23:35:00 wiz Exp $
+$NetBSD: distinfo,v 1.117 2022/05/22 21:29:58 dholland Exp $
 
 BLAKE2s (xorg-server-1.20.14.tar.xz) = 207f7e9d968765e4ee9d916007fdd32827ed33516b2457b83002b709476e8319
 SHA512 (xorg-server-1.20.14.tar.xz) = be3dc32cce7d55d7e38c5f6557027f13f39224c76cc83e5800555d5ce89dbdc3731773a2d186a5b97db9fc8731a2b2dd6e9829af2b01ee2559246d4aef7c4963
@@ -13,9 +13,11 @@ SHA1 (patch-hw_xfree86_os-support_bsd_ar
 SHA1 (patch-hw_xfree86_os-support_bsd_bsd__VTsw.c) = 90343f694c27a6fdd5070e1167687943bd056a99
 SHA1 (patch-hw_xfree86_os-support_bsd_bsd__init.c) = b58ce2005251c1b3f723ee87c759f75bcb27e230
 SHA1 (patch-hw_xfree86_os-support_bsd_i386__video.c) = f2c72562a40c0e3109991453aff9c2c082526b1b
-SHA1 (patch-hw_xfree86_os-support_bus_Sbus.c) = 0035b970bdae1bab51b8ca6bfeed060ec4df3a60
+SHA1 (patch-hw_xfree86_os-support_bus_Sbus.c) = 8507a2ac60c77031048a386dc5c48f0ef86cb8de
 SHA1 (patch-hw_xfree86_os-support_solaris_solaris-amd64.S) = 088a3118deb7567194e08dd46e34cb6edba38400
+SHA1 (patch-hw_xfree86_os-support_solaris_sun__init.c) = 6148072cfaf1cb8d0a2f465b51429563c8ea2c15
 SHA1 (patch-hw_xfree86_os-support_xf86_OSproc.h) = e1c049857893d2f050d5fb297a3e8ef86f0b1d7e
 SHA1 (patch-hw_xfree86_os_support_bus_xf86Sbus.h) = 0e0a243b737f8f762c9f8f24a2265d1b6aefb544
 SHA1 (patch-hw_xwayland_xwayland-input.c) = b876642a56f4930dfaa88cff77d4518cfe9d73e0
+SHA1 (patch-os_backtrace.c) = 8cf93febb737dd850706d140b467b73f61ecd3ad
 SHA1 (patch-test_xtest.c) = 77622ef481e91e64b3a6dd64b8579404f33ec88f

Index: pkgsrc/x11/modular-xorg-server/patches/patch-hw_xfree86_os-support_bus_Sbus.c
diff -u pkgsrc/x11/modular-xorg-server/patches/patch-hw_xfree86_os-support_bus_Sbus.c:1.3 pkgsrc/x11/modular-xorg-server/patches/patch-hw_xfree86_os-support_bus_Sbus.c:1.4
--- pkgsrc/x11/modular-xorg-server/patches/patch-hw_xfree86_os-support_bus_Sbus.c:1.3   Wed Nov 16 10:14:37 2016
+++ pkgsrc/x11/modular-xorg-server/patches/patch-hw_xfree86_os-support_bus_Sbus.c       Sun May 22 21:29:58 2022
@@ -1,8 +1,8 @@
-$NetBSD: patch-hw_xfree86_os-support_bus_Sbus.c,v 1.3 2016/11/16 10:14:37 wiz Exp $
+$NetBSD: patch-hw_xfree86_os-support_bus_Sbus.c,v 1.4 2022/05/22 21:29:58 dholland Exp $
 
-Merge most of netbsdSbus.c from xsrc.
+Merge most of netbsdSbus.c from xsrc, but leave the Solaris support in place.
 
---- hw/xfree86/os-support/bus/Sbus.c.orig      2016-08-11 19:08:48.000000000 +0000
+--- hw/xfree86/os-support/bus/Sbus.c.orig      2022-05-22 21:01:31.709546787 +0000
 +++ hw/xfree86/os-support/bus/Sbus.c
 @@ -34,6 +34,9 @@
  #ifdef __sun
@@ -14,15 +14,17 @@ Merge most of netbsdSbus.c from xsrc.
  #include "xf86.h"
  #include "xf86Priv.h"
  #include "xf86_OSlib.h"
-@@ -50,7 +53,6 @@ static int promP1275 = -1;
+@@ -50,7 +53,9 @@ static int promP1275 = -1;
  
  #define MAX_PROP      128
  #define MAX_VAL               (4096-128-4)
--static struct openpromio *promOpio;
++#ifdef __sun
+ static struct openpromio *promOpio;
++#endif
  
  sbusDevicePtr *xf86SbusInfo = NULL;
  
-@@ -68,68 +70,75 @@ struct sbus_devtable sbusDeviceTable[] =
+@@ -68,15 +73,27 @@ struct sbus_devtable sbusDeviceTable[] =
      {SBUS_DEVICE_GT, FBTYPE_SUNGT, "gt", NULL, "Sun Graphics Tower"},
      {SBUS_DEVICE_MGX, -1, "mgx", NULL, "Quantum 3D MGXplus"},
      {SBUS_DEVICE_LEO, FBTYPE_SUNLEO, "leo", "sunleo", "Sun ZX or Turbo ZX"},
@@ -30,55 +32,76 @@ Merge most of netbsdSbus.c from xsrc.
 +    {SBUS_DEVICE_TCX, FBTYPE_TCXCOLOR, "tcx", "suntcx", "Sun TCX or S24"},
      {SBUS_DEVICE_FFB, FBTYPE_CREATOR, "ffb", "sunffb", "Sun FFB"},
      {SBUS_DEVICE_FFB, FBTYPE_CREATOR, "afb", "sunffb", "Sun Elite3D"},
++#ifdef FBTYPE_P9100
 +    {SBUS_DEVICE_P9100, FBTYPE_P9100, "pnozz", "pnozz", "Weitek P9100"},
++#endif /* FBTYPE_P9100 */
++#ifdef FBTYPE_AG10E
 +    {SBUS_DEVICE_AG10E, FBTYPE_AG10E, "ag10e", "ag10e", "Fujitsu AG-10e"},
++#endif /* FBTYPE_AG10E */
      {0, 0, NULL}
  };
  
++#ifndef __sun
 +static struct ofiocdesc ofio;
 +static char of_buf[256];
++#endif
 +
  int
  promGetSibling(int node)
  {
--    promOpio->oprom_size = sizeof(int);
++#ifdef __sun
+     promOpio->oprom_size = sizeof(int);
  
      if (node == -1)
+@@ -86,11 +103,20 @@ promGetSibling(int node)
          return 0;
--    *(int *) promOpio->oprom_array = node;
--    if (ioctl(promFd, OPROMNEXT, promOpio) < 0)
+     promCurrentNode = *(int *) promOpio->oprom_array;
+     return *(int *) promOpio->oprom_array;
++#else
++    if (node == -1)
++        return 0;
 +    if (ioctl(promFd, OFIOCGETNEXT, &node) < 0)
-         return 0;
--    promCurrentNode = *(int *) promOpio->oprom_array;
--    return *(int *) promOpio->oprom_array;
++        return 0;
 +    promCurrentNode = node;
 +    return node;
++#endif
  }
  
  int
  promGetChild(int node)
  {
--    promOpio->oprom_size = sizeof(int);
++#ifdef __sun
+     promOpio->oprom_size = sizeof(int);
  
      if (!node || node == -1)
+@@ -100,26 +126,52 @@ promGetChild(int node)
          return 0;
--    *(int *) promOpio->oprom_array = node;
--    if (ioctl(promFd, OPROMCHILD, promOpio) < 0)
+     promCurrentNode = *(int *) promOpio->oprom_array;
+     return *(int *) promOpio->oprom_array;
++#else
++    if (!node || node == -1)
++        return 0;
 +    if (ioctl(promFd, OFIOCGETCHILD, &node) < 0)
-         return 0;
--    promCurrentNode = *(int *) promOpio->oprom_array;
--    return *(int *) promOpio->oprom_array;
++        return 0;
 +    promCurrentNode = node;
 +    return node;
++#endif
  }
  
  char *
  promGetProperty(const char *prop, int *lenp)
  {
--    promOpio->oprom_size = MAX_VAL;
++#ifdef __sun
+     promOpio->oprom_size = MAX_VAL;
  
--    strcpy(promOpio->oprom_array, prop);
--    if (ioctl(promFd, OPROMGETPROP, promOpio) < 0)
+     strcpy(promOpio->oprom_array, prop);
+     if (ioctl(promFd, OPROMGETPROP, promOpio) < 0)
+         return 0;
++
+     if (lenp)
+         *lenp = promOpio->oprom_size;
+     return promOpio->oprom_array;
++#else
 +    ofio.of_nodeid = promCurrentNode;
 +    ofio.of_name = (char *)prop;
 +    ofio.of_namelen = strlen(prop);
@@ -86,78 +109,82 @@ Merge most of netbsdSbus.c from xsrc.
 +    ofio.of_buflen = sizeof(of_buf);
 +
 +    if (ioctl(promFd, OFIOCGET, &ofio) < 0)
-         return 0;
++        return 0;
 +
 +    of_buf[ofio.of_buflen] = '\0';
 +
-     if (lenp)
--        *lenp = promOpio->oprom_size;
--    return promOpio->oprom_array;
++    if (lenp)
 +        *lenp = ofio.of_buflen;
 +    return of_buf;
++#endif
  }
  
  int
  promGetBool(const char *prop)
  {
--    promOpio->oprom_size = 0;
++#ifdef __sun
+     promOpio->oprom_size = 0;
+-
+     *(int *) promOpio->oprom_array = 0;
+     for (;;) {
+         promOpio->oprom_size = MAX_PROP;
+@@ -130,6 +182,19 @@ promGetBool(const char *prop)
+         if (!strcmp(promOpio->oprom_array, prop))
+             return 1;
+     }
++#else
 +    ofio.of_nodeid = promCurrentNode;
 +    ofio.of_name = (char *)prop;
 +    ofio.of_namelen = strlen(prop);
 +    ofio.of_buf = of_buf;
 +    ofio.of_buflen = sizeof(of_buf);
- 
--    *(int *) promOpio->oprom_array = 0;
--    for (;;) {
--        promOpio->oprom_size = MAX_PROP;
--        if (ioctl(promFd, OPROMNXTPROP, promOpio) < 0)
--            return 0;
--        if (!promOpio->oprom_size)
--            return 0;
--        if (!strcmp(promOpio->oprom_array, prop))
--            return 1;
--    }
++
 +    if (ioctl(promFd, OFIOCGET, &ofio) < 0)
 +        return 0;
 +    if (ofio.of_buflen < 0)
 +        return 0;
 +    return 1;
++#endif
  }
  
  #define PROM_NODE_SIBLING 0x01
-@@ -180,8 +189,8 @@ promIsP1275(void)
+@@ -180,8 +245,8 @@ promIsP1275(void)
          promP1275 = TRUE;
      else
          promP1275 = FALSE;
 -#elif defined(__FreeBSD__)
 -    promP1275 = TRUE;
 +#elif defined(__FreeBSD__) || defined(__NetBSD__)
-+     promP1275 = TRUE;
++    promP1275 = TRUE;
  #else
  #error Missing promIsP1275() function for this OS
  #endif
-@@ -198,8 +207,6 @@ sparcPromClose(void)
+@@ -198,8 +263,10 @@ sparcPromClose(void)
          close(promFd);
          promFd = -1;
      }
--    free(promOpio);
--    promOpio = NULL;
++#ifdef __sun
+     free(promOpio);
+     promOpio = NULL;
++#endif
      promOpenCount = 0;
  }
  
-@@ -213,11 +220,6 @@ sparcPromInit(void)
+@@ -213,11 +280,13 @@ sparcPromInit(void)
      promFd = open("/dev/openprom", O_RDONLY, 0);
      if (promFd == -1)
          return -1;
--    promOpio = (struct openpromio *) malloc(4096);
--    if (!promOpio) {
--        sparcPromClose();
--        return -1;
--    }
++#ifdef __sun
+     promOpio = (struct openpromio *) malloc(4096);
+     if (!promOpio) {
+         sparcPromClose();
+         return -1;
+     }
++#endif
      promRootNode = promGetSibling(0);
      if (!promRootNode) {
          sparcPromClose();
-@@ -399,9 +401,9 @@ sparcPromAssignNodes(void)
+@@ -399,9 +468,9 @@ sparcPromAssignNodes(void)
           * were the types of the cards missed. */
          char buffer[64];
          int fbNum, devId;

Added files:

Index: pkgsrc/x11/modular-xorg-server/patches/patch-hw_xfree86_os-support_solaris_sun__init.c
diff -u /dev/null pkgsrc/x11/modular-xorg-server/patches/patch-hw_xfree86_os-support_solaris_sun__init.c:1.1
--- /dev/null   Sun May 22 21:29:59 2022
+++ pkgsrc/x11/modular-xorg-server/patches/patch-hw_xfree86_os-support_solaris_sun__init.c      Sun May 22 21:29:58 2022
@@ -0,0 +1,22 @@
+$NetBSD: patch-hw_xfree86_os-support_solaris_sun__init.c,v 1.1 2022/05/22 21:29:58 dholland Exp $
+
+Fix sparc Solaris build.
+
+--- hw/xfree86/os-support/solaris/sun_init.c~  2021-12-15 19:01:24.000000000 +0000
++++ hw/xfree86/os-support/solaris/sun_init.c
+@@ -61,6 +61,7 @@ static char consoleDev[PATH_MAX] = "/dev
+    Used by hw/xfree86/common/xf86AutoConfig.c for VIS_GETIDENTIFIER */
+ _X_HIDDEN char xf86SolarisFbDev[PATH_MAX] = "/dev/fb";
+ 
++#ifdef HAS_USL_VTS
+ static void
+ switch_to(int vt, const char *from)
+ {
+@@ -76,6 +77,7 @@ switch_to(int vt, const char *from)
+         xf86Msg(X_WARNING, "%s: VT_WAITACTIVE failed: %s\n",
+                 from, strerror(errno));
+ }
++#endif
+ 
+ void
+ xf86OpenConsole(void)

Index: pkgsrc/x11/modular-xorg-server/patches/patch-os_backtrace.c
diff -u /dev/null pkgsrc/x11/modular-xorg-server/patches/patch-os_backtrace.c:1.3
--- /dev/null   Sun May 22 21:29:59 2022
+++ pkgsrc/x11/modular-xorg-server/patches/patch-os_backtrace.c Sun May 22 21:29:58 2022
@@ -0,0 +1,14 @@
+$NetBSD: patch-os_backtrace.c,v 1.3 2022/05/22 21:29:58 dholland Exp $
+
+Use standard headers, needed on Solaris.
+
+--- os/backtrace.c~    2021-12-15 19:01:24.000000000 +0000
++++ os/backtrace.c
+@@ -29,6 +29,7 @@
+ #include "misc.h"
+ #include <errno.h>
+ #include <string.h>
++#include <unistd.h>
+ 
+ #ifdef HAVE_LIBUNWIND
+ 



Home | Main Index | Thread Index | Old Index