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.3.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].BROKEN_ON= Wayland itself not yet implemented
139 [WAYLAND].BUILDRUN_DEPENDS_ON= libdrm:single:standard
140 libepoxy:single:standard
141 [WAYLAND].BUILD_DEPENDS_ON= mesa:drivers:standard
142 [WAYLAND].CONFIGURE_ARGS_ON= --disable-xquartz
144 [WAYLAND].CONFIGURE_ENABLE_BOTH= xwayland
145 [WAYLAND].XORG_COMPONENTS_ON= x11
148 [SUID].DESCRIPTION= Install the Xorg server with setuid bit set
151 # build libglx.so but don't install it yet. (done in pre-install)
152 ${REINPLACE_CMD} -e 's|@GLX_TRUE@GLXMODS =|@GLX_BOGUS@GLXMODS =|g' \
153 -e 's|^LTLIBRARIES = |LTLIBRARIES = libglx.la |g' \
154 ${WRKSRC}/hw/xfree86/dixmods/Makefile.in
156 do-install-XEPHYR-ON:
157 (cd ${WRKSRC}/hw/kdrive/ephyr && \
158 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
160 do-install-WAYLAND-ON:
161 (cd ${WRKSRC}/hw/xwayland && \
162 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
164 post-install-XORG-OFF:
165 ${RM} -r ${STAGEDIR}${PREFIX}/lib/xorg
166 ${RM} ${STAGEDIR}${PREFIX}/share/man/man1/Xserver.1
168 post-configure-DEVD-ON:
169 ${REINPLACE_CMD} -e 's|config\.c|config.c devd.c|g' \
170 -e 's|config\.lo|config.lo devd.lo|g' \
171 ${WRKSRC}/config/Makefile
172 ${REINPLACE_CMD} -e 's|^/\* #undef CONFIG_UDEV \*/|#define CONFIG_DEVD 1|' \
173 ${WRKSRC}/include/dix-config.h
175 do-install-VIRTUAL-ON:
176 (cd ${WRKSRC}/hw/vfb && \
177 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
180 (cd ${WRKSRC}/hw/xnest && \
181 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
184 (cd ${WRKSRC}/hw/dmx && \
185 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
187 post-install-XORG-ON:
188 # The .xorg dir because else the xorg-server might not load the
189 # correct libglx module.
190 @${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg
191 ${INSTALL_LIB} ${WRKSRC}/hw/xfree86/dixmods/.libs/libglx.so \
192 ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg/
193 @${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d
194 ${RM} -r ${STAGEDIR}/var
196 [FILE:71:descriptions/desc.single.standard]
197 This package contains the X.Org X server and some associated programs.
200 [FILE:60:descriptions/desc.single.virtual]
201 This package contains Xvfb, a virtual framebuffer X server.
204 [FILE:287:descriptions/desc.single.dmx]
205 Xdmx is proxy X server that provides multi-head support for multiple
206 displays attached to different machines (each of which is running a
207 typical X server). When Xinerama is used with Xdmx, the multiple displays
208 on multiple machines are presented to the user as a single unified screen.
211 [FILE:173:descriptions/desc.single.xephyr]
212 Xephyr is a kdrive server that outputs to a window on a pre-existing
213 'host' X display. Think Xnest but with support for modern extensions
214 like composite, damage and randr.
217 [FILE:78:descriptions/desc.single.nest]
218 This package contains Xnest, a nesting X Server that displays on an X
222 [FILE:148:descriptions/desc.single.wayland]
223 XWayland is an X Server running as a Wayland client, thus capable of
224 displaying native X11 client applications in a Wayland compositor
229 1b3ce466c12cacbe2252b3ad5b0ed561972eef9d09e75900d65fb1e21f9201de 6205000 xorg-server-1.20.3.tar.bz2
232 [FILE:2523:manifests/plist.single.standard]
233 %%ONLY-SUNOS%%include/xorg/solaris-amd64.il
235 %%SUID-ON%%@(,,4555) bin/Xorg
402 lib/pkgconfig/xorg-server.pc
403 lib/xorg/protocol.txt
415 lib/xorg/modules/drivers/modesetting_drv.so
416 lib/xorg/modules/extensions/.xorg/libglx.so
417 share/aclocal/xorg-server.m4
430 @dir etc/X11/xorg.conf.d
433 [FILE:34:manifests/plist.single.virtual]
435 share/man/man1/Xvfb.1.gz
438 [FILE:214:manifests/plist.single.dmx]
459 [FILE:38:manifests/plist.single.xephyr]
461 share/man/man1/Xephyr.1.gz
464 [FILE:36:manifests/plist.single.nest]
466 share/man/man1/Xnest.1.gz
469 [FILE:13:manifests/plist.single.wayland]
473 [FILE:293:patches/patch-config_config-backends.h]
474 --- config/config-backends.h.orig 2018-10-25 14:13:21 UTC
475 +++ config/config-backends.h
476 @@ -44,3 +44,8 @@ void config_hal_fini(void);
477 int config_wscons_init(void);
478 void config_wscons_fini(void);
482 +int config_devd_init(void);
483 +void config_devd_fini(void);
487 [FILE:537:patches/patch-config_config.c]
488 --- config/config.c.orig 2018-10-25 14:13:21 UTC
490 @@ -55,6 +55,9 @@ config_init(void)
491 #elif defined(CONFIG_WSCONS)
492 if (!config_wscons_init())
493 ErrorF("[config] failed to initialise wscons\n");
494 +#elif defined(CONFIG_DEVD)
495 + if (!config_devd_init())
496 + ErrorF("[config] failed to initialise devd\n");
500 @@ -67,6 +70,8 @@ config_fini(void)
502 #elif defined(CONFIG_WSCONS)
503 config_wscons_fini();
504 +#elif defined(CONFIG_DEVD)
505 + config_devd_fini();
511 [FILE:12171:patches/patch-config_devd.c]
512 --- /dev/null 2018-10-26 15:33:17 UTC
516 + * Copyright (c) 2012 Baptiste Daroussin
517 + * Copyright (c) 2013, 2014 Alex Kozlov
518 + * Copyright (c) 2014 Robert Millan
519 + * Copyright (c) 2014 Jean-Sebastien Pedron
521 + * Permission is hereby granted, free of charge, to any person obtaining a
522 + * copy of this software and associated documentation files (the "Software"),
523 + * to deal in the Software without restriction, including without limitation
524 + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
525 + * and/or sell copies of the Software, and to permit persons to whom the
526 + * Software is furnished to do so, subject to the following conditions:
528 + * The above copyright notice and this permission notice (including the next
529 + * paragraph) shall be included in all copies or substantial portions of the
532 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
533 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
534 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
535 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
536 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
537 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
538 + * DEALINGS IN THE SOFTWARE.
540 + * Author: Baptiste Daroussin <bapt@FreeBSD.org>
543 +#ifdef HAVE_DIX_CONFIG_H
544 +#include <dix-config.h>
547 +#include <sys/types.h>
548 +#include <sys/kbio.h>
549 +#include <sys/socket.h>
550 +#include <sys/stat.h>
551 +#include <sys/sysctl.h>
559 +#include <stdbool.h>
563 +#include "inputstr.h"
564 +#include "hotplug.h"
565 +#include "config-backends.h"
568 +#define DEVD_SOCK_PATH "/var/run/devd.pipe"
570 +#define DEVD_EVENT_ADD '+'
571 +#define DEVD_EVENT_REMOVE '-'
573 +#define RECONNECT_DELAY 5 * 1000
575 +static int sock_devd;
576 +static bool is_console_kbd = false;
577 +static bool is_kbdmux = false;
578 +static OsTimerPtr rtimer = NULL;
581 + const char *driver;
583 + const char *xdriver;
586 +static struct hw_type hw_types[] = {
587 + { "ukbd", ATTR_KEYBOARD, "kbd" },
588 + { "atkbd", ATTR_KEYBOARD, "kbd" },
589 + { "kbdmux", ATTR_KEYBOARD, "kbd" },
590 + { "sysmouse", ATTR_POINTER, "mouse" },
591 + { "ums", ATTR_POINTER, "mouse" },
592 + { "psm", ATTR_POINTER, "mouse" },
593 + { "vboxguest", ATTR_POINTER, "vboxmouse" },
594 + { "joy", ATTR_JOYSTICK, NULL },
595 + { "atp", ATTR_TOUCHPAD, NULL },
596 + { "uep", ATTR_TOUCHSCREEN, NULL },
597 + { NULL, -1, NULL },
601 +sysctl_exists(const struct hw_type *device, int unit,
602 + char *devname, size_t devname_len)
604 + char sysctlname[PATH_MAX];
608 + if (device == NULL || device->driver == NULL)
611 + /* Check if a sysctl exists. */
612 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%i.%%desc",
613 + device->driver, unit);
614 + ret = sysctlbyname(sysctlname, NULL, &len, NULL, 0);
616 + if (ret == 0 && len > 0) {
617 + snprintf(devname, devname_len, "%s%i", device->driver, unit);
625 +devpath_exists(const struct hw_type *device,
626 + char *devname, size_t devname_len)
632 + if (device == NULL || device->driver == NULL)
635 + /* Check if /dev/$driver exists. */
636 + asprintf(&devpath, "/dev/%s", device->driver);
637 + if (devpath == NULL)
640 + ret = stat(devpath, &st);
644 + strncpy(devname, device->driver, devname_len);
652 +sysctl_get_str(const char *sysctlname)
657 + if (sysctlname == NULL)
660 + if (sysctlbyname(sysctlname, NULL, &len, NULL, 0) == 0) {
661 + dest = malloc(len + 1);
663 + if (sysctlbyname(sysctlname, dest, &len, NULL, 0) == 0)
676 +device_added(const char *devname)
678 + char path[PATH_MAX];
679 + char sysctlname[PATH_MAX];
681 + char *product = NULL;
682 + char *config_info = NULL;
684 + InputOption *options = NULL;
685 + InputAttributes attrs = { };
686 + DeviceIntPtr dev = NULL;
690 + for (i = 0; hw_types[i].driver != NULL; i++) {
693 + len = strlen(hw_types[i].driver);
694 + if (strcmp(devname, hw_types[i].driver) == 0 ||
695 + (strncmp(devname, hw_types[i].driver, len) == 0 &&
696 + isnumber(*(devname + len)))) {
697 + attrs.flags |= hw_types[i].flag;
702 + if (hw_types[i].driver == NULL || hw_types[i].xdriver == NULL) {
703 + LogMessage(X_INFO, "config/devd: ignoring device %s\n",
708 + /* Skip keyboard devices if kbdmux is enabled */
709 + if (is_kbdmux && is_console_kbd && hw_types[i].flag & ATTR_KEYBOARD) {
710 + LogMessage(X_INFO, "config/devd: kbdmux is enabled, ignoring device %s\n",
715 + snprintf(path, sizeof(path), "/dev/%s", devname);
717 + options = input_option_new(NULL, "_source", "server/devd");
721 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%s.%%desc",
722 + hw_types[i].driver, devname + strlen(hw_types[i].driver));
723 + vendor = sysctl_get_str(sysctlname);
724 + if (vendor == NULL) {
725 + options = input_option_new(options, "name", devname);
728 + if ((walk = strchr(vendor, ' ')) != NULL) {
732 + if ((walk = strchr(product, ',')) != NULL)
736 + attrs.vendor = strdup(vendor);
738 + attrs.product = strdup(product);
739 + options = input_option_new(options, "name", product);
742 + options = input_option_new(options, "name", "(unnamed)");
747 + /* XXX implement usb_id */
748 + attrs.usb_id = NULL;
749 + attrs.device = strdup(path);
750 + options = input_option_new(options, "driver", hw_types[i].xdriver);
752 + fd = open(path, O_RDONLY);
755 + options = input_option_new(options, "device", path);
758 + if (attrs.flags & ~ATTR_KEYBOARD) {
759 + LogMessage(X_INFO, "config/devd: device %s already opened\n",
763 + * Fail if cannot open device, it breaks AllowMouseOpenFail,
764 + * but it should not matter when config/devd enabled
769 + if (is_console_kbd) {
771 + * There can be only one keyboard attached to console and
772 + * it is already added.
774 + LogMessage(X_WARNING, "config/devd: console keyboard is "
775 + "already added, ignoring %s (%s)\n",
776 + attrs.product, path);
781 + * Don't pass "device" option if the keyboard is already
782 + * attached to the console (ie. open() fails).
783 + * This would activate a special logic in xf86-input-keyboard.
784 + * Prevent any other attached to console keyboards being
785 + * processed. There can be only one such device.
787 + is_console_kbd = true;
790 + if (asprintf(&config_info, "devd:%s", devname) == -1) {
791 + config_info = NULL;
795 + if (device_is_duplicate(config_info)) {
796 + LogMessage(X_WARNING, "config/devd: device %s (%s) already added. "
797 + "ignoring\n", attrs.product, path);
801 + options = input_option_new(options, "config_info", config_info);
802 + LogMessage(X_INFO, "config/devd: adding input device %s (%s)\n",
803 + attrs.product, path);
805 + NewInputDeviceRequest(options, &attrs, &dev);
809 + input_option_free_list(&options);
810 + free(attrs.usb_id);
811 + free(attrs.product);
812 + free(attrs.device);
813 + free(attrs.vendor);
817 +device_removed(char *devname)
821 + if (asprintf(&config_info, "devd:%s", devname) == -1)
824 + remove_devices("devd", config_info);
829 +static bool is_kbdmux_enabled(void)
831 + /* Xorg uses /dev/ttyv0 as a console device */
832 + /* const char device[]="/dev/console"; */
833 + const char device[]="/dev/ttyv0";
834 + keyboard_info_t info;
837 + fd = open(device, O_RDONLY);
842 + if (ioctl(fd, KDGKBINFO, &info) == -1) {
849 + if (!strncmp(info.kb_name, "kbdmux", 6))
856 +disconnect_devd(int sock)
859 + RemoveGeneralSocket(sock);
867 + struct sockaddr_un devd;
870 + sock = socket(AF_UNIX, SOCK_STREAM, 0);
872 + LogMessage(X_ERROR, "config/devd: fail opening stream socket\n");
876 + devd.sun_family = AF_UNIX;
877 + strlcpy(devd.sun_path, DEVD_SOCK_PATH, sizeof(devd.sun_path));
879 + if (connect(sock, (struct sockaddr *) &devd, sizeof(devd)) < 0) {
881 + LogMessage(X_ERROR, "config/devd: fail to connect to devd\n");
885 + AddGeneralSocket(sock);
891 +reconnect_handler(OsTimerPtr timer, CARD32 time, void *arg)
895 + if ((newsock = connect_devd()) > 0) {
896 + sock_devd = newsock;
899 + LogMessage(X_INFO, "config/devd: reopening devd socket\n");
903 + /* Try again after RECONNECT_DELAY */
904 + return RECONNECT_DELAY;
908 +socket_getline(int fd, char **out)
910 + char *buf, *newbuf;
911 + ssize_t ret, cap, sz = 0;
915 + buf = malloc(cap * sizeof(char));
920 + ret = read(sock_devd, &c, 1);
922 + if (errno == EINTR)
926 + /* EOF - devd socket is lost */
927 + } else if (ret == 0) {
928 + disconnect_devd(sock_devd);
929 + rtimer = TimerSet(NULL, 0, 1, reconnect_handler, NULL);
930 + LogMessage(X_WARNING, "config/devd: devd socket is lost\n");
937 + if (sz + 1 >= cap) {
939 + newbuf = realloc(buf, cap * sizeof(char));
956 + /* Number of bytes in the line, not counting the line break */
961 +wakeup_handler(void *data, int err, void *read_mask)
969 + if (FD_ISSET(sock_devd, (fd_set *) read_mask)) {
970 + if (socket_getline(sock_devd, &line) < 0)
973 + walk = strchr(line + 1, ' ');
978 + case DEVD_EVENT_ADD:
979 + device_added(line + 1);
981 + case DEVD_EVENT_REMOVE:
982 + device_removed(line + 1);
992 +block_handler(void *data, struct timeval **tv, void *read_mask)
997 +config_devd_init(void)
999 + char devicename[1024];
1002 + LogMessage(X_INFO, "config/devd: probing input devices...\n");
1005 + * Add fake keyboard and give up on keyboards management
1006 + * if kbdmux is enabled
1008 + if ((is_kbdmux = is_kbdmux_enabled()) == true)
1009 + device_added("kbdmux");
1011 + for (i = 0; hw_types[i].driver != NULL; i++) {
1012 + /* First scan the sysctl to determine the hardware */
1013 + for (j = 0; j < 16; j++) {
1014 + if (sysctl_exists(&hw_types[i], j,
1015 + devicename, sizeof(devicename)) != 0)
1016 + device_added(devicename);
1019 + if (devpath_exists(&hw_types[i], devicename, sizeof(devicename)) != 0)
1020 + device_added(devicename);
1023 + if ((sock_devd = connect_devd()) < 0)
1026 + RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
1032 +config_devd_fini(void)
1034 + LogMessage(X_INFO, "config/devd: terminating backend...\n");
1037 + TimerFree(rtimer);
1041 + disconnect_devd(sock_devd);
1043 + RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
1045 + is_console_kbd = false;
1049 [FILE:1457:patches/patch-configure]
1050 --- configure.orig 2018-10-25 14:13:27 UTC
1052 @@ -12074,7 +12074,6 @@ fi
1054 if test x$FILE_MAN_SUFFIX = x ; then
1056 - solaris*) FILE_MAN_SUFFIX=4 ;;
1057 *) FILE_MAN_SUFFIX=5 ;;
1060 @@ -12084,7 +12083,6 @@ fi
1062 if test x$MISC_MAN_SUFFIX = x ; then
1064 - solaris*) MISC_MAN_SUFFIX=5 ;;
1065 *) MISC_MAN_SUFFIX=7 ;;
1068 @@ -12094,7 +12092,6 @@ fi
1070 if test x$DRIVER_MAN_SUFFIX = x ; then
1072 - solaris*) DRIVER_MAN_SUFFIX=7 ;;
1073 *) DRIVER_MAN_SUFFIX=4 ;;
1076 @@ -12104,7 +12101,6 @@ fi
1078 if test x$ADMIN_MAN_SUFFIX = x ; then
1080 - solaris*) ADMIN_MAN_SUFFIX=1m ;;
1081 *) ADMIN_MAN_SUFFIX=8 ;;
1084 @@ -21727,7 +21723,7 @@ if test `${RAWCPP} < conftest.$ac_ext |
1085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1086 $as_echo "no" >&6; }
1088 - if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
1090 TRADITIONALCPPFLAGS="-traditional"
1091 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1093 @@ -23096,9 +23092,14 @@ $as_echo "#define USE_ALPHA_PIO 1" >>con
1095 GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee"
1100 DEFAULT_INT10="stub"
1103 + $as_echo "#define USE_DEV_IO 1" >>confdefs.h
1111 [FILE:256:patches/patch-hw_kdrive_ephyr_hostx.c]
1112 --- hw/kdrive/ephyr/hostx.c.orig 2018-10-25 14:13:21 UTC
1113 +++ hw/kdrive/ephyr/hostx.c
1115 #include <string.h> /* for memset */
1120 #include <sys/ipc.h>
1121 #include <sys/shm.h>
1124 [FILE:765:patches/patch-hw_xfree86_common_xf86AutoConfig.c]
1125 --- hw/xfree86/common/xf86AutoConfig.c.orig 2018-10-25 14:13:21 UTC
1126 +++ hw/xfree86/common/xf86AutoConfig.c
1127 @@ -294,7 +294,7 @@ listPossibleVideoDrivers(XF86MatchedDriv
1128 xf86PciMatchDriver(md);
1131 -#if defined(__linux__)
1132 +#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
1133 xf86AddMatchedDriver(md, "modesetting");
1136 @@ -302,8 +302,10 @@ listPossibleVideoDrivers(XF86MatchedDriv
1137 /* Fallback to platform default frame buffer driver */
1138 #if !defined(__linux__) && defined(__sparc__)
1139 xf86AddMatchedDriver(md, "wsfb");
1141 +#elif defined(__linux__)
1142 xf86AddMatchedDriver(md, "fbdev");
1143 +#elif defined(__FreeBSD__)
1144 + xf86AddMatchedDriver(md, "scfb");
1150 [FILE:700:patches/patch-hw_xfree86_common_xf86Config.c]
1151 --- hw/xfree86/common/xf86Config.c.orig 2018-10-25 14:13:21 UTC
1152 +++ hw/xfree86/common/xf86Config.c
1153 @@ -1264,13 +1264,16 @@ checkCoreInputDevices(serverLayoutPtr se
1156 if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) {
1157 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1158 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
1159 + defined(CONFIG_DEVD)
1160 const char *config_backend;
1162 #if defined(CONFIG_HAL)
1163 config_backend = "HAL";
1164 #elif defined(CONFIG_UDEV)
1165 config_backend = "udev";
1166 +#elif defined(CONFIG_DEVD)
1167 + config_backend = "devd";
1169 config_backend = "wscons";
1173 [FILE:510:patches/patch-hw_xfree86_common_xf86Globals.c]
1174 --- hw/xfree86/common/xf86Globals.c.orig 2018-10-25 14:13:21 UTC
1175 +++ hw/xfree86/common/xf86Globals.c
1176 @@ -119,7 +119,7 @@ xf86InfoRec xf86Info = {
1177 .miscModInDevEnabled = TRUE,
1178 .miscModInDevAllowNonLocal = FALSE,
1180 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1181 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || defined(CONFIG_DEVD)
1182 .forceInputDevices = FALSE,
1183 .autoAddDevices = TRUE,
1184 .autoEnableDevices = TRUE,
1187 [FILE:690:patches/patch-hw_xfree86_common_xf86Xinput.c]
1188 --- hw/xfree86/common/xf86Xinput.c.orig 2018-10-25 14:13:21 UTC
1189 +++ hw/xfree86/common/xf86Xinput.c
1190 @@ -874,7 +874,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, D
1192 InputDriverPtr drv = NULL;
1193 DeviceIntPtr dev = NULL;
1199 @@ -1037,6 +1037,7 @@ NewInputDeviceRequest(InputOption *optio
1200 if (strcmp(key, "_source") == 0 &&
1201 (strcmp(value, "server/hal") == 0 ||
1202 strcmp(value, "server/udev") == 0 ||
1203 + strcmp(value, "server/devd") == 0 ||
1204 strcmp(value, "server/wscons") == 0)) {
1206 if (!xf86Info.autoAddDevices) {
1209 [FILE:450:patches/patch-hw_xfree86_os-support_bsd_bsd__init.c]
1210 --- hw/xfree86/os-support/bsd/bsd_init.c.orig 2018-10-25 14:13:21 UTC
1211 +++ hw/xfree86/os-support/bsd/bsd_init.c
1212 @@ -230,6 +230,9 @@ xf86OpenConsole()
1213 * Add cases for other *BSD that behave the same.
1215 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
1216 +#if defined(__sparc64__)
1217 + pci_system_init_dev_mem(fd);
1220 i = atof(uts.release) * 100;
1224 [FILE:315:patches/patch-hw_xfree86_os-support_bsd_i386__video.c]
1225 Index: programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c
1226 --- hw/xfree86/os-support/bsd/i386_video.c.orig 2018-10-25 14:13:21 UTC
1227 +++ hw/xfree86/os-support/bsd/i386_video.c
1229 #include "xf86Priv.h"
1232 +#include <sys/types.h>
1233 #include <sys/mman.h>
1235 #include "xf86_OSlib.h"
1238 [FILE:380:patches/patch-hw_xfree86_os-support_bsd_ppc__video.c]
1239 --- hw/xfree86/os-support/bsd/ppc_video.c.orig 2018-10-25 14:13:21 UTC
1240 +++ hw/xfree86/os-support/bsd/ppc_video.c
1241 @@ -79,7 +79,11 @@ xf86DisableIO()
1244 if (ioBase != MAP_FAILED) {
1245 +#if defined(__FreeBSD__)
1246 + munmap(__DEVOLATILE(unsigned char *, ioBase), 0x10000);
1248 munmap(__UNVOLATILE(ioBase), 0x10000);
1250 ioBase = MAP_FAILED;
1255 [FILE:714:patches/patch-hw_xfree86_os-support_solaris_sun__init.c]
1256 --- hw/xfree86/os-support/solaris/sun_init.c.orig 2018-10-25 14:13:21 UTC
1257 +++ hw/xfree86/os-support/solaris/sun_init.c
1258 @@ -54,6 +54,22 @@ static int xf86StartVT = -1;
1259 static int vtEnabled = 0;
1263 +#define VTIOC ('V'<<8)
1264 +#define VT_OPENQRY (VTIOC|1)
1265 +#define VT_SETMODE (VTIOC|2)
1266 +#define VT_GETMODE (VTIOC|3)
1267 +#define VT_ACTIVATE (VTIOC|5)
1268 +#define VT_WAITACTIVE (VTIOC|6)
1269 +#define VT_GETSTATE (VTIOC|100)
1270 +#define VT_ENABLED (VTIOC|101)
1271 +#define VT_SETDISPINFO (VTIOC|103)
1272 +#define VT_GET_CONSUSER (VTIOC|108)
1273 +#define VT_SET_CONSUSER (VTIOC|109)
1275 +enum { VT_AUTO = 0, VT_PROCESS };
1278 /* Device to open as xf86Info.consoleFd */
1279 static char consoleDev[PATH_MAX] = "/dev/fb";
1283 [FILE:193:patches/patch-os_backtrace.c]
1284 --- os/backtrace.c.orig 2018-10-25 14:13:21 UTC
1290 +#include <unistd.h>
1292 #ifdef HAVE_LIBUNWIND
1296 [FILE:1021:patches/patch-test_simple-xinit.c]
1297 --- test/simple-xinit.c.orig 2018-10-25 14:13:21 UTC
1298 +++ test/simple-xinit.c
1300 #include <sys/wait.h>
1304 +#include <sys/varargs.h>
1306 +vasprintf(char **strp, const char *fmt, va_list args)
1308 + va_list args_copy;
1309 + int status, needed;
1311 + va_copy(args_copy, args);
1312 + needed = vsnprintf(NULL, 0, fmt, args_copy);
1313 + va_end(args_copy);
1318 + *strp = malloc(needed + 1);
1319 + if (*strp == NULL)
1321 + status = vsnprintf(*strp, needed + 1, fmt, args);
1332 +asprintf(char **strp, const char *fmt, ...)
1337 + va_start(args, fmt);
1338 + status = vasprintf(strp, fmt, args);
1345 kill_server(int server_pid)
1349 [FILE:215:patches/patch-xkb_Makefile.in]
1350 --- xkb/Makefile.in.orig 2018-10-25 14:13:31 UTC
1352 @@ -890,7 +890,7 @@ info: info-am
1356 -install-data-am: install-dist_xkbcompiledDATA
1359 install-dvi: install-dvi-am
1363 [FILE:135:files/pkg-deinstall-single.in]
1366 PREFIX="${PKG_PREFIX-/raven}"
1370 /bin/rm -rf ${PREFIX}/lib/xorg/modules/extensions/libglx.so*
1375 [FILE:531:files/pkg-install-single.in]
1378 PREFIX="${PKG_PREFIX-/raven}"
1382 if [ -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 ]; then
1383 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1384 ${PREFIX}/lib/xorg/modules/extensions/libglx.so
1385 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1386 ${PREFIX}/lib/xorg/modules/extensions/libglx.so.1
1388 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.xorg/libglx.so \
1389 ${PREFIX}/lib/xorg/modules/extensions/libglx.so