1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 VARIANTS= standard virtual dmx xephyr nest wayland
8 SDESC[xephyr]= X server from X.Org based on kdrive
9 SDESC[virtual]= X virtual framebuffer server from X.Org
10 SDESC[wayland]= X Clients under Wayland
11 SDESC[standard]= X.Org X server and related programs
12 SDESC[dmx]= Distributed Multihead X from X.Org
13 SDESC[nest]= Nesting X server from X.Org
14 HOMEPAGE= https://www.x.org/
18 SITES[main]= XORG/individual/xserver
19 DISTFILE[1]= xorg-server-1.20.8.tar.bz2:main
22 SPKGS[virtual]= single
23 SPKGS[wayland]= single
24 SPKGS[standard]= single
28 OPTIONS_AVAILABLE= XORG VIRTUAL DMX XEPHYR NEST WAYLAND DEVD SUID
29 OPTIONS_STANDARD= XORG DEVD SUID
30 VOPTS[xephyr]= XORG=OFF VIRTUAL=OFF DMX=OFF XEPHYR=ON NEST=OFF
31 WAYLAND=OFF DEVD=OFF SUID=OFF
32 VOPTS[virtual]= XORG=OFF VIRTUAL=ON DMX=OFF XEPHYR=OFF NEST=OFF
33 WAYLAND=OFF DEVD=OFF SUID=OFF
34 VOPTS[wayland]= XORG=OFF VIRTUAL=OFF DMX=OFF XEPHYR=OFF NEST=OFF
35 WAYLAND=ON DEVD=OFF SUID=OFF
36 VOPTS[dmx]= XORG=OFF VIRTUAL=OFF DMX=ON XEPHYR=OFF NEST=OFF
37 WAYLAND=OFF DEVD=OFF SUID=OFF
38 VOPTS[nest]= XORG=OFF VIRTUAL=OFF DMX=OFF XEPHYR=OFF NEST=ON
39 WAYLAND=OFF DEVD=OFF SUID=OFF
40 OPT_ON[all]= XORG SUID
42 BUILD_DEPENDS= xorg-fontutil:single:standard
43 xorg-xkbfile:single:standard
44 RUN_DEPENDS= xorg-xkeyboard-config:primary:standard
45 xorg-xkbcomp:single:standard
47 USES= gmake libtool perl:build ssl
48 XORG_COMPONENTS= xorgproto xtransproto pixman xshmfence xau xdmcp
52 LICENSE_FILE= MIT:{{WRKSRC}}/COPYING
55 FPC_EQUIVALENT= x11-servers/xorg-server
58 CONFIGURE_ARGS= --with-xkb-path={{LOCALBASE}}/share/X11/xkb
59 --with-fontrootdir={{LOCALBASE}}/share/fonts
64 --with-shared-memory-dir=/tmp
67 --disable-config-udev-kms
68 --disable-install-setuid
73 INSTALL_TARGET= install-strip
75 VAR_OPSYS[sunos]= CFLAGS=-DO_CLOEXEC=0
77 [DEVD].DESCRIPTION= Use devd for autoconfiguration of input devices
79 [NEST].DESCRIPTION= Build as nesting X server
80 [NEST].BUILD_DEPENDS_ON= libepoxy:single:standard
82 [NEST].CONFIGURE_ENABLE_BOTH= xnest
84 [NEST].XORG_COMPONENTS_ON= x11
87 [XEPHYR].DESCRIPTION= Build as kdrive-base X server
88 [XEPHYR].BUILDRUN_DEPENDS_ON= libdrm:single:standard
89 libepoxy:single:standard
90 [XEPHYR].BUILD_DEPENDS_ON= mesa:drivers:standard
91 [XEPHYR].CONFIGURE_ENABLE_BOTH= xephyr
93 [XEPHYR].USES_ON= mesa
94 [XEPHYR].XORG_COMPONENTS_ON= x11
102 [DMX].DESCRIPTION= Build as distributed multihead X server
103 [DMX].BUILD_DEPENDS_ON= libepoxy:single:standard
104 mesa:drivers:standard
105 xorg-xtst:single:standard
106 xorg-xres:single:standard
107 [DMX].CONFIGURE_ENABLE_BOTH= dmx
108 [DMX].XORG_COMPONENTS_ON= dmx
119 [VIRTUAL].DESCRIPTION= Build as virtual framebuffer server
120 [VIRTUAL].BUILD_DEPENDS_ON= libepoxy:single:standard
121 mesa:drivers:standard
122 [VIRTUAL].CONFIGURE_ENABLE_BOTH= xvfb
123 [VIRTUAL].USES_ON= mesa
125 [XORG].DESCRIPTION= Build as X server (don't change setting!)
126 [XORG].BUILDRUN_DEPENDS_ON= libdrm:single:standard
127 libepoxy:single:standard
128 mesa:drivers:standard
129 [XORG].CONFIGURE_ENABLE_BOTH= docs
132 [XORG].SUB_FILES_ON= pkg-install-single
135 [XORG].XORG_COMPONENTS_ON= pciaccess
138 [WAYLAND].DESCRIPTION= Build Wayland X clients
139 [WAYLAND].BUILDRUN_DEPENDS_ON= libdrm:single:standard
140 libepoxy:single:standard
141 wayland:primary:standard
142 [WAYLAND].BUILD_DEPENDS_ON= mesa:drivers:standard
143 wayland-protocols:single:standard
144 evdev-proto:single:standard
145 [WAYLAND].CONFIGURE_ARGS_ON= --disable-xquartz
147 [WAYLAND].CONFIGURE_ENABLE_BOTH= xwayland
148 [WAYLAND].XORG_COMPONENTS_ON= x11
151 [SUID].DESCRIPTION= Install the Xorg server with setuid bit set
154 # build libglx.so but don't install it yet. (done in pre-install)
155 ${REINPLACE_CMD} -e 's|@GLX_TRUE@GLXMODS =|@GLX_BOGUS@GLXMODS =|g' \
156 -e 's|^LTLIBRARIES = |LTLIBRARIES = libglx.la |g' \
157 ${WRKSRC}/hw/xfree86/dixmods/Makefile.in
159 do-install-XEPHYR-ON:
160 (cd ${WRKSRC}/hw/kdrive/ephyr && \
161 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
163 do-install-WAYLAND-ON:
164 (cd ${WRKSRC}/hw/xwayland && \
165 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
167 post-install-XORG-OFF:
168 ${RM} -r ${STAGEDIR}${PREFIX}/lib/xorg
169 ${RM} ${STAGEDIR}${PREFIX}/share/man/man1/Xserver.1
171 post-configure-DEVD-ON:
172 ${REINPLACE_CMD} -e 's|config\.c|config.c devd.c|g' \
173 -e 's|config\.lo|config.lo devd.lo|g' \
174 ${WRKSRC}/config/Makefile
175 ${REINPLACE_CMD} -e 's|^/\* #undef CONFIG_UDEV \*/|#define CONFIG_DEVD 1|' \
176 ${WRKSRC}/include/dix-config.h
178 do-install-VIRTUAL-ON:
179 (cd ${WRKSRC}/hw/vfb && \
180 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
183 (cd ${WRKSRC}/hw/xnest && \
184 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
187 (cd ${WRKSRC}/hw/dmx && \
188 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
190 post-install-XORG-ON:
191 # The .xorg dir because else the xorg-server might not load the
192 # correct libglx module.
193 @${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg
194 ${INSTALL_LIB} ${WRKSRC}/hw/xfree86/dixmods/.libs/libglx.so \
195 ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg/
196 @${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d
197 ${RM} -r ${STAGEDIR}/var
199 [FILE:71:descriptions/desc.single.standard]
200 This package contains the X.Org X server and some associated programs.
203 [FILE:60:descriptions/desc.single.virtual]
204 This package contains Xvfb, a virtual framebuffer X server.
207 [FILE:287:descriptions/desc.single.dmx]
208 Xdmx is proxy X server that provides multi-head support for multiple
209 displays attached to different machines (each of which is running a
210 typical X server). When Xinerama is used with Xdmx, the multiple displays
211 on multiple machines are presented to the user as a single unified screen.
214 [FILE:173:descriptions/desc.single.xephyr]
215 Xephyr is a kdrive server that outputs to a window on a pre-existing
216 'host' X display. Think Xnest but with support for modern extensions
217 like composite, damage and randr.
220 [FILE:78:descriptions/desc.single.nest]
221 This package contains Xnest, a nesting X Server that displays on an X
225 [FILE:148:descriptions/desc.single.wayland]
226 XWayland is an X Server running as a Wayland client, thus capable of
227 displaying native X11 client applications in a Wayland compositor
232 d17b646bee4ba0fb7850c1cc55b18e3e8513ed5c02bdf38da7e107f84e2d0146 6309640 xorg-server-1.20.8.tar.bz2
235 [FILE:2523:manifests/plist.single.standard]
236 %%ONLY-SUNOS%%include/xorg/solaris-amd64.il
238 %%SUID-ON%%@(,,4555) bin/Xorg
405 lib/pkgconfig/xorg-server.pc
406 lib/xorg/protocol.txt
418 lib/xorg/modules/drivers/modesetting_drv.so
419 lib/xorg/modules/extensions/.xorg/libglx.so
420 share/aclocal/xorg-server.m4
433 @dir etc/X11/xorg.conf.d
436 [FILE:34:manifests/plist.single.virtual]
438 share/man/man1/Xvfb.1.gz
441 [FILE:214:manifests/plist.single.dmx]
462 [FILE:38:manifests/plist.single.xephyr]
464 share/man/man1/Xephyr.1.gz
467 [FILE:36:manifests/plist.single.nest]
469 share/man/man1/Xnest.1.gz
472 [FILE:13:manifests/plist.single.wayland]
476 [FILE:293:patches/patch-config_config-backends.h]
477 --- config/config-backends.h.orig 2020-03-29 20:21:15 UTC
478 +++ config/config-backends.h
479 @@ -44,3 +44,8 @@ void config_hal_fini(void);
480 int config_wscons_init(void);
481 void config_wscons_fini(void);
485 +int config_devd_init(void);
486 +void config_devd_fini(void);
490 [FILE:537:patches/patch-config_config.c]
491 --- config/config.c.orig 2020-03-29 20:21:15 UTC
493 @@ -55,6 +55,9 @@ config_init(void)
494 #elif defined(CONFIG_WSCONS)
495 if (!config_wscons_init())
496 ErrorF("[config] failed to initialise wscons\n");
497 +#elif defined(CONFIG_DEVD)
498 + if (!config_devd_init())
499 + ErrorF("[config] failed to initialise devd\n");
503 @@ -67,6 +70,8 @@ config_fini(void)
505 #elif defined(CONFIG_WSCONS)
506 config_wscons_fini();
507 +#elif defined(CONFIG_DEVD)
508 + config_devd_fini();
514 [FILE:12171:patches/patch-config_devd.c]
515 --- /dev/null 2020-04-01 15:08:07 UTC
519 + * Copyright (c) 2012 Baptiste Daroussin
520 + * Copyright (c) 2013, 2014 Alex Kozlov
521 + * Copyright (c) 2014 Robert Millan
522 + * Copyright (c) 2014 Jean-Sebastien Pedron
524 + * Permission is hereby granted, free of charge, to any person obtaining a
525 + * copy of this software and associated documentation files (the "Software"),
526 + * to deal in the Software without restriction, including without limitation
527 + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
528 + * and/or sell copies of the Software, and to permit persons to whom the
529 + * Software is furnished to do so, subject to the following conditions:
531 + * The above copyright notice and this permission notice (including the next
532 + * paragraph) shall be included in all copies or substantial portions of the
535 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
536 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
537 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
538 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
539 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
540 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
541 + * DEALINGS IN THE SOFTWARE.
543 + * Author: Baptiste Daroussin <bapt@FreeBSD.org>
546 +#ifdef HAVE_DIX_CONFIG_H
547 +#include <dix-config.h>
550 +#include <sys/types.h>
551 +#include <sys/kbio.h>
552 +#include <sys/socket.h>
553 +#include <sys/stat.h>
554 +#include <sys/sysctl.h>
562 +#include <stdbool.h>
566 +#include "inputstr.h"
567 +#include "hotplug.h"
568 +#include "config-backends.h"
571 +#define DEVD_SOCK_PATH "/var/run/devd.pipe"
573 +#define DEVD_EVENT_ADD '+'
574 +#define DEVD_EVENT_REMOVE '-'
576 +#define RECONNECT_DELAY 5 * 1000
578 +static int sock_devd;
579 +static bool is_console_kbd = false;
580 +static bool is_kbdmux = false;
581 +static OsTimerPtr rtimer = NULL;
584 + const char *driver;
586 + const char *xdriver;
589 +static struct hw_type hw_types[] = {
590 + { "ukbd", ATTR_KEYBOARD, "kbd" },
591 + { "atkbd", ATTR_KEYBOARD, "kbd" },
592 + { "kbdmux", ATTR_KEYBOARD, "kbd" },
593 + { "sysmouse", ATTR_POINTER, "mouse" },
594 + { "ums", ATTR_POINTER, "mouse" },
595 + { "psm", ATTR_POINTER, "mouse" },
596 + { "vboxguest", ATTR_POINTER, "vboxmouse" },
597 + { "joy", ATTR_JOYSTICK, NULL },
598 + { "atp", ATTR_TOUCHPAD, NULL },
599 + { "uep", ATTR_TOUCHSCREEN, NULL },
600 + { NULL, -1, NULL },
604 +sysctl_exists(const struct hw_type *device, int unit,
605 + char *devname, size_t devname_len)
607 + char sysctlname[PATH_MAX];
611 + if (device == NULL || device->driver == NULL)
614 + /* Check if a sysctl exists. */
615 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%i.%%desc",
616 + device->driver, unit);
617 + ret = sysctlbyname(sysctlname, NULL, &len, NULL, 0);
619 + if (ret == 0 && len > 0) {
620 + snprintf(devname, devname_len, "%s%i", device->driver, unit);
628 +devpath_exists(const struct hw_type *device,
629 + char *devname, size_t devname_len)
635 + if (device == NULL || device->driver == NULL)
638 + /* Check if /dev/$driver exists. */
639 + asprintf(&devpath, "/dev/%s", device->driver);
640 + if (devpath == NULL)
643 + ret = stat(devpath, &st);
647 + strncpy(devname, device->driver, devname_len);
655 +sysctl_get_str(const char *sysctlname)
660 + if (sysctlname == NULL)
663 + if (sysctlbyname(sysctlname, NULL, &len, NULL, 0) == 0) {
664 + dest = malloc(len + 1);
666 + if (sysctlbyname(sysctlname, dest, &len, NULL, 0) == 0)
679 +device_added(const char *devname)
681 + char path[PATH_MAX];
682 + char sysctlname[PATH_MAX];
684 + char *product = NULL;
685 + char *config_info = NULL;
687 + InputOption *options = NULL;
688 + InputAttributes attrs = { };
689 + DeviceIntPtr dev = NULL;
693 + for (i = 0; hw_types[i].driver != NULL; i++) {
696 + len = strlen(hw_types[i].driver);
697 + if (strcmp(devname, hw_types[i].driver) == 0 ||
698 + (strncmp(devname, hw_types[i].driver, len) == 0 &&
699 + isnumber(*(devname + len)))) {
700 + attrs.flags |= hw_types[i].flag;
705 + if (hw_types[i].driver == NULL || hw_types[i].xdriver == NULL) {
706 + LogMessage(X_INFO, "config/devd: ignoring device %s\n",
711 + /* Skip keyboard devices if kbdmux is enabled */
712 + if (is_kbdmux && is_console_kbd && hw_types[i].flag & ATTR_KEYBOARD) {
713 + LogMessage(X_INFO, "config/devd: kbdmux is enabled, ignoring device %s\n",
718 + snprintf(path, sizeof(path), "/dev/%s", devname);
720 + options = input_option_new(NULL, "_source", "server/devd");
724 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%s.%%desc",
725 + hw_types[i].driver, devname + strlen(hw_types[i].driver));
726 + vendor = sysctl_get_str(sysctlname);
727 + if (vendor == NULL) {
728 + options = input_option_new(options, "name", devname);
731 + if ((walk = strchr(vendor, ' ')) != NULL) {
735 + if ((walk = strchr(product, ',')) != NULL)
739 + attrs.vendor = strdup(vendor);
741 + attrs.product = strdup(product);
742 + options = input_option_new(options, "name", product);
745 + options = input_option_new(options, "name", "(unnamed)");
750 + /* XXX implement usb_id */
751 + attrs.usb_id = NULL;
752 + attrs.device = strdup(path);
753 + options = input_option_new(options, "driver", hw_types[i].xdriver);
755 + fd = open(path, O_RDONLY);
758 + options = input_option_new(options, "device", path);
761 + if (attrs.flags & ~ATTR_KEYBOARD) {
762 + LogMessage(X_INFO, "config/devd: device %s already opened\n",
766 + * Fail if cannot open device, it breaks AllowMouseOpenFail,
767 + * but it should not matter when config/devd enabled
772 + if (is_console_kbd) {
774 + * There can be only one keyboard attached to console and
775 + * it is already added.
777 + LogMessage(X_WARNING, "config/devd: console keyboard is "
778 + "already added, ignoring %s (%s)\n",
779 + attrs.product, path);
784 + * Don't pass "device" option if the keyboard is already
785 + * attached to the console (ie. open() fails).
786 + * This would activate a special logic in xf86-input-keyboard.
787 + * Prevent any other attached to console keyboards being
788 + * processed. There can be only one such device.
790 + is_console_kbd = true;
793 + if (asprintf(&config_info, "devd:%s", devname) == -1) {
794 + config_info = NULL;
798 + if (device_is_duplicate(config_info)) {
799 + LogMessage(X_WARNING, "config/devd: device %s (%s) already added. "
800 + "ignoring\n", attrs.product, path);
804 + options = input_option_new(options, "config_info", config_info);
805 + LogMessage(X_INFO, "config/devd: adding input device %s (%s)\n",
806 + attrs.product, path);
808 + NewInputDeviceRequest(options, &attrs, &dev);
812 + input_option_free_list(&options);
813 + free(attrs.usb_id);
814 + free(attrs.product);
815 + free(attrs.device);
816 + free(attrs.vendor);
820 +device_removed(char *devname)
824 + if (asprintf(&config_info, "devd:%s", devname) == -1)
827 + remove_devices("devd", config_info);
832 +static bool is_kbdmux_enabled(void)
834 + /* Xorg uses /dev/ttyv0 as a console device */
835 + /* const char device[]="/dev/console"; */
836 + const char device[]="/dev/ttyv0";
837 + keyboard_info_t info;
840 + fd = open(device, O_RDONLY);
845 + if (ioctl(fd, KDGKBINFO, &info) == -1) {
852 + if (!strncmp(info.kb_name, "kbdmux", 6))
859 +disconnect_devd(int sock)
862 + RemoveGeneralSocket(sock);
870 + struct sockaddr_un devd;
873 + sock = socket(AF_UNIX, SOCK_STREAM, 0);
875 + LogMessage(X_ERROR, "config/devd: fail opening stream socket\n");
879 + devd.sun_family = AF_UNIX;
880 + strlcpy(devd.sun_path, DEVD_SOCK_PATH, sizeof(devd.sun_path));
882 + if (connect(sock, (struct sockaddr *) &devd, sizeof(devd)) < 0) {
884 + LogMessage(X_ERROR, "config/devd: fail to connect to devd\n");
888 + AddGeneralSocket(sock);
894 +reconnect_handler(OsTimerPtr timer, CARD32 time, void *arg)
898 + if ((newsock = connect_devd()) > 0) {
899 + sock_devd = newsock;
902 + LogMessage(X_INFO, "config/devd: reopening devd socket\n");
906 + /* Try again after RECONNECT_DELAY */
907 + return RECONNECT_DELAY;
911 +socket_getline(int fd, char **out)
913 + char *buf, *newbuf;
914 + ssize_t ret, cap, sz = 0;
918 + buf = malloc(cap * sizeof(char));
923 + ret = read(sock_devd, &c, 1);
925 + if (errno == EINTR)
929 + /* EOF - devd socket is lost */
930 + } else if (ret == 0) {
931 + disconnect_devd(sock_devd);
932 + rtimer = TimerSet(NULL, 0, 1, reconnect_handler, NULL);
933 + LogMessage(X_WARNING, "config/devd: devd socket is lost\n");
940 + if (sz + 1 >= cap) {
942 + newbuf = realloc(buf, cap * sizeof(char));
959 + /* Number of bytes in the line, not counting the line break */
964 +wakeup_handler(void *data, int err, void *read_mask)
972 + if (FD_ISSET(sock_devd, (fd_set *) read_mask)) {
973 + if (socket_getline(sock_devd, &line) < 0)
976 + walk = strchr(line + 1, ' ');
981 + case DEVD_EVENT_ADD:
982 + device_added(line + 1);
984 + case DEVD_EVENT_REMOVE:
985 + device_removed(line + 1);
995 +block_handler(void *data, struct timeval **tv, void *read_mask)
1000 +config_devd_init(void)
1002 + char devicename[1024];
1005 + LogMessage(X_INFO, "config/devd: probing input devices...\n");
1008 + * Add fake keyboard and give up on keyboards management
1009 + * if kbdmux is enabled
1011 + if ((is_kbdmux = is_kbdmux_enabled()) == true)
1012 + device_added("kbdmux");
1014 + for (i = 0; hw_types[i].driver != NULL; i++) {
1015 + /* First scan the sysctl to determine the hardware */
1016 + for (j = 0; j < 16; j++) {
1017 + if (sysctl_exists(&hw_types[i], j,
1018 + devicename, sizeof(devicename)) != 0)
1019 + device_added(devicename);
1022 + if (devpath_exists(&hw_types[i], devicename, sizeof(devicename)) != 0)
1023 + device_added(devicename);
1026 + if ((sock_devd = connect_devd()) < 0)
1029 + RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
1035 +config_devd_fini(void)
1037 + LogMessage(X_INFO, "config/devd: terminating backend...\n");
1040 + TimerFree(rtimer);
1044 + disconnect_devd(sock_devd);
1046 + RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
1048 + is_console_kbd = false;
1052 [FILE:1081:patches/patch-configure]
1053 --- configure.orig 2020-03-29 20:21:27 UTC
1055 @@ -12056,7 +12056,7 @@ echo 'failed to copy INSTALL from util-m
1061 # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
1062 # check for a man page file found in later versions that use
1063 # traditional section numbers instead
1064 @@ -21782,7 +21782,7 @@ if test `${RAWCPP} < conftest.$ac_ext |
1065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1066 $as_echo "no" >&6; }
1068 - if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
1070 TRADITIONALCPPFLAGS="-traditional"
1071 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1073 @@ -23151,9 +23151,14 @@ $as_echo "#define USE_ALPHA_PIO 1" >>con
1075 GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee"
1080 DEFAULT_INT10="stub"
1083 + $as_echo "#define USE_DEV_IO 1" >>confdefs.h
1091 [FILE:256:patches/patch-hw_kdrive_ephyr_hostx.c]
1092 --- hw/kdrive/ephyr/hostx.c.orig 2020-03-29 20:21:15 UTC
1093 +++ hw/kdrive/ephyr/hostx.c
1095 #include <string.h> /* for memset */
1100 #include <sys/ipc.h>
1101 #include <sys/shm.h>
1104 [FILE:765:patches/patch-hw_xfree86_common_xf86AutoConfig.c]
1105 --- hw/xfree86/common/xf86AutoConfig.c.orig 2020-03-29 20:21:15 UTC
1106 +++ hw/xfree86/common/xf86AutoConfig.c
1107 @@ -294,7 +294,7 @@ listPossibleVideoDrivers(XF86MatchedDriv
1108 xf86PciMatchDriver(md);
1111 -#if defined(__linux__)
1112 +#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
1113 xf86AddMatchedDriver(md, "modesetting");
1116 @@ -302,8 +302,10 @@ listPossibleVideoDrivers(XF86MatchedDriv
1117 /* Fallback to platform default frame buffer driver */
1118 #if !defined(__linux__) && defined(__sparc__)
1119 xf86AddMatchedDriver(md, "wsfb");
1121 +#elif defined(__linux__)
1122 xf86AddMatchedDriver(md, "fbdev");
1123 +#elif defined(__FreeBSD__)
1124 + xf86AddMatchedDriver(md, "scfb");
1130 [FILE:700:patches/patch-hw_xfree86_common_xf86Config.c]
1131 --- hw/xfree86/common/xf86Config.c.orig 2020-03-29 20:21:15 UTC
1132 +++ hw/xfree86/common/xf86Config.c
1133 @@ -1264,13 +1264,16 @@ checkCoreInputDevices(serverLayoutPtr se
1136 if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) {
1137 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1138 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
1139 + defined(CONFIG_DEVD)
1140 const char *config_backend;
1142 #if defined(CONFIG_HAL)
1143 config_backend = "HAL";
1144 #elif defined(CONFIG_UDEV)
1145 config_backend = "udev";
1146 +#elif defined(CONFIG_DEVD)
1147 + config_backend = "devd";
1149 config_backend = "wscons";
1153 [FILE:510:patches/patch-hw_xfree86_common_xf86Globals.c]
1154 --- hw/xfree86/common/xf86Globals.c.orig 2020-03-29 20:21:15 UTC
1155 +++ hw/xfree86/common/xf86Globals.c
1156 @@ -119,7 +119,7 @@ xf86InfoRec xf86Info = {
1157 .miscModInDevEnabled = TRUE,
1158 .miscModInDevAllowNonLocal = FALSE,
1160 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1161 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || defined(CONFIG_DEVD)
1162 .forceInputDevices = FALSE,
1163 .autoAddDevices = TRUE,
1164 .autoEnableDevices = TRUE,
1167 [FILE:690:patches/patch-hw_xfree86_common_xf86Xinput.c]
1168 --- hw/xfree86/common/xf86Xinput.c.orig 2020-03-29 20:21:15 UTC
1169 +++ hw/xfree86/common/xf86Xinput.c
1170 @@ -874,7 +874,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, D
1172 InputDriverPtr drv = NULL;
1173 DeviceIntPtr dev = NULL;
1179 @@ -1037,6 +1037,7 @@ NewInputDeviceRequest(InputOption *optio
1180 if (strcmp(key, "_source") == 0 &&
1181 (strcmp(value, "server/hal") == 0 ||
1182 strcmp(value, "server/udev") == 0 ||
1183 + strcmp(value, "server/devd") == 0 ||
1184 strcmp(value, "server/wscons") == 0)) {
1186 if (!xf86Info.autoAddDevices) {
1189 [FILE:450:patches/patch-hw_xfree86_os-support_bsd_bsd__init.c]
1190 --- hw/xfree86/os-support/bsd/bsd_init.c.orig 2020-03-29 20:21:15 UTC
1191 +++ hw/xfree86/os-support/bsd/bsd_init.c
1192 @@ -230,6 +230,9 @@ xf86OpenConsole()
1193 * Add cases for other *BSD that behave the same.
1195 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
1196 +#if defined(__sparc64__)
1197 + pci_system_init_dev_mem(fd);
1200 i = atof(uts.release) * 100;
1204 [FILE:315:patches/patch-hw_xfree86_os-support_bsd_i386__video.c]
1205 Index: programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c
1206 --- hw/xfree86/os-support/bsd/i386_video.c.orig 2020-03-29 20:21:15 UTC
1207 +++ hw/xfree86/os-support/bsd/i386_video.c
1209 #include "xf86Priv.h"
1212 +#include <sys/types.h>
1213 #include <sys/mman.h>
1215 #include "xf86_OSlib.h"
1218 [FILE:380:patches/patch-hw_xfree86_os-support_bsd_ppc__video.c]
1219 --- hw/xfree86/os-support/bsd/ppc_video.c.orig 2020-03-29 20:21:15 UTC
1220 +++ hw/xfree86/os-support/bsd/ppc_video.c
1221 @@ -79,7 +79,11 @@ xf86DisableIO()
1224 if (ioBase != MAP_FAILED) {
1225 +#if defined(__FreeBSD__)
1226 + munmap(__DEVOLATILE(unsigned char *, ioBase), 0x10000);
1228 munmap(__UNVOLATILE(ioBase), 0x10000);
1230 ioBase = MAP_FAILED;
1235 [FILE:714:patches/patch-hw_xfree86_os-support_solaris_sun__init.c]
1236 --- hw/xfree86/os-support/solaris/sun_init.c.orig 2020-03-29 20:21:15 UTC
1237 +++ hw/xfree86/os-support/solaris/sun_init.c
1238 @@ -54,6 +54,22 @@ static int xf86StartVT = -1;
1239 static int vtEnabled = 0;
1243 +#define VTIOC ('V'<<8)
1244 +#define VT_OPENQRY (VTIOC|1)
1245 +#define VT_SETMODE (VTIOC|2)
1246 +#define VT_GETMODE (VTIOC|3)
1247 +#define VT_ACTIVATE (VTIOC|5)
1248 +#define VT_WAITACTIVE (VTIOC|6)
1249 +#define VT_GETSTATE (VTIOC|100)
1250 +#define VT_ENABLED (VTIOC|101)
1251 +#define VT_SETDISPINFO (VTIOC|103)
1252 +#define VT_GET_CONSUSER (VTIOC|108)
1253 +#define VT_SET_CONSUSER (VTIOC|109)
1255 +enum { VT_AUTO = 0, VT_PROCESS };
1258 /* Device to open as xf86Info.consoleFd */
1259 static char consoleDev[PATH_MAX] = "/dev/fb";
1263 [FILE:193:patches/patch-os_backtrace.c]
1264 --- os/backtrace.c.orig 2020-03-29 20:21:15 UTC
1270 +#include <unistd.h>
1272 #ifdef HAVE_LIBUNWIND
1276 [FILE:1021:patches/patch-test_simple-xinit.c]
1277 --- test/simple-xinit.c.orig 2020-03-29 20:21:15 UTC
1278 +++ test/simple-xinit.c
1280 #include <sys/wait.h>
1284 +#include <sys/varargs.h>
1286 +vasprintf(char **strp, const char *fmt, va_list args)
1288 + va_list args_copy;
1289 + int status, needed;
1291 + va_copy(args_copy, args);
1292 + needed = vsnprintf(NULL, 0, fmt, args_copy);
1293 + va_end(args_copy);
1298 + *strp = malloc(needed + 1);
1299 + if (*strp == NULL)
1301 + status = vsnprintf(*strp, needed + 1, fmt, args);
1312 +asprintf(char **strp, const char *fmt, ...)
1317 + va_start(args, fmt);
1318 + status = vasprintf(strp, fmt, args);
1325 kill_server(int server_pid)
1329 [FILE:215:patches/patch-xkb_Makefile.in]
1330 --- xkb/Makefile.in.orig 2020-03-29 20:21:33 UTC
1332 @@ -936,7 +936,7 @@ info: info-am
1336 -install-data-am: install-dist_xkbcompiledDATA
1339 install-dvi: install-dvi-am
1343 [FILE:135:files/pkg-deinstall-single.in]
1346 PREFIX="${PKG_PREFIX-/raven}"
1350 /bin/rm -rf ${PREFIX}/lib/xorg/modules/extensions/libglx.so*
1355 [FILE:531:files/pkg-install-single.in]
1358 PREFIX="${PKG_PREFIX-/raven}"
1362 if [ -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 ]; then
1363 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1364 ${PREFIX}/lib/xorg/modules/extensions/libglx.so
1365 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1366 ${PREFIX}/lib/xorg/modules/extensions/libglx.so.1
1368 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.xorg/libglx.so \
1369 ${PREFIX}/lib/xorg/modules/extensions/libglx.so