1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 VARIANTS= standard virtual xephyr nest
8 SDESC[xephyr]= X server from X.Org based on kdrive
9 SDESC[virtual]= X virtual framebuffer server from X.Org
10 SDESC[standard]= X.Org X server and related programs
11 SDESC[nest]= Nesting X server from X.Org
12 HOMEPAGE= https://www.x.org/
16 SITES[main]= XORG/individual/xserver
17 DISTFILE[1]= xorg-server-21.1.6.tar.xz:main
20 SPKGS[virtual]= single
21 SPKGS[standard]= single
24 OPTIONS_AVAILABLE= XORG VIRTUAL XEPHYR NEST DEVD SUID
25 OPTIONS_STANDARD= XORG DEVD SUID
26 VOPTS[xephyr]= XORG=OFF VIRTUAL=OFF XEPHYR=ON NEST=OFF DEVD=OFF
28 VOPTS[virtual]= XORG=OFF VIRTUAL=ON XEPHYR=OFF NEST=OFF DEVD=OFF
30 VOPTS[nest]= XORG=OFF VIRTUAL=OFF XEPHYR=OFF NEST=ON DEVD=OFF
32 OPT_ON[all]= XORG SUID
34 BUILD_DEPENDS= xorg-fontutil:single:standard
35 xorg-xkbfile:single:standard
36 libgpg-error:dev:standard
37 BUILDRUN_DEPENDS= xorg-xcvt:single:standard
38 RUN_DEPENDS= xorg-xkeyboard-config:primary:standard
39 xorg-xkbcomp:single:standard
41 USES= cpe perl:build ssl solaris-funcs meson zlib:build
42 XORG_COMPONENTS= xorgproto xtransproto pixman xshmfence xau xdmcp
46 LICENSE_FILE= MIT:{{WRKSRC}}/COPYING
50 FPC_EQUIVALENT= x11-servers/xorg-server
51 MESON_ARGS= -Dxkb_dir="{{LOCALBASE}}/share/X11/xkb"
52 -Ddefault_font_path="{{LOCALBASE}}/share/fonts"
59 SOL_FUNCTIONS= strnlen:xkb/XKBGAlloc.c
61 VAR_OPSYS[sunos]= CFLAGS=-DO_CLOEXEC=0
62 VAR_OPSYS[netbsd]= CPPFLAGS=-D_OPENBSD_SOURCE
63 CONFIGURE_ARGS=-Dsecure-rpc=false
65 [DEVD].DESCRIPTION= Use devd for autoconfiguration of input devices
67 [NEST].DESCRIPTION= Build as nesting X server
68 [NEST].BUILDRUN_DEPENDS_ON= libglvnd:single:standard
69 [NEST].BUILD_DEPENDS_ON= libepoxy:single:standard
71 libglvnd:single:standard
72 [NEST].CONFIGURE_ARGS_OFF= -Dxnest=false
73 [NEST].CONFIGURE_ARGS_ON= -Dxnest=true
74 [NEST].XORG_COMPONENTS_ON= x11
77 [XEPHYR].DESCRIPTION= Build as kdrive-base X server
78 [XEPHYR].BUILDRUN_DEPENDS_ON= libdrm:single:standard
79 libepoxy:single:standard
80 libglvnd:single:standard
81 [XEPHYR].BUILD_DEPENDS_ON= mesa:drivers:standard
82 [XEPHYR].CONFIGURE_ARGS_OFF= -Dxephyr=false
83 [XEPHYR].CONFIGURE_ARGS_ON= -Dxephyr=true
84 [XEPHYR].XORG_COMPONENTS_ON= x11
92 [VIRTUAL].DESCRIPTION= Build as virtual framebuffer server
93 [VIRTUAL].BUILDRUN_DEPENDS_ON= libglvnd:single:standard
94 [VIRTUAL].BUILD_DEPENDS_ON= libepoxy:single:standard
96 libglvnd:single:standard
97 [VIRTUAL].CONFIGURE_ARGS_OFF= -Dxvfb=false
98 [VIRTUAL].CONFIGURE_ARGS_ON= -Dxvfb=true
100 [XORG].DESCRIPTION= Build as X server (don't change setting!)
101 [XORG].BUILDRUN_DEPENDS_ON= libdrm:single:standard
102 libepoxy:single:standard
103 mesa:drivers:standard
104 [XORG].BUILD_DEPENDS_ON= xorg-sgml-doctools:single:standard
105 xmlto:single:standard
106 [XORG].CONFIGURE_ARGS_OFF= -Ddocs=false
109 [XORG].CONFIGURE_ARGS_ON= -Ddocs=true
113 [XORG].XORG_COMPONENTS_ON= pciaccess
116 [SUID].DESCRIPTION= Install the Xorg server with setuid bit set
118 post-install-XORG-OFF:
119 ${RM} -r ${STAGEDIR}${PREFIX}/lib/xorg
120 ${RM} ${STAGEDIR}${PREFIX}/share/man/man1/Xserver.1
122 post-configure-DEVD-ON:
123 ${REINPLACE_CMD} -e 's|^/\* #undef CONFIG_UDEV \*/|#define CONFIG_DEVD 1|' \
124 ${WRKSRC}/include/dix-config.h
126 post-install-XORG-ON:
127 ${RM} -r ${STAGEDIR}${STD_DOCDIR}
129 [FILE:71:descriptions/desc.single.standard]
130 This package contains the X.Org X server and some associated programs.
133 [FILE:60:descriptions/desc.single.virtual]
134 This package contains Xvfb, a virtual framebuffer X server.
137 [FILE:173:descriptions/desc.single.xephyr]
138 Xephyr is a kdrive server that outputs to a window on a pre-existing
139 'host' X display. Think Xnest but with support for modern extensions
140 like composite, damage and randr.
143 [FILE:78:descriptions/desc.single.nest]
144 This package contains Xnest, a nesting X Server that displays on an X
149 1eb86ed674d042b6c8b1f9135e59395cbbca35ed551b122f73a7d8bb3bb22484 4977496 xorg-server-21.1.6.tar.xz
152 [FILE:2542:manifests/plist.single.standard]
153 %%ONLY-SUNOS%%include/xorg/solaris-amd64.il
155 %%SUID-ON%%@(,,4555) bin/Xorg
159 etc/X11/xorg.conf.d/10-quirks.conf
276 xf86-input-inputtest-protocol.h
318 lib/pkgconfig/xorg-server.pc
319 lib/xorg/protocol.txt
329 lib/xorg/modules/drivers/modesetting_drv.so
330 lib/xorg/modules/extensions/libglx.so
331 lib/xorg/modules/input/inputtest_drv.so
332 share/aclocal/xorg-server.m4
347 [FILE:34:manifests/plist.single.virtual]
349 share/man/man1/Xvfb.1.gz
352 [FILE:38:manifests/plist.single.xephyr]
354 share/man/man1/Xephyr.1.gz
357 [FILE:36:manifests/plist.single.nest]
359 share/man/man1/Xnest.1.gz
362 [FILE:293:patches/patch-config_config-backends.h]
363 --- config/config-backends.h.orig 2022-12-19 10:53:03 UTC
364 +++ config/config-backends.h
365 @@ -44,3 +44,8 @@ void config_hal_fini(void);
366 int config_wscons_init(void);
367 void config_wscons_fini(void);
371 +int config_devd_init(void);
372 +void config_devd_fini(void);
376 [FILE:537:patches/patch-config_config.c]
377 --- config/config.c.orig 2022-12-19 10:53:03 UTC
379 @@ -55,6 +55,9 @@ config_init(void)
380 #elif defined(CONFIG_WSCONS)
381 if (!config_wscons_init())
382 ErrorF("[config] failed to initialise wscons\n");
383 +#elif defined(CONFIG_DEVD)
384 + if (!config_devd_init())
385 + ErrorF("[config] failed to initialise devd\n");
389 @@ -67,6 +70,8 @@ config_fini(void)
391 #elif defined(CONFIG_WSCONS)
392 config_wscons_fini();
393 +#elif defined(CONFIG_DEVD)
394 + config_devd_fini();
400 [FILE:12171:patches/patch-config_devd.c]
401 --- /dev/null 2022-12-30 20:49:52 UTC
405 + * Copyright (c) 2012 Baptiste Daroussin
406 + * Copyright (c) 2013, 2014 Alex Kozlov
407 + * Copyright (c) 2014 Robert Millan
408 + * Copyright (c) 2014 Jean-Sebastien Pedron
410 + * Permission is hereby granted, free of charge, to any person obtaining a
411 + * copy of this software and associated documentation files (the "Software"),
412 + * to deal in the Software without restriction, including without limitation
413 + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
414 + * and/or sell copies of the Software, and to permit persons to whom the
415 + * Software is furnished to do so, subject to the following conditions:
417 + * The above copyright notice and this permission notice (including the next
418 + * paragraph) shall be included in all copies or substantial portions of the
421 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
422 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
423 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
424 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
425 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
426 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
427 + * DEALINGS IN THE SOFTWARE.
429 + * Author: Baptiste Daroussin <bapt@FreeBSD.org>
432 +#ifdef HAVE_DIX_CONFIG_H
433 +#include <dix-config.h>
436 +#include <sys/types.h>
437 +#include <sys/kbio.h>
438 +#include <sys/socket.h>
439 +#include <sys/stat.h>
440 +#include <sys/sysctl.h>
448 +#include <stdbool.h>
452 +#include "inputstr.h"
453 +#include "hotplug.h"
454 +#include "config-backends.h"
457 +#define DEVD_SOCK_PATH "/var/run/devd.pipe"
459 +#define DEVD_EVENT_ADD '+'
460 +#define DEVD_EVENT_REMOVE '-'
462 +#define RECONNECT_DELAY 5 * 1000
464 +static int sock_devd;
465 +static bool is_console_kbd = false;
466 +static bool is_kbdmux = false;
467 +static OsTimerPtr rtimer = NULL;
470 + const char *driver;
472 + const char *xdriver;
475 +static struct hw_type hw_types[] = {
476 + { "ukbd", ATTR_KEYBOARD, "kbd" },
477 + { "atkbd", ATTR_KEYBOARD, "kbd" },
478 + { "kbdmux", ATTR_KEYBOARD, "kbd" },
479 + { "sysmouse", ATTR_POINTER, "mouse" },
480 + { "ums", ATTR_POINTER, "mouse" },
481 + { "psm", ATTR_POINTER, "mouse" },
482 + { "vboxguest", ATTR_POINTER, "vboxmouse" },
483 + { "joy", ATTR_JOYSTICK, NULL },
484 + { "atp", ATTR_TOUCHPAD, NULL },
485 + { "uep", ATTR_TOUCHSCREEN, NULL },
486 + { NULL, -1, NULL },
490 +sysctl_exists(const struct hw_type *device, int unit,
491 + char *devname, size_t devname_len)
493 + char sysctlname[PATH_MAX];
497 + if (device == NULL || device->driver == NULL)
500 + /* Check if a sysctl exists. */
501 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%i.%%desc",
502 + device->driver, unit);
503 + ret = sysctlbyname(sysctlname, NULL, &len, NULL, 0);
505 + if (ret == 0 && len > 0) {
506 + snprintf(devname, devname_len, "%s%i", device->driver, unit);
514 +devpath_exists(const struct hw_type *device,
515 + char *devname, size_t devname_len)
521 + if (device == NULL || device->driver == NULL)
524 + /* Check if /dev/$driver exists. */
525 + asprintf(&devpath, "/dev/%s", device->driver);
526 + if (devpath == NULL)
529 + ret = stat(devpath, &st);
533 + strncpy(devname, device->driver, devname_len);
541 +sysctl_get_str(const char *sysctlname)
546 + if (sysctlname == NULL)
549 + if (sysctlbyname(sysctlname, NULL, &len, NULL, 0) == 0) {
550 + dest = malloc(len + 1);
552 + if (sysctlbyname(sysctlname, dest, &len, NULL, 0) == 0)
565 +device_added(const char *devname)
567 + char path[PATH_MAX];
568 + char sysctlname[PATH_MAX];
570 + char *product = NULL;
571 + char *config_info = NULL;
573 + InputOption *options = NULL;
574 + InputAttributes attrs = { };
575 + DeviceIntPtr dev = NULL;
579 + for (i = 0; hw_types[i].driver != NULL; i++) {
582 + len = strlen(hw_types[i].driver);
583 + if (strcmp(devname, hw_types[i].driver) == 0 ||
584 + (strncmp(devname, hw_types[i].driver, len) == 0 &&
585 + isnumber(*(devname + len)))) {
586 + attrs.flags |= hw_types[i].flag;
591 + if (hw_types[i].driver == NULL || hw_types[i].xdriver == NULL) {
592 + LogMessage(X_INFO, "config/devd: ignoring device %s\n",
597 + /* Skip keyboard devices if kbdmux is enabled */
598 + if (is_kbdmux && is_console_kbd && hw_types[i].flag & ATTR_KEYBOARD) {
599 + LogMessage(X_INFO, "config/devd: kbdmux is enabled, ignoring device %s\n",
604 + snprintf(path, sizeof(path), "/dev/%s", devname);
606 + options = input_option_new(NULL, "_source", "server/devd");
610 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%s.%%desc",
611 + hw_types[i].driver, devname + strlen(hw_types[i].driver));
612 + vendor = sysctl_get_str(sysctlname);
613 + if (vendor == NULL) {
614 + options = input_option_new(options, "name", devname);
617 + if ((walk = strchr(vendor, ' ')) != NULL) {
621 + if ((walk = strchr(product, ',')) != NULL)
625 + attrs.vendor = strdup(vendor);
627 + attrs.product = strdup(product);
628 + options = input_option_new(options, "name", product);
631 + options = input_option_new(options, "name", "(unnamed)");
636 + /* XXX implement usb_id */
637 + attrs.usb_id = NULL;
638 + attrs.device = strdup(path);
639 + options = input_option_new(options, "driver", hw_types[i].xdriver);
641 + fd = open(path, O_RDONLY);
644 + options = input_option_new(options, "device", path);
647 + if (attrs.flags & ~ATTR_KEYBOARD) {
648 + LogMessage(X_INFO, "config/devd: device %s already opened\n",
652 + * Fail if cannot open device, it breaks AllowMouseOpenFail,
653 + * but it should not matter when config/devd enabled
658 + if (is_console_kbd) {
660 + * There can be only one keyboard attached to console and
661 + * it is already added.
663 + LogMessage(X_WARNING, "config/devd: console keyboard is "
664 + "already added, ignoring %s (%s)\n",
665 + attrs.product, path);
670 + * Don't pass "device" option if the keyboard is already
671 + * attached to the console (ie. open() fails).
672 + * This would activate a special logic in xf86-input-keyboard.
673 + * Prevent any other attached to console keyboards being
674 + * processed. There can be only one such device.
676 + is_console_kbd = true;
679 + if (asprintf(&config_info, "devd:%s", devname) == -1) {
680 + config_info = NULL;
684 + if (device_is_duplicate(config_info)) {
685 + LogMessage(X_WARNING, "config/devd: device %s (%s) already added. "
686 + "ignoring\n", attrs.product, path);
690 + options = input_option_new(options, "config_info", config_info);
691 + LogMessage(X_INFO, "config/devd: adding input device %s (%s)\n",
692 + attrs.product, path);
694 + NewInputDeviceRequest(options, &attrs, &dev);
698 + input_option_free_list(&options);
699 + free(attrs.usb_id);
700 + free(attrs.product);
701 + free(attrs.device);
702 + free(attrs.vendor);
706 +device_removed(char *devname)
710 + if (asprintf(&config_info, "devd:%s", devname) == -1)
713 + remove_devices("devd", config_info);
718 +static bool is_kbdmux_enabled(void)
720 + /* Xorg uses /dev/ttyv0 as a console device */
721 + /* const char device[]="/dev/console"; */
722 + const char device[]="/dev/ttyv0";
723 + keyboard_info_t info;
726 + fd = open(device, O_RDONLY);
731 + if (ioctl(fd, KDGKBINFO, &info) == -1) {
738 + if (!strncmp(info.kb_name, "kbdmux", 6))
745 +disconnect_devd(int sock)
748 + RemoveGeneralSocket(sock);
756 + struct sockaddr_un devd;
759 + sock = socket(AF_UNIX, SOCK_STREAM, 0);
761 + LogMessage(X_ERROR, "config/devd: fail opening stream socket\n");
765 + devd.sun_family = AF_UNIX;
766 + strlcpy(devd.sun_path, DEVD_SOCK_PATH, sizeof(devd.sun_path));
768 + if (connect(sock, (struct sockaddr *) &devd, sizeof(devd)) < 0) {
770 + LogMessage(X_ERROR, "config/devd: fail to connect to devd\n");
774 + AddGeneralSocket(sock);
780 +reconnect_handler(OsTimerPtr timer, CARD32 time, void *arg)
784 + if ((newsock = connect_devd()) > 0) {
785 + sock_devd = newsock;
788 + LogMessage(X_INFO, "config/devd: reopening devd socket\n");
792 + /* Try again after RECONNECT_DELAY */
793 + return RECONNECT_DELAY;
797 +socket_getline(int fd, char **out)
799 + char *buf, *newbuf;
800 + ssize_t ret, cap, sz = 0;
804 + buf = malloc(cap * sizeof(char));
809 + ret = read(sock_devd, &c, 1);
811 + if (errno == EINTR)
815 + /* EOF - devd socket is lost */
816 + } else if (ret == 0) {
817 + disconnect_devd(sock_devd);
818 + rtimer = TimerSet(NULL, 0, 1, reconnect_handler, NULL);
819 + LogMessage(X_WARNING, "config/devd: devd socket is lost\n");
826 + if (sz + 1 >= cap) {
828 + newbuf = realloc(buf, cap * sizeof(char));
845 + /* Number of bytes in the line, not counting the line break */
850 +wakeup_handler(void *data, int err, void *read_mask)
858 + if (FD_ISSET(sock_devd, (fd_set *) read_mask)) {
859 + if (socket_getline(sock_devd, &line) < 0)
862 + walk = strchr(line + 1, ' ');
867 + case DEVD_EVENT_ADD:
868 + device_added(line + 1);
870 + case DEVD_EVENT_REMOVE:
871 + device_removed(line + 1);
881 +block_handler(void *data, struct timeval **tv, void *read_mask)
886 +config_devd_init(void)
888 + char devicename[1024];
891 + LogMessage(X_INFO, "config/devd: probing input devices...\n");
894 + * Add fake keyboard and give up on keyboards management
895 + * if kbdmux is enabled
897 + if ((is_kbdmux = is_kbdmux_enabled()) == true)
898 + device_added("kbdmux");
900 + for (i = 0; hw_types[i].driver != NULL; i++) {
901 + /* First scan the sysctl to determine the hardware */
902 + for (j = 0; j < 16; j++) {
903 + if (sysctl_exists(&hw_types[i], j,
904 + devicename, sizeof(devicename)) != 0)
905 + device_added(devicename);
908 + if (devpath_exists(&hw_types[i], devicename, sizeof(devicename)) != 0)
909 + device_added(devicename);
912 + if ((sock_devd = connect_devd()) < 0)
915 + RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
921 +config_devd_fini(void)
923 + LogMessage(X_INFO, "config/devd: terminating backend...\n");
930 + disconnect_devd(sock_devd);
932 + RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
934 + is_console_kbd = false;
938 [FILE:391:patches/patch-config_meson.build]
939 --- config/meson.build.orig 2022-12-19 10:53:03 UTC
940 +++ config/meson.build
941 @@ -25,7 +25,7 @@ endif
944 install_data('10-quirks.conf',
945 - install_dir: join_paths(get_option('datadir'), 'X11/xorg.conf.d'))
946 + install_dir: join_paths(get_option('prefix'), 'etc/X11/xorg.conf.d'))
949 libxserver_config = static_library('libxserver_config',
952 [FILE:256:patches/patch-hw_kdrive_ephyr_hostx.c]
953 --- hw/kdrive/ephyr/hostx.c.orig 2022-12-19 10:53:03 UTC
954 +++ hw/kdrive/ephyr/hostx.c
956 #include <string.h> /* for memset */
965 [FILE:765:patches/patch-hw_xfree86_common_xf86AutoConfig.c]
966 --- hw/xfree86/common/xf86AutoConfig.c.orig 2022-12-19 10:53:03 UTC
967 +++ hw/xfree86/common/xf86AutoConfig.c
968 @@ -294,7 +294,7 @@ listPossibleVideoDrivers(XF86MatchedDriv
969 xf86PciMatchDriver(md);
972 -#if defined(__linux__)
973 +#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
974 xf86AddMatchedDriver(md, "modesetting");
977 @@ -302,8 +302,10 @@ listPossibleVideoDrivers(XF86MatchedDriv
978 /* Fallback to platform default frame buffer driver */
979 #if !defined(__linux__) && defined(__sparc__)
980 xf86AddMatchedDriver(md, "wsfb");
982 +#elif defined(__linux__)
983 xf86AddMatchedDriver(md, "fbdev");
984 +#elif defined(__FreeBSD__)
985 + xf86AddMatchedDriver(md, "scfb");
991 [FILE:700:patches/patch-hw_xfree86_common_xf86Config.c]
992 --- hw/xfree86/common/xf86Config.c.orig 2022-12-19 10:53:03 UTC
993 +++ hw/xfree86/common/xf86Config.c
994 @@ -1279,13 +1279,16 @@ checkCoreInputDevices(serverLayoutPtr se
997 if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) {
998 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
999 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
1000 + defined(CONFIG_DEVD)
1001 const char *config_backend;
1003 #if defined(CONFIG_HAL)
1004 config_backend = "HAL";
1005 #elif defined(CONFIG_UDEV)
1006 config_backend = "udev";
1007 +#elif defined(CONFIG_DEVD)
1008 + config_backend = "devd";
1010 config_backend = "wscons";
1014 [FILE:510:patches/patch-hw_xfree86_common_xf86Globals.c]
1015 --- hw/xfree86/common/xf86Globals.c.orig 2022-12-19 10:53:03 UTC
1016 +++ hw/xfree86/common/xf86Globals.c
1017 @@ -118,7 +118,7 @@ xf86InfoRec xf86Info = {
1018 .miscModInDevEnabled = TRUE,
1019 .miscModInDevAllowNonLocal = FALSE,
1021 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1022 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || defined(CONFIG_DEVD)
1023 .forceInputDevices = FALSE,
1024 .autoAddDevices = TRUE,
1025 .autoEnableDevices = TRUE,
1028 [FILE:483:patches/patch-hw_xfree86_common_xf86Xinput.c]
1029 --- hw/xfree86/common/xf86Xinput.c.orig 2022-12-19 10:53:03 UTC
1030 +++ hw/xfree86/common/xf86Xinput.c
1031 @@ -1065,6 +1065,7 @@ NewInputDeviceRequest(InputOption *optio
1032 if (strcmp(key, "_source") == 0 &&
1033 (strcmp(value, "server/hal") == 0 ||
1034 strcmp(value, "server/udev") == 0 ||
1035 + strcmp(value, "server/devd") == 0 ||
1036 strcmp(value, "server/wscons") == 0)) {
1038 if (!xf86Info.autoAddDevices) {
1041 [FILE:450:patches/patch-hw_xfree86_os-support_bsd_bsd__init.c]
1042 --- hw/xfree86/os-support/bsd/bsd_init.c.orig 2022-12-19 10:53:03 UTC
1043 +++ hw/xfree86/os-support/bsd/bsd_init.c
1044 @@ -230,6 +230,9 @@ xf86OpenConsole()
1045 * Add cases for other *BSD that behave the same.
1047 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
1048 +#if defined(__sparc64__)
1049 + pci_system_init_dev_mem(fd);
1052 i = atof(uts.release) * 100;
1056 [FILE:519:patches/patch-hw_xfree86_os-support_bsd_i386__video.c]
1057 --- hw/xfree86/os-support/bsd/i386_video.c.orig 2022-12-19 10:53:03 UTC
1058 +++ hw/xfree86/os-support/bsd/i386_video.c
1060 #include "xf86Priv.h"
1063 +#include <sys/types.h>
1064 #include <sys/mman.h>
1066 #include "xf86_OSlib.h"
1069 #define MAP_FLAGS (MAP_FILE | MAP_SHARED)
1071 +#if defined(__NetBSD__) && defined(USE_AMD64_IOPL)
1072 +#define amd64_iopl x86_64_iopl
1076 #define SYSCTL_MSG "\tCheck that you have set 'machdep.allowaperture=1'\n"\
1079 [FILE:380:patches/patch-hw_xfree86_os-support_bsd_ppc__video.c]
1080 --- hw/xfree86/os-support/bsd/ppc_video.c.orig 2022-12-19 10:53:03 UTC
1081 +++ hw/xfree86/os-support/bsd/ppc_video.c
1082 @@ -79,7 +79,11 @@ xf86DisableIO()
1085 if (ioBase != MAP_FAILED) {
1086 +#if defined(__FreeBSD__)
1087 + munmap(__DEVOLATILE(unsigned char *, ioBase), 0x10000);
1089 munmap(__UNVOLATILE(ioBase), 0x10000);
1091 ioBase = MAP_FAILED;
1096 [FILE:714:patches/patch-hw_xfree86_os-support_solaris_sun__init.c]
1097 --- hw/xfree86/os-support/solaris/sun_init.c.orig 2022-12-19 10:53:03 UTC
1098 +++ hw/xfree86/os-support/solaris/sun_init.c
1099 @@ -54,6 +54,22 @@ static int xf86StartVT = -1;
1100 static int vtEnabled = 0;
1104 +#define VTIOC ('V'<<8)
1105 +#define VT_OPENQRY (VTIOC|1)
1106 +#define VT_SETMODE (VTIOC|2)
1107 +#define VT_GETMODE (VTIOC|3)
1108 +#define VT_ACTIVATE (VTIOC|5)
1109 +#define VT_WAITACTIVE (VTIOC|6)
1110 +#define VT_GETSTATE (VTIOC|100)
1111 +#define VT_ENABLED (VTIOC|101)
1112 +#define VT_SETDISPINFO (VTIOC|103)
1113 +#define VT_GET_CONSUSER (VTIOC|108)
1114 +#define VT_SET_CONSUSER (VTIOC|109)
1116 +enum { VT_AUTO = 0, VT_PROCESS };
1119 /* Device to open as xf86Info.consoleFd */
1120 static char consoleDev[PATH_MAX] = "/dev/fb";
1124 [FILE:459:patches/patch-include_meson.build]
1125 --- include/meson.build.orig 2022-12-19 10:53:03 UTC
1126 +++ include/meson.build
1127 @@ -384,7 +384,7 @@ if host_machine.system() == 'freebsd' or
1129 elif host_machine.system() == 'netbsd'
1130 if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
1131 - xorg_data.set('USE_I386_IOPL', '1')
1132 + xorg_data.set('USE_AMD64_IOPL', '1')
1134 elif host_machine.system() == 'openbsd'
1135 if host_machine.cpu_family() == 'x86'
1138 [FILE:193:patches/patch-os_backtrace.c]
1139 --- os/backtrace.c.orig 2022-12-19 10:53:03 UTC
1145 +#include <unistd.h>
1147 #ifdef HAVE_LIBUNWIND
1151 [FILE:1021:patches/patch-test_simple-xinit.c]
1152 --- test/simple-xinit.c.orig 2022-12-19 10:53:03 UTC
1153 +++ test/simple-xinit.c
1155 #include <sys/wait.h>
1159 +#include <sys/varargs.h>
1161 +vasprintf(char **strp, const char *fmt, va_list args)
1163 + va_list args_copy;
1164 + int status, needed;
1166 + va_copy(args_copy, args);
1167 + needed = vsnprintf(NULL, 0, fmt, args_copy);
1168 + va_end(args_copy);
1173 + *strp = malloc(needed + 1);
1174 + if (*strp == NULL)
1176 + status = vsnprintf(*strp, needed + 1, fmt, args);
1187 +asprintf(char **strp, const char *fmt, ...)
1192 + va_start(args, fmt);
1193 + status = vasprintf(strp, fmt, args);
1200 kill_server(int server_pid)