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= cpe gmake libtool perl:build ssl
48 XORG_COMPONENTS= xorgproto xtransproto pixman xshmfence xau xdmcp
52 LICENSE_FILE= MIT:{{WRKSRC}}/COPYING
56 FPC_EQUIVALENT= x11-servers/xorg-server
59 CONFIGURE_ARGS= --with-xkb-path={{LOCALBASE}}/share/X11/xkb
60 --with-fontrootdir={{LOCALBASE}}/share/fonts
65 --with-shared-memory-dir=/tmp
68 --disable-config-udev-kms
69 --disable-install-setuid
74 INSTALL_TARGET= install-strip
76 VAR_OPSYS[sunos]= CFLAGS=-DO_CLOEXEC=0
78 [DEVD].DESCRIPTION= Use devd for autoconfiguration of input devices
80 [NEST].DESCRIPTION= Build as nesting X server
81 [NEST].BUILD_DEPENDS_ON= libepoxy:single:standard
83 [NEST].CONFIGURE_ENABLE_BOTH= xnest
85 [NEST].XORG_COMPONENTS_ON= x11
88 [XEPHYR].DESCRIPTION= Build as kdrive-base X server
89 [XEPHYR].BUILDRUN_DEPENDS_ON= libdrm:single:standard
90 libepoxy:single:standard
91 [XEPHYR].BUILD_DEPENDS_ON= mesa:drivers:standard
92 [XEPHYR].CONFIGURE_ENABLE_BOTH= xephyr
94 [XEPHYR].USES_ON= mesa
95 [XEPHYR].XORG_COMPONENTS_ON= x11
103 [DMX].DESCRIPTION= Build as distributed multihead X server
104 [DMX].BUILD_DEPENDS_ON= libepoxy:single:standard
105 mesa:drivers:standard
106 xorg-xtst:single:standard
107 xorg-xres:single:standard
108 [DMX].CONFIGURE_ENABLE_BOTH= dmx
109 [DMX].XORG_COMPONENTS_ON= dmx
120 [VIRTUAL].DESCRIPTION= Build as virtual framebuffer server
121 [VIRTUAL].BUILD_DEPENDS_ON= libepoxy:single:standard
122 mesa:drivers:standard
123 [VIRTUAL].CONFIGURE_ENABLE_BOTH= xvfb
124 [VIRTUAL].USES_ON= mesa
126 [XORG].DESCRIPTION= Build as X server (don't change setting!)
127 [XORG].BUILDRUN_DEPENDS_ON= libdrm:single:standard
128 libepoxy:single:standard
129 mesa:drivers:standard
130 [XORG].CONFIGURE_ENABLE_BOTH= docs
133 [XORG].SUB_FILES_ON= pkg-install-single
136 [XORG].XORG_COMPONENTS_ON= pciaccess
139 [WAYLAND].DESCRIPTION= Build Wayland X clients
140 [WAYLAND].BUILDRUN_DEPENDS_ON= libdrm:single:standard
141 libepoxy:single:standard
142 wayland:primary:standard
143 [WAYLAND].BUILD_DEPENDS_ON= mesa:drivers:standard
144 wayland-protocols:single:standard
145 evdev-proto:single:standard
146 [WAYLAND].CONFIGURE_ARGS_ON= --disable-xquartz
148 [WAYLAND].CONFIGURE_ENABLE_BOTH= xwayland
149 [WAYLAND].XORG_COMPONENTS_ON= x11
152 [SUID].DESCRIPTION= Install the Xorg server with setuid bit set
155 # build libglx.so but don't install it yet. (done in pre-install)
156 ${REINPLACE_CMD} -e 's|@GLX_TRUE@GLXMODS =|@GLX_BOGUS@GLXMODS =|g' \
157 -e 's|^LTLIBRARIES = |LTLIBRARIES = libglx.la |g' \
158 ${WRKSRC}/hw/xfree86/dixmods/Makefile.in
160 do-install-XEPHYR-ON:
161 (cd ${WRKSRC}/hw/kdrive/ephyr && \
162 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
164 do-install-WAYLAND-ON:
165 (cd ${WRKSRC}/hw/xwayland && \
166 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
168 post-install-XORG-OFF:
169 ${RM} -r ${STAGEDIR}${PREFIX}/lib/xorg
170 ${RM} ${STAGEDIR}${PREFIX}/share/man/man1/Xserver.1
172 post-configure-DEVD-ON:
173 ${REINPLACE_CMD} -e 's|config\.c|config.c devd.c|g' \
174 -e 's|config\.lo|config.lo devd.lo|g' \
175 ${WRKSRC}/config/Makefile
176 ${REINPLACE_CMD} -e 's|^/\* #undef CONFIG_UDEV \*/|#define CONFIG_DEVD 1|' \
177 ${WRKSRC}/include/dix-config.h
179 do-install-VIRTUAL-ON:
180 (cd ${WRKSRC}/hw/vfb && \
181 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
184 (cd ${WRKSRC}/hw/xnest && \
185 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
188 (cd ${WRKSRC}/hw/dmx && \
189 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
191 post-install-XORG-ON:
192 # The .xorg dir because else the xorg-server might not load the
193 # correct libglx module.
194 @${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg
195 ${INSTALL_LIB} ${WRKSRC}/hw/xfree86/dixmods/.libs/libglx.so \
196 ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg/
197 @${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d
198 ${RM} -r ${STAGEDIR}/var
200 [FILE:71:descriptions/desc.single.standard]
201 This package contains the X.Org X server and some associated programs.
204 [FILE:60:descriptions/desc.single.virtual]
205 This package contains Xvfb, a virtual framebuffer X server.
208 [FILE:287:descriptions/desc.single.dmx]
209 Xdmx is proxy X server that provides multi-head support for multiple
210 displays attached to different machines (each of which is running a
211 typical X server). When Xinerama is used with Xdmx, the multiple displays
212 on multiple machines are presented to the user as a single unified screen.
215 [FILE:173:descriptions/desc.single.xephyr]
216 Xephyr is a kdrive server that outputs to a window on a pre-existing
217 'host' X display. Think Xnest but with support for modern extensions
218 like composite, damage and randr.
221 [FILE:78:descriptions/desc.single.nest]
222 This package contains Xnest, a nesting X Server that displays on an X
226 [FILE:148:descriptions/desc.single.wayland]
227 XWayland is an X Server running as a Wayland client, thus capable of
228 displaying native X11 client applications in a Wayland compositor
233 d17b646bee4ba0fb7850c1cc55b18e3e8513ed5c02bdf38da7e107f84e2d0146 6309640 xorg-server-1.20.8.tar.bz2
236 [FILE:2523:manifests/plist.single.standard]
237 %%ONLY-SUNOS%%include/xorg/solaris-amd64.il
239 %%SUID-ON%%@(,,4555) bin/Xorg
406 lib/pkgconfig/xorg-server.pc
407 lib/xorg/protocol.txt
419 lib/xorg/modules/drivers/modesetting_drv.so
420 lib/xorg/modules/extensions/.xorg/libglx.so
421 share/aclocal/xorg-server.m4
434 @dir etc/X11/xorg.conf.d
437 [FILE:34:manifests/plist.single.virtual]
439 share/man/man1/Xvfb.1.gz
442 [FILE:214:manifests/plist.single.dmx]
463 [FILE:38:manifests/plist.single.xephyr]
465 share/man/man1/Xephyr.1.gz
468 [FILE:36:manifests/plist.single.nest]
470 share/man/man1/Xnest.1.gz
473 [FILE:13:manifests/plist.single.wayland]
477 [FILE:293:patches/patch-config_config-backends.h]
478 --- config/config-backends.h.orig 2020-03-29 20:21:15 UTC
479 +++ config/config-backends.h
480 @@ -44,3 +44,8 @@ void config_hal_fini(void);
481 int config_wscons_init(void);
482 void config_wscons_fini(void);
486 +int config_devd_init(void);
487 +void config_devd_fini(void);
491 [FILE:537:patches/patch-config_config.c]
492 --- config/config.c.orig 2020-03-29 20:21:15 UTC
494 @@ -55,6 +55,9 @@ config_init(void)
495 #elif defined(CONFIG_WSCONS)
496 if (!config_wscons_init())
497 ErrorF("[config] failed to initialise wscons\n");
498 +#elif defined(CONFIG_DEVD)
499 + if (!config_devd_init())
500 + ErrorF("[config] failed to initialise devd\n");
504 @@ -67,6 +70,8 @@ config_fini(void)
506 #elif defined(CONFIG_WSCONS)
507 config_wscons_fini();
508 +#elif defined(CONFIG_DEVD)
509 + config_devd_fini();
515 [FILE:12171:patches/patch-config_devd.c]
516 --- /dev/null 2020-04-01 15:08:07 UTC
520 + * Copyright (c) 2012 Baptiste Daroussin
521 + * Copyright (c) 2013, 2014 Alex Kozlov
522 + * Copyright (c) 2014 Robert Millan
523 + * Copyright (c) 2014 Jean-Sebastien Pedron
525 + * Permission is hereby granted, free of charge, to any person obtaining a
526 + * copy of this software and associated documentation files (the "Software"),
527 + * to deal in the Software without restriction, including without limitation
528 + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
529 + * and/or sell copies of the Software, and to permit persons to whom the
530 + * Software is furnished to do so, subject to the following conditions:
532 + * The above copyright notice and this permission notice (including the next
533 + * paragraph) shall be included in all copies or substantial portions of the
536 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
537 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
538 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
539 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
540 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
541 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
542 + * DEALINGS IN THE SOFTWARE.
544 + * Author: Baptiste Daroussin <bapt@FreeBSD.org>
547 +#ifdef HAVE_DIX_CONFIG_H
548 +#include <dix-config.h>
551 +#include <sys/types.h>
552 +#include <sys/kbio.h>
553 +#include <sys/socket.h>
554 +#include <sys/stat.h>
555 +#include <sys/sysctl.h>
563 +#include <stdbool.h>
567 +#include "inputstr.h"
568 +#include "hotplug.h"
569 +#include "config-backends.h"
572 +#define DEVD_SOCK_PATH "/var/run/devd.pipe"
574 +#define DEVD_EVENT_ADD '+'
575 +#define DEVD_EVENT_REMOVE '-'
577 +#define RECONNECT_DELAY 5 * 1000
579 +static int sock_devd;
580 +static bool is_console_kbd = false;
581 +static bool is_kbdmux = false;
582 +static OsTimerPtr rtimer = NULL;
585 + const char *driver;
587 + const char *xdriver;
590 +static struct hw_type hw_types[] = {
591 + { "ukbd", ATTR_KEYBOARD, "kbd" },
592 + { "atkbd", ATTR_KEYBOARD, "kbd" },
593 + { "kbdmux", ATTR_KEYBOARD, "kbd" },
594 + { "sysmouse", ATTR_POINTER, "mouse" },
595 + { "ums", ATTR_POINTER, "mouse" },
596 + { "psm", ATTR_POINTER, "mouse" },
597 + { "vboxguest", ATTR_POINTER, "vboxmouse" },
598 + { "joy", ATTR_JOYSTICK, NULL },
599 + { "atp", ATTR_TOUCHPAD, NULL },
600 + { "uep", ATTR_TOUCHSCREEN, NULL },
601 + { NULL, -1, NULL },
605 +sysctl_exists(const struct hw_type *device, int unit,
606 + char *devname, size_t devname_len)
608 + char sysctlname[PATH_MAX];
612 + if (device == NULL || device->driver == NULL)
615 + /* Check if a sysctl exists. */
616 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%i.%%desc",
617 + device->driver, unit);
618 + ret = sysctlbyname(sysctlname, NULL, &len, NULL, 0);
620 + if (ret == 0 && len > 0) {
621 + snprintf(devname, devname_len, "%s%i", device->driver, unit);
629 +devpath_exists(const struct hw_type *device,
630 + char *devname, size_t devname_len)
636 + if (device == NULL || device->driver == NULL)
639 + /* Check if /dev/$driver exists. */
640 + asprintf(&devpath, "/dev/%s", device->driver);
641 + if (devpath == NULL)
644 + ret = stat(devpath, &st);
648 + strncpy(devname, device->driver, devname_len);
656 +sysctl_get_str(const char *sysctlname)
661 + if (sysctlname == NULL)
664 + if (sysctlbyname(sysctlname, NULL, &len, NULL, 0) == 0) {
665 + dest = malloc(len + 1);
667 + if (sysctlbyname(sysctlname, dest, &len, NULL, 0) == 0)
680 +device_added(const char *devname)
682 + char path[PATH_MAX];
683 + char sysctlname[PATH_MAX];
685 + char *product = NULL;
686 + char *config_info = NULL;
688 + InputOption *options = NULL;
689 + InputAttributes attrs = { };
690 + DeviceIntPtr dev = NULL;
694 + for (i = 0; hw_types[i].driver != NULL; i++) {
697 + len = strlen(hw_types[i].driver);
698 + if (strcmp(devname, hw_types[i].driver) == 0 ||
699 + (strncmp(devname, hw_types[i].driver, len) == 0 &&
700 + isnumber(*(devname + len)))) {
701 + attrs.flags |= hw_types[i].flag;
706 + if (hw_types[i].driver == NULL || hw_types[i].xdriver == NULL) {
707 + LogMessage(X_INFO, "config/devd: ignoring device %s\n",
712 + /* Skip keyboard devices if kbdmux is enabled */
713 + if (is_kbdmux && is_console_kbd && hw_types[i].flag & ATTR_KEYBOARD) {
714 + LogMessage(X_INFO, "config/devd: kbdmux is enabled, ignoring device %s\n",
719 + snprintf(path, sizeof(path), "/dev/%s", devname);
721 + options = input_option_new(NULL, "_source", "server/devd");
725 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%s.%%desc",
726 + hw_types[i].driver, devname + strlen(hw_types[i].driver));
727 + vendor = sysctl_get_str(sysctlname);
728 + if (vendor == NULL) {
729 + options = input_option_new(options, "name", devname);
732 + if ((walk = strchr(vendor, ' ')) != NULL) {
736 + if ((walk = strchr(product, ',')) != NULL)
740 + attrs.vendor = strdup(vendor);
742 + attrs.product = strdup(product);
743 + options = input_option_new(options, "name", product);
746 + options = input_option_new(options, "name", "(unnamed)");
751 + /* XXX implement usb_id */
752 + attrs.usb_id = NULL;
753 + attrs.device = strdup(path);
754 + options = input_option_new(options, "driver", hw_types[i].xdriver);
756 + fd = open(path, O_RDONLY);
759 + options = input_option_new(options, "device", path);
762 + if (attrs.flags & ~ATTR_KEYBOARD) {
763 + LogMessage(X_INFO, "config/devd: device %s already opened\n",
767 + * Fail if cannot open device, it breaks AllowMouseOpenFail,
768 + * but it should not matter when config/devd enabled
773 + if (is_console_kbd) {
775 + * There can be only one keyboard attached to console and
776 + * it is already added.
778 + LogMessage(X_WARNING, "config/devd: console keyboard is "
779 + "already added, ignoring %s (%s)\n",
780 + attrs.product, path);
785 + * Don't pass "device" option if the keyboard is already
786 + * attached to the console (ie. open() fails).
787 + * This would activate a special logic in xf86-input-keyboard.
788 + * Prevent any other attached to console keyboards being
789 + * processed. There can be only one such device.
791 + is_console_kbd = true;
794 + if (asprintf(&config_info, "devd:%s", devname) == -1) {
795 + config_info = NULL;
799 + if (device_is_duplicate(config_info)) {
800 + LogMessage(X_WARNING, "config/devd: device %s (%s) already added. "
801 + "ignoring\n", attrs.product, path);
805 + options = input_option_new(options, "config_info", config_info);
806 + LogMessage(X_INFO, "config/devd: adding input device %s (%s)\n",
807 + attrs.product, path);
809 + NewInputDeviceRequest(options, &attrs, &dev);
813 + input_option_free_list(&options);
814 + free(attrs.usb_id);
815 + free(attrs.product);
816 + free(attrs.device);
817 + free(attrs.vendor);
821 +device_removed(char *devname)
825 + if (asprintf(&config_info, "devd:%s", devname) == -1)
828 + remove_devices("devd", config_info);
833 +static bool is_kbdmux_enabled(void)
835 + /* Xorg uses /dev/ttyv0 as a console device */
836 + /* const char device[]="/dev/console"; */
837 + const char device[]="/dev/ttyv0";
838 + keyboard_info_t info;
841 + fd = open(device, O_RDONLY);
846 + if (ioctl(fd, KDGKBINFO, &info) == -1) {
853 + if (!strncmp(info.kb_name, "kbdmux", 6))
860 +disconnect_devd(int sock)
863 + RemoveGeneralSocket(sock);
871 + struct sockaddr_un devd;
874 + sock = socket(AF_UNIX, SOCK_STREAM, 0);
876 + LogMessage(X_ERROR, "config/devd: fail opening stream socket\n");
880 + devd.sun_family = AF_UNIX;
881 + strlcpy(devd.sun_path, DEVD_SOCK_PATH, sizeof(devd.sun_path));
883 + if (connect(sock, (struct sockaddr *) &devd, sizeof(devd)) < 0) {
885 + LogMessage(X_ERROR, "config/devd: fail to connect to devd\n");
889 + AddGeneralSocket(sock);
895 +reconnect_handler(OsTimerPtr timer, CARD32 time, void *arg)
899 + if ((newsock = connect_devd()) > 0) {
900 + sock_devd = newsock;
903 + LogMessage(X_INFO, "config/devd: reopening devd socket\n");
907 + /* Try again after RECONNECT_DELAY */
908 + return RECONNECT_DELAY;
912 +socket_getline(int fd, char **out)
914 + char *buf, *newbuf;
915 + ssize_t ret, cap, sz = 0;
919 + buf = malloc(cap * sizeof(char));
924 + ret = read(sock_devd, &c, 1);
926 + if (errno == EINTR)
930 + /* EOF - devd socket is lost */
931 + } else if (ret == 0) {
932 + disconnect_devd(sock_devd);
933 + rtimer = TimerSet(NULL, 0, 1, reconnect_handler, NULL);
934 + LogMessage(X_WARNING, "config/devd: devd socket is lost\n");
941 + if (sz + 1 >= cap) {
943 + newbuf = realloc(buf, cap * sizeof(char));
960 + /* Number of bytes in the line, not counting the line break */
965 +wakeup_handler(void *data, int err, void *read_mask)
973 + if (FD_ISSET(sock_devd, (fd_set *) read_mask)) {
974 + if (socket_getline(sock_devd, &line) < 0)
977 + walk = strchr(line + 1, ' ');
982 + case DEVD_EVENT_ADD:
983 + device_added(line + 1);
985 + case DEVD_EVENT_REMOVE:
986 + device_removed(line + 1);
996 +block_handler(void *data, struct timeval **tv, void *read_mask)
1001 +config_devd_init(void)
1003 + char devicename[1024];
1006 + LogMessage(X_INFO, "config/devd: probing input devices...\n");
1009 + * Add fake keyboard and give up on keyboards management
1010 + * if kbdmux is enabled
1012 + if ((is_kbdmux = is_kbdmux_enabled()) == true)
1013 + device_added("kbdmux");
1015 + for (i = 0; hw_types[i].driver != NULL; i++) {
1016 + /* First scan the sysctl to determine the hardware */
1017 + for (j = 0; j < 16; j++) {
1018 + if (sysctl_exists(&hw_types[i], j,
1019 + devicename, sizeof(devicename)) != 0)
1020 + device_added(devicename);
1023 + if (devpath_exists(&hw_types[i], devicename, sizeof(devicename)) != 0)
1024 + device_added(devicename);
1027 + if ((sock_devd = connect_devd()) < 0)
1030 + RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
1036 +config_devd_fini(void)
1038 + LogMessage(X_INFO, "config/devd: terminating backend...\n");
1041 + TimerFree(rtimer);
1045 + disconnect_devd(sock_devd);
1047 + RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
1049 + is_console_kbd = false;
1053 [FILE:1081:patches/patch-configure]
1054 --- configure.orig 2020-03-29 20:21:27 UTC
1056 @@ -12056,7 +12056,7 @@ echo 'failed to copy INSTALL from util-m
1062 # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
1063 # check for a man page file found in later versions that use
1064 # traditional section numbers instead
1065 @@ -21782,7 +21782,7 @@ if test `${RAWCPP} < conftest.$ac_ext |
1066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1067 $as_echo "no" >&6; }
1069 - if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
1071 TRADITIONALCPPFLAGS="-traditional"
1072 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1074 @@ -23151,9 +23151,14 @@ $as_echo "#define USE_ALPHA_PIO 1" >>con
1076 GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee"
1081 DEFAULT_INT10="stub"
1084 + $as_echo "#define USE_DEV_IO 1" >>confdefs.h
1092 [FILE:256:patches/patch-hw_kdrive_ephyr_hostx.c]
1093 --- hw/kdrive/ephyr/hostx.c.orig 2020-03-29 20:21:15 UTC
1094 +++ hw/kdrive/ephyr/hostx.c
1096 #include <string.h> /* for memset */
1101 #include <sys/ipc.h>
1102 #include <sys/shm.h>
1105 [FILE:765:patches/patch-hw_xfree86_common_xf86AutoConfig.c]
1106 --- hw/xfree86/common/xf86AutoConfig.c.orig 2020-03-29 20:21:15 UTC
1107 +++ hw/xfree86/common/xf86AutoConfig.c
1108 @@ -294,7 +294,7 @@ listPossibleVideoDrivers(XF86MatchedDriv
1109 xf86PciMatchDriver(md);
1112 -#if defined(__linux__)
1113 +#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
1114 xf86AddMatchedDriver(md, "modesetting");
1117 @@ -302,8 +302,10 @@ listPossibleVideoDrivers(XF86MatchedDriv
1118 /* Fallback to platform default frame buffer driver */
1119 #if !defined(__linux__) && defined(__sparc__)
1120 xf86AddMatchedDriver(md, "wsfb");
1122 +#elif defined(__linux__)
1123 xf86AddMatchedDriver(md, "fbdev");
1124 +#elif defined(__FreeBSD__)
1125 + xf86AddMatchedDriver(md, "scfb");
1131 [FILE:700:patches/patch-hw_xfree86_common_xf86Config.c]
1132 --- hw/xfree86/common/xf86Config.c.orig 2020-03-29 20:21:15 UTC
1133 +++ hw/xfree86/common/xf86Config.c
1134 @@ -1264,13 +1264,16 @@ checkCoreInputDevices(serverLayoutPtr se
1137 if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) {
1138 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1139 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
1140 + defined(CONFIG_DEVD)
1141 const char *config_backend;
1143 #if defined(CONFIG_HAL)
1144 config_backend = "HAL";
1145 #elif defined(CONFIG_UDEV)
1146 config_backend = "udev";
1147 +#elif defined(CONFIG_DEVD)
1148 + config_backend = "devd";
1150 config_backend = "wscons";
1154 [FILE:510:patches/patch-hw_xfree86_common_xf86Globals.c]
1155 --- hw/xfree86/common/xf86Globals.c.orig 2020-03-29 20:21:15 UTC
1156 +++ hw/xfree86/common/xf86Globals.c
1157 @@ -119,7 +119,7 @@ xf86InfoRec xf86Info = {
1158 .miscModInDevEnabled = TRUE,
1159 .miscModInDevAllowNonLocal = FALSE,
1161 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1162 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || defined(CONFIG_DEVD)
1163 .forceInputDevices = FALSE,
1164 .autoAddDevices = TRUE,
1165 .autoEnableDevices = TRUE,
1168 [FILE:690:patches/patch-hw_xfree86_common_xf86Xinput.c]
1169 --- hw/xfree86/common/xf86Xinput.c.orig 2020-03-29 20:21:15 UTC
1170 +++ hw/xfree86/common/xf86Xinput.c
1171 @@ -874,7 +874,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, D
1173 InputDriverPtr drv = NULL;
1174 DeviceIntPtr dev = NULL;
1180 @@ -1037,6 +1037,7 @@ NewInputDeviceRequest(InputOption *optio
1181 if (strcmp(key, "_source") == 0 &&
1182 (strcmp(value, "server/hal") == 0 ||
1183 strcmp(value, "server/udev") == 0 ||
1184 + strcmp(value, "server/devd") == 0 ||
1185 strcmp(value, "server/wscons") == 0)) {
1187 if (!xf86Info.autoAddDevices) {
1190 [FILE:450:patches/patch-hw_xfree86_os-support_bsd_bsd__init.c]
1191 --- hw/xfree86/os-support/bsd/bsd_init.c.orig 2020-03-29 20:21:15 UTC
1192 +++ hw/xfree86/os-support/bsd/bsd_init.c
1193 @@ -230,6 +230,9 @@ xf86OpenConsole()
1194 * Add cases for other *BSD that behave the same.
1196 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
1197 +#if defined(__sparc64__)
1198 + pci_system_init_dev_mem(fd);
1201 i = atof(uts.release) * 100;
1205 [FILE:315:patches/patch-hw_xfree86_os-support_bsd_i386__video.c]
1206 Index: programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c
1207 --- hw/xfree86/os-support/bsd/i386_video.c.orig 2020-03-29 20:21:15 UTC
1208 +++ hw/xfree86/os-support/bsd/i386_video.c
1210 #include "xf86Priv.h"
1213 +#include <sys/types.h>
1214 #include <sys/mman.h>
1216 #include "xf86_OSlib.h"
1219 [FILE:380:patches/patch-hw_xfree86_os-support_bsd_ppc__video.c]
1220 --- hw/xfree86/os-support/bsd/ppc_video.c.orig 2020-03-29 20:21:15 UTC
1221 +++ hw/xfree86/os-support/bsd/ppc_video.c
1222 @@ -79,7 +79,11 @@ xf86DisableIO()
1225 if (ioBase != MAP_FAILED) {
1226 +#if defined(__FreeBSD__)
1227 + munmap(__DEVOLATILE(unsigned char *, ioBase), 0x10000);
1229 munmap(__UNVOLATILE(ioBase), 0x10000);
1231 ioBase = MAP_FAILED;
1236 [FILE:714:patches/patch-hw_xfree86_os-support_solaris_sun__init.c]
1237 --- hw/xfree86/os-support/solaris/sun_init.c.orig 2020-03-29 20:21:15 UTC
1238 +++ hw/xfree86/os-support/solaris/sun_init.c
1239 @@ -54,6 +54,22 @@ static int xf86StartVT = -1;
1240 static int vtEnabled = 0;
1244 +#define VTIOC ('V'<<8)
1245 +#define VT_OPENQRY (VTIOC|1)
1246 +#define VT_SETMODE (VTIOC|2)
1247 +#define VT_GETMODE (VTIOC|3)
1248 +#define VT_ACTIVATE (VTIOC|5)
1249 +#define VT_WAITACTIVE (VTIOC|6)
1250 +#define VT_GETSTATE (VTIOC|100)
1251 +#define VT_ENABLED (VTIOC|101)
1252 +#define VT_SETDISPINFO (VTIOC|103)
1253 +#define VT_GET_CONSUSER (VTIOC|108)
1254 +#define VT_SET_CONSUSER (VTIOC|109)
1256 +enum { VT_AUTO = 0, VT_PROCESS };
1259 /* Device to open as xf86Info.consoleFd */
1260 static char consoleDev[PATH_MAX] = "/dev/fb";
1264 [FILE:193:patches/patch-os_backtrace.c]
1265 --- os/backtrace.c.orig 2020-03-29 20:21:15 UTC
1271 +#include <unistd.h>
1273 #ifdef HAVE_LIBUNWIND
1277 [FILE:1021:patches/patch-test_simple-xinit.c]
1278 --- test/simple-xinit.c.orig 2020-03-29 20:21:15 UTC
1279 +++ test/simple-xinit.c
1281 #include <sys/wait.h>
1285 +#include <sys/varargs.h>
1287 +vasprintf(char **strp, const char *fmt, va_list args)
1289 + va_list args_copy;
1290 + int status, needed;
1292 + va_copy(args_copy, args);
1293 + needed = vsnprintf(NULL, 0, fmt, args_copy);
1294 + va_end(args_copy);
1299 + *strp = malloc(needed + 1);
1300 + if (*strp == NULL)
1302 + status = vsnprintf(*strp, needed + 1, fmt, args);
1313 +asprintf(char **strp, const char *fmt, ...)
1318 + va_start(args, fmt);
1319 + status = vasprintf(strp, fmt, args);
1326 kill_server(int server_pid)
1330 [FILE:215:patches/patch-xkb_Makefile.in]
1331 --- xkb/Makefile.in.orig 2020-03-29 20:21:33 UTC
1333 @@ -936,7 +936,7 @@ info: info-am
1337 -install-data-am: install-dist_xkbcompiledDATA
1340 install-dvi: install-dvi-am
1344 [FILE:135:files/pkg-deinstall-single.in]
1347 PREFIX="${PKG_PREFIX-/raven}"
1351 /bin/rm -rf ${PREFIX}/lib/xorg/modules/extensions/libglx.so*
1356 [FILE:531:files/pkg-install-single.in]
1359 PREFIX="${PKG_PREFIX-/raven}"
1363 if [ -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 ]; then
1364 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1365 ${PREFIX}/lib/xorg/modules/extensions/libglx.so
1366 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1367 ${PREFIX}/lib/xorg/modules/extensions/libglx.so.1
1369 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.xorg/libglx.so \
1370 ${PREFIX}/lib/xorg/modules/extensions/libglx.so