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 BUILDRUN_DEPENDS= xorg-xcvt:single:standard
37 RUN_DEPENDS= xorg-xkeyboard-config:primary:standard
38 xorg-xkbcomp:single:standard
40 USES= cpe perl:build ssl solaris-funcs meson
41 XORG_COMPONENTS= xorgproto xtransproto pixman xshmfence xau xdmcp
45 LICENSE_FILE= MIT:{{WRKSRC}}/COPYING
49 FPC_EQUIVALENT= x11-servers/xorg-server
50 MESON_ARGS= -Dxkb_dir="{{LOCALBASE}}/share/X11/xkb"
51 -Ddefault_font_path="{{LOCALBASE}}/share/fonts"
58 SOL_FUNCTIONS= strnlen:xkb/XKBGAlloc.c
60 VAR_OPSYS[sunos]= CFLAGS=-DO_CLOEXEC=0
61 VAR_OPSYS[netbsd]= CPPFLAGS=-D_OPENBSD_SOURCE
62 CONFIGURE_ARGS=-Dsecure-rpc=false
64 [DEVD].DESCRIPTION= Use devd for autoconfiguration of input devices
66 [NEST].DESCRIPTION= Build as nesting X server
67 [NEST].BUILDRUN_DEPENDS_ON= libglvnd:single:standard
68 [NEST].BUILD_DEPENDS_ON= libepoxy:single:standard
70 libglvnd:single:standard
71 [NEST].CONFIGURE_ARGS_OFF= -Dxnest=false
72 [NEST].CONFIGURE_ARGS_ON= -Dxnest=true
73 [NEST].XORG_COMPONENTS_ON= x11
76 [XEPHYR].DESCRIPTION= Build as kdrive-base X server
77 [XEPHYR].BUILDRUN_DEPENDS_ON= libdrm:single:standard
78 libepoxy:single:standard
79 libglvnd:single:standard
80 [XEPHYR].BUILD_DEPENDS_ON= mesa:drivers:standard
81 [XEPHYR].CONFIGURE_ARGS_OFF= -Dxephyr=false
82 [XEPHYR].CONFIGURE_ARGS_ON= -Dxephyr=true
83 [XEPHYR].XORG_COMPONENTS_ON= x11
91 [VIRTUAL].DESCRIPTION= Build as virtual framebuffer server
92 [VIRTUAL].BUILDRUN_DEPENDS_ON= libglvnd:single:standard
93 [VIRTUAL].BUILD_DEPENDS_ON= libepoxy:single:standard
95 libglvnd:single:standard
96 [VIRTUAL].CONFIGURE_ARGS_OFF= -Dxvfb=false
97 [VIRTUAL].CONFIGURE_ARGS_ON= -Dxvfb=true
99 [XORG].DESCRIPTION= Build as X server (don't change setting!)
100 [XORG].BUILDRUN_DEPENDS_ON= libdrm:single:standard
101 libepoxy:single:standard
102 mesa:drivers:standard
103 [XORG].BUILD_DEPENDS_ON= xorg-sgml-doctools:single:standard
104 xmlto:single:standard
105 [XORG].CONFIGURE_ARGS_OFF= -Ddocs=false
108 [XORG].CONFIGURE_ARGS_ON= -Ddocs=true
112 [XORG].XORG_COMPONENTS_ON= pciaccess
115 [SUID].DESCRIPTION= Install the Xorg server with setuid bit set
117 post-install-XORG-OFF:
118 ${RM} -r ${STAGEDIR}${PREFIX}/lib/xorg
119 ${RM} ${STAGEDIR}${PREFIX}/share/man/man1/Xserver.1
121 post-configure-DEVD-ON:
122 ${REINPLACE_CMD} -e 's|^/\* #undef CONFIG_UDEV \*/|#define CONFIG_DEVD 1|' \
123 ${WRKSRC}/include/dix-config.h
125 post-install-XORG-ON:
126 ${RM} -r ${STAGEDIR}${STD_DOCDIR}
128 [FILE:71:descriptions/desc.single.standard]
129 This package contains the X.Org X server and some associated programs.
132 [FILE:60:descriptions/desc.single.virtual]
133 This package contains Xvfb, a virtual framebuffer X server.
136 [FILE:173:descriptions/desc.single.xephyr]
137 Xephyr is a kdrive server that outputs to a window on a pre-existing
138 'host' X display. Think Xnest but with support for modern extensions
139 like composite, damage and randr.
142 [FILE:78:descriptions/desc.single.nest]
143 This package contains Xnest, a nesting X Server that displays on an X
148 1eb86ed674d042b6c8b1f9135e59395cbbca35ed551b122f73a7d8bb3bb22484 4977496 xorg-server-21.1.6.tar.xz
151 [FILE:2542:manifests/plist.single.standard]
152 %%ONLY-SUNOS%%include/xorg/solaris-amd64.il
154 %%SUID-ON%%@(,,4555) bin/Xorg
158 etc/X11/xorg.conf.d/10-quirks.conf
275 xf86-input-inputtest-protocol.h
317 lib/pkgconfig/xorg-server.pc
318 lib/xorg/protocol.txt
328 lib/xorg/modules/drivers/modesetting_drv.so
329 lib/xorg/modules/extensions/libglx.so
330 lib/xorg/modules/input/inputtest_drv.so
331 share/aclocal/xorg-server.m4
346 [FILE:34:manifests/plist.single.virtual]
348 share/man/man1/Xvfb.1.gz
351 [FILE:38:manifests/plist.single.xephyr]
353 share/man/man1/Xephyr.1.gz
356 [FILE:36:manifests/plist.single.nest]
358 share/man/man1/Xnest.1.gz
361 [FILE:293:patches/patch-config_config-backends.h]
362 --- config/config-backends.h.orig 2022-12-19 10:53:03 UTC
363 +++ config/config-backends.h
364 @@ -44,3 +44,8 @@ void config_hal_fini(void);
365 int config_wscons_init(void);
366 void config_wscons_fini(void);
370 +int config_devd_init(void);
371 +void config_devd_fini(void);
375 [FILE:537:patches/patch-config_config.c]
376 --- config/config.c.orig 2022-12-19 10:53:03 UTC
378 @@ -55,6 +55,9 @@ config_init(void)
379 #elif defined(CONFIG_WSCONS)
380 if (!config_wscons_init())
381 ErrorF("[config] failed to initialise wscons\n");
382 +#elif defined(CONFIG_DEVD)
383 + if (!config_devd_init())
384 + ErrorF("[config] failed to initialise devd\n");
388 @@ -67,6 +70,8 @@ config_fini(void)
390 #elif defined(CONFIG_WSCONS)
391 config_wscons_fini();
392 +#elif defined(CONFIG_DEVD)
393 + config_devd_fini();
399 [FILE:12171:patches/patch-config_devd.c]
400 --- /dev/null 2022-12-30 20:49:52 UTC
404 + * Copyright (c) 2012 Baptiste Daroussin
405 + * Copyright (c) 2013, 2014 Alex Kozlov
406 + * Copyright (c) 2014 Robert Millan
407 + * Copyright (c) 2014 Jean-Sebastien Pedron
409 + * Permission is hereby granted, free of charge, to any person obtaining a
410 + * copy of this software and associated documentation files (the "Software"),
411 + * to deal in the Software without restriction, including without limitation
412 + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
413 + * and/or sell copies of the Software, and to permit persons to whom the
414 + * Software is furnished to do so, subject to the following conditions:
416 + * The above copyright notice and this permission notice (including the next
417 + * paragraph) shall be included in all copies or substantial portions of the
420 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
421 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
422 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
423 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
424 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
425 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
426 + * DEALINGS IN THE SOFTWARE.
428 + * Author: Baptiste Daroussin <bapt@FreeBSD.org>
431 +#ifdef HAVE_DIX_CONFIG_H
432 +#include <dix-config.h>
435 +#include <sys/types.h>
436 +#include <sys/kbio.h>
437 +#include <sys/socket.h>
438 +#include <sys/stat.h>
439 +#include <sys/sysctl.h>
447 +#include <stdbool.h>
451 +#include "inputstr.h"
452 +#include "hotplug.h"
453 +#include "config-backends.h"
456 +#define DEVD_SOCK_PATH "/var/run/devd.pipe"
458 +#define DEVD_EVENT_ADD '+'
459 +#define DEVD_EVENT_REMOVE '-'
461 +#define RECONNECT_DELAY 5 * 1000
463 +static int sock_devd;
464 +static bool is_console_kbd = false;
465 +static bool is_kbdmux = false;
466 +static OsTimerPtr rtimer = NULL;
469 + const char *driver;
471 + const char *xdriver;
474 +static struct hw_type hw_types[] = {
475 + { "ukbd", ATTR_KEYBOARD, "kbd" },
476 + { "atkbd", ATTR_KEYBOARD, "kbd" },
477 + { "kbdmux", ATTR_KEYBOARD, "kbd" },
478 + { "sysmouse", ATTR_POINTER, "mouse" },
479 + { "ums", ATTR_POINTER, "mouse" },
480 + { "psm", ATTR_POINTER, "mouse" },
481 + { "vboxguest", ATTR_POINTER, "vboxmouse" },
482 + { "joy", ATTR_JOYSTICK, NULL },
483 + { "atp", ATTR_TOUCHPAD, NULL },
484 + { "uep", ATTR_TOUCHSCREEN, NULL },
485 + { NULL, -1, NULL },
489 +sysctl_exists(const struct hw_type *device, int unit,
490 + char *devname, size_t devname_len)
492 + char sysctlname[PATH_MAX];
496 + if (device == NULL || device->driver == NULL)
499 + /* Check if a sysctl exists. */
500 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%i.%%desc",
501 + device->driver, unit);
502 + ret = sysctlbyname(sysctlname, NULL, &len, NULL, 0);
504 + if (ret == 0 && len > 0) {
505 + snprintf(devname, devname_len, "%s%i", device->driver, unit);
513 +devpath_exists(const struct hw_type *device,
514 + char *devname, size_t devname_len)
520 + if (device == NULL || device->driver == NULL)
523 + /* Check if /dev/$driver exists. */
524 + asprintf(&devpath, "/dev/%s", device->driver);
525 + if (devpath == NULL)
528 + ret = stat(devpath, &st);
532 + strncpy(devname, device->driver, devname_len);
540 +sysctl_get_str(const char *sysctlname)
545 + if (sysctlname == NULL)
548 + if (sysctlbyname(sysctlname, NULL, &len, NULL, 0) == 0) {
549 + dest = malloc(len + 1);
551 + if (sysctlbyname(sysctlname, dest, &len, NULL, 0) == 0)
564 +device_added(const char *devname)
566 + char path[PATH_MAX];
567 + char sysctlname[PATH_MAX];
569 + char *product = NULL;
570 + char *config_info = NULL;
572 + InputOption *options = NULL;
573 + InputAttributes attrs = { };
574 + DeviceIntPtr dev = NULL;
578 + for (i = 0; hw_types[i].driver != NULL; i++) {
581 + len = strlen(hw_types[i].driver);
582 + if (strcmp(devname, hw_types[i].driver) == 0 ||
583 + (strncmp(devname, hw_types[i].driver, len) == 0 &&
584 + isnumber(*(devname + len)))) {
585 + attrs.flags |= hw_types[i].flag;
590 + if (hw_types[i].driver == NULL || hw_types[i].xdriver == NULL) {
591 + LogMessage(X_INFO, "config/devd: ignoring device %s\n",
596 + /* Skip keyboard devices if kbdmux is enabled */
597 + if (is_kbdmux && is_console_kbd && hw_types[i].flag & ATTR_KEYBOARD) {
598 + LogMessage(X_INFO, "config/devd: kbdmux is enabled, ignoring device %s\n",
603 + snprintf(path, sizeof(path), "/dev/%s", devname);
605 + options = input_option_new(NULL, "_source", "server/devd");
609 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%s.%%desc",
610 + hw_types[i].driver, devname + strlen(hw_types[i].driver));
611 + vendor = sysctl_get_str(sysctlname);
612 + if (vendor == NULL) {
613 + options = input_option_new(options, "name", devname);
616 + if ((walk = strchr(vendor, ' ')) != NULL) {
620 + if ((walk = strchr(product, ',')) != NULL)
624 + attrs.vendor = strdup(vendor);
626 + attrs.product = strdup(product);
627 + options = input_option_new(options, "name", product);
630 + options = input_option_new(options, "name", "(unnamed)");
635 + /* XXX implement usb_id */
636 + attrs.usb_id = NULL;
637 + attrs.device = strdup(path);
638 + options = input_option_new(options, "driver", hw_types[i].xdriver);
640 + fd = open(path, O_RDONLY);
643 + options = input_option_new(options, "device", path);
646 + if (attrs.flags & ~ATTR_KEYBOARD) {
647 + LogMessage(X_INFO, "config/devd: device %s already opened\n",
651 + * Fail if cannot open device, it breaks AllowMouseOpenFail,
652 + * but it should not matter when config/devd enabled
657 + if (is_console_kbd) {
659 + * There can be only one keyboard attached to console and
660 + * it is already added.
662 + LogMessage(X_WARNING, "config/devd: console keyboard is "
663 + "already added, ignoring %s (%s)\n",
664 + attrs.product, path);
669 + * Don't pass "device" option if the keyboard is already
670 + * attached to the console (ie. open() fails).
671 + * This would activate a special logic in xf86-input-keyboard.
672 + * Prevent any other attached to console keyboards being
673 + * processed. There can be only one such device.
675 + is_console_kbd = true;
678 + if (asprintf(&config_info, "devd:%s", devname) == -1) {
679 + config_info = NULL;
683 + if (device_is_duplicate(config_info)) {
684 + LogMessage(X_WARNING, "config/devd: device %s (%s) already added. "
685 + "ignoring\n", attrs.product, path);
689 + options = input_option_new(options, "config_info", config_info);
690 + LogMessage(X_INFO, "config/devd: adding input device %s (%s)\n",
691 + attrs.product, path);
693 + NewInputDeviceRequest(options, &attrs, &dev);
697 + input_option_free_list(&options);
698 + free(attrs.usb_id);
699 + free(attrs.product);
700 + free(attrs.device);
701 + free(attrs.vendor);
705 +device_removed(char *devname)
709 + if (asprintf(&config_info, "devd:%s", devname) == -1)
712 + remove_devices("devd", config_info);
717 +static bool is_kbdmux_enabled(void)
719 + /* Xorg uses /dev/ttyv0 as a console device */
720 + /* const char device[]="/dev/console"; */
721 + const char device[]="/dev/ttyv0";
722 + keyboard_info_t info;
725 + fd = open(device, O_RDONLY);
730 + if (ioctl(fd, KDGKBINFO, &info) == -1) {
737 + if (!strncmp(info.kb_name, "kbdmux", 6))
744 +disconnect_devd(int sock)
747 + RemoveGeneralSocket(sock);
755 + struct sockaddr_un devd;
758 + sock = socket(AF_UNIX, SOCK_STREAM, 0);
760 + LogMessage(X_ERROR, "config/devd: fail opening stream socket\n");
764 + devd.sun_family = AF_UNIX;
765 + strlcpy(devd.sun_path, DEVD_SOCK_PATH, sizeof(devd.sun_path));
767 + if (connect(sock, (struct sockaddr *) &devd, sizeof(devd)) < 0) {
769 + LogMessage(X_ERROR, "config/devd: fail to connect to devd\n");
773 + AddGeneralSocket(sock);
779 +reconnect_handler(OsTimerPtr timer, CARD32 time, void *arg)
783 + if ((newsock = connect_devd()) > 0) {
784 + sock_devd = newsock;
787 + LogMessage(X_INFO, "config/devd: reopening devd socket\n");
791 + /* Try again after RECONNECT_DELAY */
792 + return RECONNECT_DELAY;
796 +socket_getline(int fd, char **out)
798 + char *buf, *newbuf;
799 + ssize_t ret, cap, sz = 0;
803 + buf = malloc(cap * sizeof(char));
808 + ret = read(sock_devd, &c, 1);
810 + if (errno == EINTR)
814 + /* EOF - devd socket is lost */
815 + } else if (ret == 0) {
816 + disconnect_devd(sock_devd);
817 + rtimer = TimerSet(NULL, 0, 1, reconnect_handler, NULL);
818 + LogMessage(X_WARNING, "config/devd: devd socket is lost\n");
825 + if (sz + 1 >= cap) {
827 + newbuf = realloc(buf, cap * sizeof(char));
844 + /* Number of bytes in the line, not counting the line break */
849 +wakeup_handler(void *data, int err, void *read_mask)
857 + if (FD_ISSET(sock_devd, (fd_set *) read_mask)) {
858 + if (socket_getline(sock_devd, &line) < 0)
861 + walk = strchr(line + 1, ' ');
866 + case DEVD_EVENT_ADD:
867 + device_added(line + 1);
869 + case DEVD_EVENT_REMOVE:
870 + device_removed(line + 1);
880 +block_handler(void *data, struct timeval **tv, void *read_mask)
885 +config_devd_init(void)
887 + char devicename[1024];
890 + LogMessage(X_INFO, "config/devd: probing input devices...\n");
893 + * Add fake keyboard and give up on keyboards management
894 + * if kbdmux is enabled
896 + if ((is_kbdmux = is_kbdmux_enabled()) == true)
897 + device_added("kbdmux");
899 + for (i = 0; hw_types[i].driver != NULL; i++) {
900 + /* First scan the sysctl to determine the hardware */
901 + for (j = 0; j < 16; j++) {
902 + if (sysctl_exists(&hw_types[i], j,
903 + devicename, sizeof(devicename)) != 0)
904 + device_added(devicename);
907 + if (devpath_exists(&hw_types[i], devicename, sizeof(devicename)) != 0)
908 + device_added(devicename);
911 + if ((sock_devd = connect_devd()) < 0)
914 + RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
920 +config_devd_fini(void)
922 + LogMessage(X_INFO, "config/devd: terminating backend...\n");
929 + disconnect_devd(sock_devd);
931 + RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
933 + is_console_kbd = false;
937 [FILE:391:patches/patch-config_meson.build]
938 --- config/meson.build.orig 2022-12-19 10:53:03 UTC
939 +++ config/meson.build
940 @@ -25,7 +25,7 @@ endif
943 install_data('10-quirks.conf',
944 - install_dir: join_paths(get_option('datadir'), 'X11/xorg.conf.d'))
945 + install_dir: join_paths(get_option('prefix'), 'etc/X11/xorg.conf.d'))
948 libxserver_config = static_library('libxserver_config',
951 [FILE:256:patches/patch-hw_kdrive_ephyr_hostx.c]
952 --- hw/kdrive/ephyr/hostx.c.orig 2022-12-19 10:53:03 UTC
953 +++ hw/kdrive/ephyr/hostx.c
955 #include <string.h> /* for memset */
964 [FILE:765:patches/patch-hw_xfree86_common_xf86AutoConfig.c]
965 --- hw/xfree86/common/xf86AutoConfig.c.orig 2022-12-19 10:53:03 UTC
966 +++ hw/xfree86/common/xf86AutoConfig.c
967 @@ -294,7 +294,7 @@ listPossibleVideoDrivers(XF86MatchedDriv
968 xf86PciMatchDriver(md);
971 -#if defined(__linux__)
972 +#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
973 xf86AddMatchedDriver(md, "modesetting");
976 @@ -302,8 +302,10 @@ listPossibleVideoDrivers(XF86MatchedDriv
977 /* Fallback to platform default frame buffer driver */
978 #if !defined(__linux__) && defined(__sparc__)
979 xf86AddMatchedDriver(md, "wsfb");
981 +#elif defined(__linux__)
982 xf86AddMatchedDriver(md, "fbdev");
983 +#elif defined(__FreeBSD__)
984 + xf86AddMatchedDriver(md, "scfb");
990 [FILE:700:patches/patch-hw_xfree86_common_xf86Config.c]
991 --- hw/xfree86/common/xf86Config.c.orig 2022-12-19 10:53:03 UTC
992 +++ hw/xfree86/common/xf86Config.c
993 @@ -1279,13 +1279,16 @@ checkCoreInputDevices(serverLayoutPtr se
996 if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) {
997 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
998 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
999 + defined(CONFIG_DEVD)
1000 const char *config_backend;
1002 #if defined(CONFIG_HAL)
1003 config_backend = "HAL";
1004 #elif defined(CONFIG_UDEV)
1005 config_backend = "udev";
1006 +#elif defined(CONFIG_DEVD)
1007 + config_backend = "devd";
1009 config_backend = "wscons";
1013 [FILE:510:patches/patch-hw_xfree86_common_xf86Globals.c]
1014 --- hw/xfree86/common/xf86Globals.c.orig 2022-12-19 10:53:03 UTC
1015 +++ hw/xfree86/common/xf86Globals.c
1016 @@ -118,7 +118,7 @@ xf86InfoRec xf86Info = {
1017 .miscModInDevEnabled = TRUE,
1018 .miscModInDevAllowNonLocal = FALSE,
1020 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1021 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || defined(CONFIG_DEVD)
1022 .forceInputDevices = FALSE,
1023 .autoAddDevices = TRUE,
1024 .autoEnableDevices = TRUE,
1027 [FILE:483:patches/patch-hw_xfree86_common_xf86Xinput.c]
1028 --- hw/xfree86/common/xf86Xinput.c.orig 2022-12-19 10:53:03 UTC
1029 +++ hw/xfree86/common/xf86Xinput.c
1030 @@ -1065,6 +1065,7 @@ NewInputDeviceRequest(InputOption *optio
1031 if (strcmp(key, "_source") == 0 &&
1032 (strcmp(value, "server/hal") == 0 ||
1033 strcmp(value, "server/udev") == 0 ||
1034 + strcmp(value, "server/devd") == 0 ||
1035 strcmp(value, "server/wscons") == 0)) {
1037 if (!xf86Info.autoAddDevices) {
1040 [FILE:450:patches/patch-hw_xfree86_os-support_bsd_bsd__init.c]
1041 --- hw/xfree86/os-support/bsd/bsd_init.c.orig 2022-12-19 10:53:03 UTC
1042 +++ hw/xfree86/os-support/bsd/bsd_init.c
1043 @@ -230,6 +230,9 @@ xf86OpenConsole()
1044 * Add cases for other *BSD that behave the same.
1046 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
1047 +#if defined(__sparc64__)
1048 + pci_system_init_dev_mem(fd);
1051 i = atof(uts.release) * 100;
1055 [FILE:519:patches/patch-hw_xfree86_os-support_bsd_i386__video.c]
1056 --- hw/xfree86/os-support/bsd/i386_video.c.orig 2022-12-19 10:53:03 UTC
1057 +++ hw/xfree86/os-support/bsd/i386_video.c
1059 #include "xf86Priv.h"
1062 +#include <sys/types.h>
1063 #include <sys/mman.h>
1065 #include "xf86_OSlib.h"
1068 #define MAP_FLAGS (MAP_FILE | MAP_SHARED)
1070 +#if defined(__NetBSD__) && defined(USE_AMD64_IOPL)
1071 +#define amd64_iopl x86_64_iopl
1075 #define SYSCTL_MSG "\tCheck that you have set 'machdep.allowaperture=1'\n"\
1078 [FILE:380:patches/patch-hw_xfree86_os-support_bsd_ppc__video.c]
1079 --- hw/xfree86/os-support/bsd/ppc_video.c.orig 2022-12-19 10:53:03 UTC
1080 +++ hw/xfree86/os-support/bsd/ppc_video.c
1081 @@ -79,7 +79,11 @@ xf86DisableIO()
1084 if (ioBase != MAP_FAILED) {
1085 +#if defined(__FreeBSD__)
1086 + munmap(__DEVOLATILE(unsigned char *, ioBase), 0x10000);
1088 munmap(__UNVOLATILE(ioBase), 0x10000);
1090 ioBase = MAP_FAILED;
1095 [FILE:714:patches/patch-hw_xfree86_os-support_solaris_sun__init.c]
1096 --- hw/xfree86/os-support/solaris/sun_init.c.orig 2022-12-19 10:53:03 UTC
1097 +++ hw/xfree86/os-support/solaris/sun_init.c
1098 @@ -54,6 +54,22 @@ static int xf86StartVT = -1;
1099 static int vtEnabled = 0;
1103 +#define VTIOC ('V'<<8)
1104 +#define VT_OPENQRY (VTIOC|1)
1105 +#define VT_SETMODE (VTIOC|2)
1106 +#define VT_GETMODE (VTIOC|3)
1107 +#define VT_ACTIVATE (VTIOC|5)
1108 +#define VT_WAITACTIVE (VTIOC|6)
1109 +#define VT_GETSTATE (VTIOC|100)
1110 +#define VT_ENABLED (VTIOC|101)
1111 +#define VT_SETDISPINFO (VTIOC|103)
1112 +#define VT_GET_CONSUSER (VTIOC|108)
1113 +#define VT_SET_CONSUSER (VTIOC|109)
1115 +enum { VT_AUTO = 0, VT_PROCESS };
1118 /* Device to open as xf86Info.consoleFd */
1119 static char consoleDev[PATH_MAX] = "/dev/fb";
1123 [FILE:459:patches/patch-include_meson.build]
1124 --- include/meson.build.orig 2022-12-19 10:53:03 UTC
1125 +++ include/meson.build
1126 @@ -384,7 +384,7 @@ if host_machine.system() == 'freebsd' or
1128 elif host_machine.system() == 'netbsd'
1129 if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
1130 - xorg_data.set('USE_I386_IOPL', '1')
1131 + xorg_data.set('USE_AMD64_IOPL', '1')
1133 elif host_machine.system() == 'openbsd'
1134 if host_machine.cpu_family() == 'x86'
1137 [FILE:193:patches/patch-os_backtrace.c]
1138 --- os/backtrace.c.orig 2022-12-19 10:53:03 UTC
1144 +#include <unistd.h>
1146 #ifdef HAVE_LIBUNWIND
1150 [FILE:1021:patches/patch-test_simple-xinit.c]
1151 --- test/simple-xinit.c.orig 2022-12-19 10:53:03 UTC
1152 +++ test/simple-xinit.c
1154 #include <sys/wait.h>
1158 +#include <sys/varargs.h>
1160 +vasprintf(char **strp, const char *fmt, va_list args)
1162 + va_list args_copy;
1163 + int status, needed;
1165 + va_copy(args_copy, args);
1166 + needed = vsnprintf(NULL, 0, fmt, args_copy);
1167 + va_end(args_copy);
1172 + *strp = malloc(needed + 1);
1173 + if (*strp == NULL)
1175 + status = vsnprintf(*strp, needed + 1, fmt, args);
1186 +asprintf(char **strp, const char *fmt, ...)
1191 + va_start(args, fmt);
1192 + status = vasprintf(strp, fmt, args);
1199 kill_server(int server_pid)