1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
6 VARIANTS= standard virtual dmx xephyr nest wayland
7 SDESC[xephyr]= X server from X.Org based on kdrive
8 SDESC[virtual]= X virtual framebuffer server from X.Org
9 SDESC[wayland]= X Clients under Wayland
10 SDESC[standard]= X.Org X server and related programs
11 SDESC[dmx]= Distributed Multihead X from X.Org
12 SDESC[nest]= Nesting X server from X.Org
13 HOMEPAGE= https://www.x.org/
17 SITES[main]= XORG/individual/xserver
18 DISTFILE[1]= xorg-server-1.20.5.tar.bz2:main
21 SPKGS[virtual]= single
22 SPKGS[wayland]= single
23 SPKGS[standard]= single
27 OPTIONS_AVAILABLE= XORG VIRTUAL DMX XEPHYR NEST WAYLAND DEVD SUID
28 OPTIONS_STANDARD= XORG DEVD SUID
29 VOPTS[xephyr]= XORG=OFF VIRTUAL=OFF DMX=OFF XEPHYR=ON NEST=OFF
30 WAYLAND=OFF DEVD=OFF SUID=OFF
31 VOPTS[virtual]= XORG=OFF VIRTUAL=ON DMX=OFF XEPHYR=OFF NEST=OFF
32 WAYLAND=OFF DEVD=OFF SUID=OFF
33 VOPTS[wayland]= XORG=OFF VIRTUAL=OFF DMX=OFF XEPHYR=OFF NEST=OFF
34 WAYLAND=ON DEVD=OFF SUID=OFF
35 VOPTS[dmx]= XORG=OFF VIRTUAL=OFF DMX=ON XEPHYR=OFF NEST=OFF
36 WAYLAND=OFF DEVD=OFF SUID=OFF
37 VOPTS[nest]= XORG=OFF VIRTUAL=OFF DMX=OFF XEPHYR=OFF NEST=ON
38 WAYLAND=OFF DEVD=OFF SUID=OFF
39 OPT_ON[all]= XORG SUID
41 BUILD_DEPENDS= xorg-fontutil:single:standard
42 xorg-xkbfile:single:standard
43 RUN_DEPENDS= xorg-xkeyboard-config:single:standard
44 xorg-xkbcomp:single:standard
46 USES= gmake libtool perl:build ssl
47 XORG_COMPONENTS= xorgproto xtransproto pixman xshmfence xau xdmcp
51 LICENSE_FILE= MIT:{{WRKSRC}}/COPYING
54 FPC_EQUIVALENT= x11-servers/xorg-server
57 CONFIGURE_ARGS= --with-xkb-path={{LOCALBASE}}/share/X11/xkb
58 --with-fontrootdir={{LOCALBASE}}/share/fonts
63 --with-shared-memory-dir=/tmp
66 --disable-config-udev-kms
67 --disable-install-setuid
72 INSTALL_TARGET= install-strip
74 VAR_OPSYS[sunos]= CFLAGS=-DO_CLOEXEC=0
76 [DEVD].DESCRIPTION= Use devd for autoconfiguration of input devices
78 [NEST].DESCRIPTION= Build as nesting X server
79 [NEST].BUILD_DEPENDS_ON= libepoxy:single:standard
81 [NEST].CONFIGURE_ENABLE_BOTH= xnest
83 [NEST].XORG_COMPONENTS_ON= x11
86 [XEPHYR].DESCRIPTION= Build as kdrive-base X server
87 [XEPHYR].BUILDRUN_DEPENDS_ON= libdrm:single:standard
88 libepoxy:single:standard
89 [XEPHYR].BUILD_DEPENDS_ON= mesa:drivers:standard
90 [XEPHYR].CONFIGURE_ENABLE_BOTH= xephyr
92 [XEPHYR].USES_ON= mesa
93 [XEPHYR].XORG_COMPONENTS_ON= x11
101 [DMX].DESCRIPTION= Build as distributed multihead X server
102 [DMX].BUILD_DEPENDS_ON= libepoxy:single:standard
103 mesa:drivers:standard
104 xorg-xtst:single:standard
105 xorg-xres:single:standard
106 [DMX].CONFIGURE_ENABLE_BOTH= dmx
107 [DMX].XORG_COMPONENTS_ON= dmx
118 [VIRTUAL].DESCRIPTION= Build as virtual framebuffer server
119 [VIRTUAL].BUILD_DEPENDS_ON= libepoxy:single:standard
120 mesa:drivers:standard
121 [VIRTUAL].CONFIGURE_ENABLE_BOTH= xvfb
122 [VIRTUAL].USES_ON= mesa
124 [XORG].DESCRIPTION= Build as X server (don't change setting!)
125 [XORG].BUILDRUN_DEPENDS_ON= libdrm:single:standard
126 libepoxy:single:standard
127 mesa:drivers:standard
128 [XORG].CONFIGURE_ENABLE_BOTH= docs
131 [XORG].SUB_FILES_ON= pkg-install-single
134 [XORG].XORG_COMPONENTS_ON= pciaccess
137 [WAYLAND].DESCRIPTION= Build Wayland X clients
138 [WAYLAND].BUILDRUN_DEPENDS_ON= libdrm:single:standard
139 libepoxy:single:standard
140 wayland:primary:standard
141 [WAYLAND].BUILD_DEPENDS_ON= mesa:drivers:standard
142 wayland-protocols:single:standard
143 evdev-proto:single:standard
144 [WAYLAND].CONFIGURE_ARGS_ON= --disable-xquartz
146 [WAYLAND].CONFIGURE_ENABLE_BOTH= xwayland
147 [WAYLAND].XORG_COMPONENTS_ON= x11
150 [SUID].DESCRIPTION= Install the Xorg server with setuid bit set
153 # build libglx.so but don't install it yet. (done in pre-install)
154 ${REINPLACE_CMD} -e 's|@GLX_TRUE@GLXMODS =|@GLX_BOGUS@GLXMODS =|g' \
155 -e 's|^LTLIBRARIES = |LTLIBRARIES = libglx.la |g' \
156 ${WRKSRC}/hw/xfree86/dixmods/Makefile.in
158 do-install-XEPHYR-ON:
159 (cd ${WRKSRC}/hw/kdrive/ephyr && \
160 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
162 do-install-WAYLAND-ON:
163 (cd ${WRKSRC}/hw/xwayland && \
164 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
166 post-install-XORG-OFF:
167 ${RM} -r ${STAGEDIR}${PREFIX}/lib/xorg
168 ${RM} ${STAGEDIR}${PREFIX}/share/man/man1/Xserver.1
170 post-configure-DEVD-ON:
171 ${REINPLACE_CMD} -e 's|config\.c|config.c devd.c|g' \
172 -e 's|config\.lo|config.lo devd.lo|g' \
173 ${WRKSRC}/config/Makefile
174 ${REINPLACE_CMD} -e 's|^/\* #undef CONFIG_UDEV \*/|#define CONFIG_DEVD 1|' \
175 ${WRKSRC}/include/dix-config.h
177 do-install-VIRTUAL-ON:
178 (cd ${WRKSRC}/hw/vfb && \
179 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
182 (cd ${WRKSRC}/hw/xnest && \
183 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
186 (cd ${WRKSRC}/hw/dmx && \
187 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
189 post-install-XORG-ON:
190 # The .xorg dir because else the xorg-server might not load the
191 # correct libglx module.
192 @${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg
193 ${INSTALL_LIB} ${WRKSRC}/hw/xfree86/dixmods/.libs/libglx.so \
194 ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg/
195 @${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d
196 ${RM} -r ${STAGEDIR}/var
198 [FILE:71:descriptions/desc.single.standard]
199 This package contains the X.Org X server and some associated programs.
202 [FILE:60:descriptions/desc.single.virtual]
203 This package contains Xvfb, a virtual framebuffer X server.
206 [FILE:287:descriptions/desc.single.dmx]
207 Xdmx is proxy X server that provides multi-head support for multiple
208 displays attached to different machines (each of which is running a
209 typical X server). When Xinerama is used with Xdmx, the multiple displays
210 on multiple machines are presented to the user as a single unified screen.
213 [FILE:173:descriptions/desc.single.xephyr]
214 Xephyr is a kdrive server that outputs to a window on a pre-existing
215 'host' X display. Think Xnest but with support for modern extensions
216 like composite, damage and randr.
219 [FILE:78:descriptions/desc.single.nest]
220 This package contains Xnest, a nesting X Server that displays on an X
224 [FILE:148:descriptions/desc.single.wayland]
225 XWayland is an X Server running as a Wayland client, thus capable of
226 displaying native X11 client applications in a Wayland compositor
231 a81d8243f37e75a03d4f8c55f96d0bc25802be6ec45c3bfa5cb614c6d01bac9d 6126757 xorg-server-1.20.5.tar.bz2
234 [FILE:2523:manifests/plist.single.standard]
235 %%ONLY-SUNOS%%include/xorg/solaris-amd64.il
237 %%SUID-ON%%@(,,4555) bin/Xorg
404 lib/pkgconfig/xorg-server.pc
405 lib/xorg/protocol.txt
417 lib/xorg/modules/drivers/modesetting_drv.so
418 lib/xorg/modules/extensions/.xorg/libglx.so
419 share/aclocal/xorg-server.m4
432 @dir etc/X11/xorg.conf.d
435 [FILE:34:manifests/plist.single.virtual]
437 share/man/man1/Xvfb.1.gz
440 [FILE:214:manifests/plist.single.dmx]
461 [FILE:38:manifests/plist.single.xephyr]
463 share/man/man1/Xephyr.1.gz
466 [FILE:36:manifests/plist.single.nest]
468 share/man/man1/Xnest.1.gz
471 [FILE:13:manifests/plist.single.wayland]
475 [FILE:293:patches/patch-config_config-backends.h]
476 --- config/config-backends.h.orig 2019-02-26 19:28:50 UTC
477 +++ config/config-backends.h
478 @@ -44,3 +44,8 @@ void config_hal_fini(void);
479 int config_wscons_init(void);
480 void config_wscons_fini(void);
484 +int config_devd_init(void);
485 +void config_devd_fini(void);
489 [FILE:537:patches/patch-config_config.c]
490 --- config/config.c.orig 2019-02-26 19:28:50 UTC
492 @@ -55,6 +55,9 @@ config_init(void)
493 #elif defined(CONFIG_WSCONS)
494 if (!config_wscons_init())
495 ErrorF("[config] failed to initialise wscons\n");
496 +#elif defined(CONFIG_DEVD)
497 + if (!config_devd_init())
498 + ErrorF("[config] failed to initialise devd\n");
502 @@ -67,6 +70,8 @@ config_fini(void)
504 #elif defined(CONFIG_WSCONS)
505 config_wscons_fini();
506 +#elif defined(CONFIG_DEVD)
507 + config_devd_fini();
513 [FILE:12171:patches/patch-config_devd.c]
514 --- /dev/null 2019-03-03 23:20:54 UTC
518 + * Copyright (c) 2012 Baptiste Daroussin
519 + * Copyright (c) 2013, 2014 Alex Kozlov
520 + * Copyright (c) 2014 Robert Millan
521 + * Copyright (c) 2014 Jean-Sebastien Pedron
523 + * Permission is hereby granted, free of charge, to any person obtaining a
524 + * copy of this software and associated documentation files (the "Software"),
525 + * to deal in the Software without restriction, including without limitation
526 + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
527 + * and/or sell copies of the Software, and to permit persons to whom the
528 + * Software is furnished to do so, subject to the following conditions:
530 + * The above copyright notice and this permission notice (including the next
531 + * paragraph) shall be included in all copies or substantial portions of the
534 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
535 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
536 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
537 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
538 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
539 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
540 + * DEALINGS IN THE SOFTWARE.
542 + * Author: Baptiste Daroussin <bapt@FreeBSD.org>
545 +#ifdef HAVE_DIX_CONFIG_H
546 +#include <dix-config.h>
549 +#include <sys/types.h>
550 +#include <sys/kbio.h>
551 +#include <sys/socket.h>
552 +#include <sys/stat.h>
553 +#include <sys/sysctl.h>
561 +#include <stdbool.h>
565 +#include "inputstr.h"
566 +#include "hotplug.h"
567 +#include "config-backends.h"
570 +#define DEVD_SOCK_PATH "/var/run/devd.pipe"
572 +#define DEVD_EVENT_ADD '+'
573 +#define DEVD_EVENT_REMOVE '-'
575 +#define RECONNECT_DELAY 5 * 1000
577 +static int sock_devd;
578 +static bool is_console_kbd = false;
579 +static bool is_kbdmux = false;
580 +static OsTimerPtr rtimer = NULL;
583 + const char *driver;
585 + const char *xdriver;
588 +static struct hw_type hw_types[] = {
589 + { "ukbd", ATTR_KEYBOARD, "kbd" },
590 + { "atkbd", ATTR_KEYBOARD, "kbd" },
591 + { "kbdmux", ATTR_KEYBOARD, "kbd" },
592 + { "sysmouse", ATTR_POINTER, "mouse" },
593 + { "ums", ATTR_POINTER, "mouse" },
594 + { "psm", ATTR_POINTER, "mouse" },
595 + { "vboxguest", ATTR_POINTER, "vboxmouse" },
596 + { "joy", ATTR_JOYSTICK, NULL },
597 + { "atp", ATTR_TOUCHPAD, NULL },
598 + { "uep", ATTR_TOUCHSCREEN, NULL },
599 + { NULL, -1, NULL },
603 +sysctl_exists(const struct hw_type *device, int unit,
604 + char *devname, size_t devname_len)
606 + char sysctlname[PATH_MAX];
610 + if (device == NULL || device->driver == NULL)
613 + /* Check if a sysctl exists. */
614 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%i.%%desc",
615 + device->driver, unit);
616 + ret = sysctlbyname(sysctlname, NULL, &len, NULL, 0);
618 + if (ret == 0 && len > 0) {
619 + snprintf(devname, devname_len, "%s%i", device->driver, unit);
627 +devpath_exists(const struct hw_type *device,
628 + char *devname, size_t devname_len)
634 + if (device == NULL || device->driver == NULL)
637 + /* Check if /dev/$driver exists. */
638 + asprintf(&devpath, "/dev/%s", device->driver);
639 + if (devpath == NULL)
642 + ret = stat(devpath, &st);
646 + strncpy(devname, device->driver, devname_len);
654 +sysctl_get_str(const char *sysctlname)
659 + if (sysctlname == NULL)
662 + if (sysctlbyname(sysctlname, NULL, &len, NULL, 0) == 0) {
663 + dest = malloc(len + 1);
665 + if (sysctlbyname(sysctlname, dest, &len, NULL, 0) == 0)
678 +device_added(const char *devname)
680 + char path[PATH_MAX];
681 + char sysctlname[PATH_MAX];
683 + char *product = NULL;
684 + char *config_info = NULL;
686 + InputOption *options = NULL;
687 + InputAttributes attrs = { };
688 + DeviceIntPtr dev = NULL;
692 + for (i = 0; hw_types[i].driver != NULL; i++) {
695 + len = strlen(hw_types[i].driver);
696 + if (strcmp(devname, hw_types[i].driver) == 0 ||
697 + (strncmp(devname, hw_types[i].driver, len) == 0 &&
698 + isnumber(*(devname + len)))) {
699 + attrs.flags |= hw_types[i].flag;
704 + if (hw_types[i].driver == NULL || hw_types[i].xdriver == NULL) {
705 + LogMessage(X_INFO, "config/devd: ignoring device %s\n",
710 + /* Skip keyboard devices if kbdmux is enabled */
711 + if (is_kbdmux && is_console_kbd && hw_types[i].flag & ATTR_KEYBOARD) {
712 + LogMessage(X_INFO, "config/devd: kbdmux is enabled, ignoring device %s\n",
717 + snprintf(path, sizeof(path), "/dev/%s", devname);
719 + options = input_option_new(NULL, "_source", "server/devd");
723 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%s.%%desc",
724 + hw_types[i].driver, devname + strlen(hw_types[i].driver));
725 + vendor = sysctl_get_str(sysctlname);
726 + if (vendor == NULL) {
727 + options = input_option_new(options, "name", devname);
730 + if ((walk = strchr(vendor, ' ')) != NULL) {
734 + if ((walk = strchr(product, ',')) != NULL)
738 + attrs.vendor = strdup(vendor);
740 + attrs.product = strdup(product);
741 + options = input_option_new(options, "name", product);
744 + options = input_option_new(options, "name", "(unnamed)");
749 + /* XXX implement usb_id */
750 + attrs.usb_id = NULL;
751 + attrs.device = strdup(path);
752 + options = input_option_new(options, "driver", hw_types[i].xdriver);
754 + fd = open(path, O_RDONLY);
757 + options = input_option_new(options, "device", path);
760 + if (attrs.flags & ~ATTR_KEYBOARD) {
761 + LogMessage(X_INFO, "config/devd: device %s already opened\n",
765 + * Fail if cannot open device, it breaks AllowMouseOpenFail,
766 + * but it should not matter when config/devd enabled
771 + if (is_console_kbd) {
773 + * There can be only one keyboard attached to console and
774 + * it is already added.
776 + LogMessage(X_WARNING, "config/devd: console keyboard is "
777 + "already added, ignoring %s (%s)\n",
778 + attrs.product, path);
783 + * Don't pass "device" option if the keyboard is already
784 + * attached to the console (ie. open() fails).
785 + * This would activate a special logic in xf86-input-keyboard.
786 + * Prevent any other attached to console keyboards being
787 + * processed. There can be only one such device.
789 + is_console_kbd = true;
792 + if (asprintf(&config_info, "devd:%s", devname) == -1) {
793 + config_info = NULL;
797 + if (device_is_duplicate(config_info)) {
798 + LogMessage(X_WARNING, "config/devd: device %s (%s) already added. "
799 + "ignoring\n", attrs.product, path);
803 + options = input_option_new(options, "config_info", config_info);
804 + LogMessage(X_INFO, "config/devd: adding input device %s (%s)\n",
805 + attrs.product, path);
807 + NewInputDeviceRequest(options, &attrs, &dev);
811 + input_option_free_list(&options);
812 + free(attrs.usb_id);
813 + free(attrs.product);
814 + free(attrs.device);
815 + free(attrs.vendor);
819 +device_removed(char *devname)
823 + if (asprintf(&config_info, "devd:%s", devname) == -1)
826 + remove_devices("devd", config_info);
831 +static bool is_kbdmux_enabled(void)
833 + /* Xorg uses /dev/ttyv0 as a console device */
834 + /* const char device[]="/dev/console"; */
835 + const char device[]="/dev/ttyv0";
836 + keyboard_info_t info;
839 + fd = open(device, O_RDONLY);
844 + if (ioctl(fd, KDGKBINFO, &info) == -1) {
851 + if (!strncmp(info.kb_name, "kbdmux", 6))
858 +disconnect_devd(int sock)
861 + RemoveGeneralSocket(sock);
869 + struct sockaddr_un devd;
872 + sock = socket(AF_UNIX, SOCK_STREAM, 0);
874 + LogMessage(X_ERROR, "config/devd: fail opening stream socket\n");
878 + devd.sun_family = AF_UNIX;
879 + strlcpy(devd.sun_path, DEVD_SOCK_PATH, sizeof(devd.sun_path));
881 + if (connect(sock, (struct sockaddr *) &devd, sizeof(devd)) < 0) {
883 + LogMessage(X_ERROR, "config/devd: fail to connect to devd\n");
887 + AddGeneralSocket(sock);
893 +reconnect_handler(OsTimerPtr timer, CARD32 time, void *arg)
897 + if ((newsock = connect_devd()) > 0) {
898 + sock_devd = newsock;
901 + LogMessage(X_INFO, "config/devd: reopening devd socket\n");
905 + /* Try again after RECONNECT_DELAY */
906 + return RECONNECT_DELAY;
910 +socket_getline(int fd, char **out)
912 + char *buf, *newbuf;
913 + ssize_t ret, cap, sz = 0;
917 + buf = malloc(cap * sizeof(char));
922 + ret = read(sock_devd, &c, 1);
924 + if (errno == EINTR)
928 + /* EOF - devd socket is lost */
929 + } else if (ret == 0) {
930 + disconnect_devd(sock_devd);
931 + rtimer = TimerSet(NULL, 0, 1, reconnect_handler, NULL);
932 + LogMessage(X_WARNING, "config/devd: devd socket is lost\n");
939 + if (sz + 1 >= cap) {
941 + newbuf = realloc(buf, cap * sizeof(char));
958 + /* Number of bytes in the line, not counting the line break */
963 +wakeup_handler(void *data, int err, void *read_mask)
971 + if (FD_ISSET(sock_devd, (fd_set *) read_mask)) {
972 + if (socket_getline(sock_devd, &line) < 0)
975 + walk = strchr(line + 1, ' ');
980 + case DEVD_EVENT_ADD:
981 + device_added(line + 1);
983 + case DEVD_EVENT_REMOVE:
984 + device_removed(line + 1);
994 +block_handler(void *data, struct timeval **tv, void *read_mask)
999 +config_devd_init(void)
1001 + char devicename[1024];
1004 + LogMessage(X_INFO, "config/devd: probing input devices...\n");
1007 + * Add fake keyboard and give up on keyboards management
1008 + * if kbdmux is enabled
1010 + if ((is_kbdmux = is_kbdmux_enabled()) == true)
1011 + device_added("kbdmux");
1013 + for (i = 0; hw_types[i].driver != NULL; i++) {
1014 + /* First scan the sysctl to determine the hardware */
1015 + for (j = 0; j < 16; j++) {
1016 + if (sysctl_exists(&hw_types[i], j,
1017 + devicename, sizeof(devicename)) != 0)
1018 + device_added(devicename);
1021 + if (devpath_exists(&hw_types[i], devicename, sizeof(devicename)) != 0)
1022 + device_added(devicename);
1025 + if ((sock_devd = connect_devd()) < 0)
1028 + RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
1034 +config_devd_fini(void)
1036 + LogMessage(X_INFO, "config/devd: terminating backend...\n");
1039 + TimerFree(rtimer);
1043 + disconnect_devd(sock_devd);
1045 + RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
1047 + is_console_kbd = false;
1051 [FILE:1081:patches/patch-configure]
1052 --- configure.orig 2019-02-26 19:28:59 UTC
1054 @@ -12061,7 +12061,7 @@ echo 'failed to copy INSTALL from util-m
1060 # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
1061 # check for a man page file found in later versions that use
1062 # traditional section numbers instead
1063 @@ -21772,7 +21772,7 @@ if test `${RAWCPP} < conftest.$ac_ext |
1064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1065 $as_echo "no" >&6; }
1067 - if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
1069 TRADITIONALCPPFLAGS="-traditional"
1070 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1072 @@ -23141,9 +23141,14 @@ $as_echo "#define USE_ALPHA_PIO 1" >>con
1074 GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee"
1079 DEFAULT_INT10="stub"
1082 + $as_echo "#define USE_DEV_IO 1" >>confdefs.h
1090 [FILE:256:patches/patch-hw_kdrive_ephyr_hostx.c]
1091 --- hw/kdrive/ephyr/hostx.c.orig 2019-02-26 19:28:50 UTC
1092 +++ hw/kdrive/ephyr/hostx.c
1094 #include <string.h> /* for memset */
1099 #include <sys/ipc.h>
1100 #include <sys/shm.h>
1103 [FILE:765:patches/patch-hw_xfree86_common_xf86AutoConfig.c]
1104 --- hw/xfree86/common/xf86AutoConfig.c.orig 2019-02-26 19:28:50 UTC
1105 +++ hw/xfree86/common/xf86AutoConfig.c
1106 @@ -294,7 +294,7 @@ listPossibleVideoDrivers(XF86MatchedDriv
1107 xf86PciMatchDriver(md);
1110 -#if defined(__linux__)
1111 +#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
1112 xf86AddMatchedDriver(md, "modesetting");
1115 @@ -302,8 +302,10 @@ listPossibleVideoDrivers(XF86MatchedDriv
1116 /* Fallback to platform default frame buffer driver */
1117 #if !defined(__linux__) && defined(__sparc__)
1118 xf86AddMatchedDriver(md, "wsfb");
1120 +#elif defined(__linux__)
1121 xf86AddMatchedDriver(md, "fbdev");
1122 +#elif defined(__FreeBSD__)
1123 + xf86AddMatchedDriver(md, "scfb");
1129 [FILE:700:patches/patch-hw_xfree86_common_xf86Config.c]
1130 --- hw/xfree86/common/xf86Config.c.orig 2019-02-26 19:28:50 UTC
1131 +++ hw/xfree86/common/xf86Config.c
1132 @@ -1264,13 +1264,16 @@ checkCoreInputDevices(serverLayoutPtr se
1135 if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) {
1136 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1137 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
1138 + defined(CONFIG_DEVD)
1139 const char *config_backend;
1141 #if defined(CONFIG_HAL)
1142 config_backend = "HAL";
1143 #elif defined(CONFIG_UDEV)
1144 config_backend = "udev";
1145 +#elif defined(CONFIG_DEVD)
1146 + config_backend = "devd";
1148 config_backend = "wscons";
1152 [FILE:510:patches/patch-hw_xfree86_common_xf86Globals.c]
1153 --- hw/xfree86/common/xf86Globals.c.orig 2019-02-26 19:28:50 UTC
1154 +++ hw/xfree86/common/xf86Globals.c
1155 @@ -119,7 +119,7 @@ xf86InfoRec xf86Info = {
1156 .miscModInDevEnabled = TRUE,
1157 .miscModInDevAllowNonLocal = FALSE,
1159 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1160 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || defined(CONFIG_DEVD)
1161 .forceInputDevices = FALSE,
1162 .autoAddDevices = TRUE,
1163 .autoEnableDevices = TRUE,
1166 [FILE:690:patches/patch-hw_xfree86_common_xf86Xinput.c]
1167 --- hw/xfree86/common/xf86Xinput.c.orig 2019-02-26 19:28:50 UTC
1168 +++ hw/xfree86/common/xf86Xinput.c
1169 @@ -874,7 +874,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, D
1171 InputDriverPtr drv = NULL;
1172 DeviceIntPtr dev = NULL;
1178 @@ -1037,6 +1037,7 @@ NewInputDeviceRequest(InputOption *optio
1179 if (strcmp(key, "_source") == 0 &&
1180 (strcmp(value, "server/hal") == 0 ||
1181 strcmp(value, "server/udev") == 0 ||
1182 + strcmp(value, "server/devd") == 0 ||
1183 strcmp(value, "server/wscons") == 0)) {
1185 if (!xf86Info.autoAddDevices) {
1188 [FILE:450:patches/patch-hw_xfree86_os-support_bsd_bsd__init.c]
1189 --- hw/xfree86/os-support/bsd/bsd_init.c.orig 2019-02-26 19:28:50 UTC
1190 +++ hw/xfree86/os-support/bsd/bsd_init.c
1191 @@ -230,6 +230,9 @@ xf86OpenConsole()
1192 * Add cases for other *BSD that behave the same.
1194 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
1195 +#if defined(__sparc64__)
1196 + pci_system_init_dev_mem(fd);
1199 i = atof(uts.release) * 100;
1203 [FILE:315:patches/patch-hw_xfree86_os-support_bsd_i386__video.c]
1204 Index: programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c
1205 --- hw/xfree86/os-support/bsd/i386_video.c.orig 2019-02-26 19:28:50 UTC
1206 +++ hw/xfree86/os-support/bsd/i386_video.c
1208 #include "xf86Priv.h"
1211 +#include <sys/types.h>
1212 #include <sys/mman.h>
1214 #include "xf86_OSlib.h"
1217 [FILE:380:patches/patch-hw_xfree86_os-support_bsd_ppc__video.c]
1218 --- hw/xfree86/os-support/bsd/ppc_video.c.orig 2019-02-26 19:28:50 UTC
1219 +++ hw/xfree86/os-support/bsd/ppc_video.c
1220 @@ -79,7 +79,11 @@ xf86DisableIO()
1223 if (ioBase != MAP_FAILED) {
1224 +#if defined(__FreeBSD__)
1225 + munmap(__DEVOLATILE(unsigned char *, ioBase), 0x10000);
1227 munmap(__UNVOLATILE(ioBase), 0x10000);
1229 ioBase = MAP_FAILED;
1234 [FILE:714:patches/patch-hw_xfree86_os-support_solaris_sun__init.c]
1235 --- hw/xfree86/os-support/solaris/sun_init.c.orig 2019-02-26 19:28:50 UTC
1236 +++ hw/xfree86/os-support/solaris/sun_init.c
1237 @@ -54,6 +54,22 @@ static int xf86StartVT = -1;
1238 static int vtEnabled = 0;
1242 +#define VTIOC ('V'<<8)
1243 +#define VT_OPENQRY (VTIOC|1)
1244 +#define VT_SETMODE (VTIOC|2)
1245 +#define VT_GETMODE (VTIOC|3)
1246 +#define VT_ACTIVATE (VTIOC|5)
1247 +#define VT_WAITACTIVE (VTIOC|6)
1248 +#define VT_GETSTATE (VTIOC|100)
1249 +#define VT_ENABLED (VTIOC|101)
1250 +#define VT_SETDISPINFO (VTIOC|103)
1251 +#define VT_GET_CONSUSER (VTIOC|108)
1252 +#define VT_SET_CONSUSER (VTIOC|109)
1254 +enum { VT_AUTO = 0, VT_PROCESS };
1257 /* Device to open as xf86Info.consoleFd */
1258 static char consoleDev[PATH_MAX] = "/dev/fb";
1262 [FILE:193:patches/patch-os_backtrace.c]
1263 --- os/backtrace.c.orig 2019-02-26 19:28:50 UTC
1269 +#include <unistd.h>
1271 #ifdef HAVE_LIBUNWIND
1275 [FILE:1021:patches/patch-test_simple-xinit.c]
1276 --- test/simple-xinit.c.orig 2019-02-26 19:28:50 UTC
1277 +++ test/simple-xinit.c
1279 #include <sys/wait.h>
1283 +#include <sys/varargs.h>
1285 +vasprintf(char **strp, const char *fmt, va_list args)
1287 + va_list args_copy;
1288 + int status, needed;
1290 + va_copy(args_copy, args);
1291 + needed = vsnprintf(NULL, 0, fmt, args_copy);
1292 + va_end(args_copy);
1297 + *strp = malloc(needed + 1);
1298 + if (*strp == NULL)
1300 + status = vsnprintf(*strp, needed + 1, fmt, args);
1311 +asprintf(char **strp, const char *fmt, ...)
1316 + va_start(args, fmt);
1317 + status = vasprintf(strp, fmt, args);
1324 kill_server(int server_pid)
1328 [FILE:215:patches/patch-xkb_Makefile.in]
1329 --- xkb/Makefile.in.orig 2019-02-26 19:29:04 UTC
1331 @@ -936,7 +936,7 @@ info: info-am
1335 -install-data-am: install-dist_xkbcompiledDATA
1338 install-dvi: install-dvi-am
1342 [FILE:135:files/pkg-deinstall-single.in]
1345 PREFIX="${PKG_PREFIX-/raven}"
1349 /bin/rm -rf ${PREFIX}/lib/xorg/modules/extensions/libglx.so*
1354 [FILE:531:files/pkg-install-single.in]
1357 PREFIX="${PKG_PREFIX-/raven}"
1361 if [ -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 ]; then
1362 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1363 ${PREFIX}/lib/xorg/modules/extensions/libglx.so
1364 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1365 ${PREFIX}/lib/xorg/modules/extensions/libglx.so.1
1367 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.xorg/libglx.so \
1368 ${PREFIX}/lib/xorg/modules/extensions/libglx.so