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.19.6.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
50 FPC_EQUIVALENT= x11-servers/xorg-server
53 CONFIGURE_ARGS= --with-xkb-path={{LOCALBASE}}/share/X11/xkb
54 --with-fontrootdir={{LOCALBASE}}/share/fonts
59 --with-shared-memory-dir=/tmp
62 --disable-config-udev-kms
63 --disable-install-setuid
68 INSTALL_TARGET= install-strip
70 VAR_OPSYS[sunos]= CFLAGS=-DO_CLOEXEC=0
72 [DEVD].DESCRIPTION= Use devd for autoconfiguration of input devices
74 [NEST].DESCRIPTION= Build as nesting X server
75 [NEST].BUILD_DEPENDS_ON= libepoxy:single:standard
77 [NEST].CONFIGURE_ENABLE_BOTH= xnest
79 [NEST].XORG_COMPONENTS_ON= x11
82 [XEPHYR].DESCRIPTION= Build as kdrive-base X server
83 [XEPHYR].BUILDRUN_DEPENDS_ON= libdrm:single:standard
84 libepoxy:single:standard
85 [XEPHYR].BUILD_DEPENDS_ON= mesa:drivers:standard
86 [XEPHYR].CONFIGURE_ENABLE_BOTH= xephyr
88 [XEPHYR].USES_ON= mesa
89 [XEPHYR].XORG_COMPONENTS_ON= x11
97 [DMX].DESCRIPTION= Build as distributed multihead X server
98 [DMX].BUILD_DEPENDS_ON= libepoxy:single:standard
100 xorg-xtst:single:standard
101 xorg-xres:single:standard
102 [DMX].CONFIGURE_ENABLE_BOTH= dmx
103 [DMX].XORG_COMPONENTS_ON= dmx
114 [VIRTUAL].DESCRIPTION= Build as virtual framebuffer server
115 [VIRTUAL].BUILD_DEPENDS_ON= libepoxy:single:standard
116 mesa:drivers:standard
117 [VIRTUAL].CONFIGURE_ENABLE_BOTH= xvfb
118 [VIRTUAL].USES_ON= mesa
120 [XORG].DESCRIPTION= Build as X server (don't change setting!)
121 [XORG].BUILDRUN_DEPENDS_ON= libdrm:single:standard
122 libepoxy:single:standard
123 mesa:drivers:standard
124 [XORG].CONFIGURE_ENABLE_BOTH= docs
127 [XORG].SUB_FILES_ON= pkg-install-single
130 [XORG].XORG_COMPONENTS_ON= pciaccess
133 [WAYLAND].DESCRIPTION= Build Wayland X clients
134 [WAYLAND].BROKEN_ON= Wayland itself not yet implemented
135 [WAYLAND].BUILDRUN_DEPENDS_ON= libdrm:single:standard
136 libepoxy:single:standard
137 [WAYLAND].BUILD_DEPENDS_ON= mesa:drivers:standard
138 [WAYLAND].CONFIGURE_ARGS_ON= --disable-xquartz
140 [WAYLAND].CONFIGURE_ENABLE_BOTH= xwayland
141 [WAYLAND].XORG_COMPONENTS_ON= x11
144 [SUID].DESCRIPTION= Install the Xorg server with setuid bit set
147 # build libglx.so but don't install it yet. (done in pre-install)
148 ${REINPLACE_CMD} -e 's|@GLX_TRUE@GLXMODS =|@GLX_BOGUS@GLXMODS =|g' \
149 -e 's|^LTLIBRARIES = |LTLIBRARIES = libglx.la |g' \
150 ${WRKSRC}/hw/xfree86/dixmods/Makefile.in
152 do-install-XEPHYR-ON:
153 (cd ${WRKSRC}/hw/kdrive/ephyr && \
154 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
156 do-install-WAYLAND-ON:
157 (cd ${WRKSRC}/hw/xwayland && \
158 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
160 post-install-XORG-OFF:
161 ${RM} -r ${STAGEDIR}${PREFIX}/lib/xorg
162 ${RM} ${STAGEDIR}${PREFIX}/share/man/man1/Xserver.1
164 post-configure-DEVD-ON:
165 ${REINPLACE_CMD} -e 's|config\.c|config.c devd.c|g' \
166 -e 's|config\.lo|config.lo devd.lo|g' \
167 ${WRKSRC}/config/Makefile
168 ${REINPLACE_CMD} -e 's|^/\* #undef CONFIG_UDEV \*/|#define CONFIG_DEVD 1|' \
169 ${WRKSRC}/include/dix-config.h
171 do-install-VIRTUAL-ON:
172 (cd ${WRKSRC}/hw/vfb && \
173 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
176 (cd ${WRKSRC}/hw/xnest && \
177 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
180 (cd ${WRKSRC}/hw/dmx && \
181 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
183 post-install-XORG-ON:
184 # The .xorg dir because else the xorg-server might not load the
185 # correct libglx module.
186 @${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg
187 ${INSTALL_LIB} ${WRKSRC}/hw/xfree86/dixmods/.libs/libglx.so \
188 ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg/
189 @${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d
190 ${RM} -r ${STAGEDIR}/var
192 [FILE:71:descriptions/desc.single.standard]
193 This package contains the X.Org X server and some associated programs.
196 [FILE:60:descriptions/desc.single.virtual]
197 This package contains Xvfb, a virtual framebuffer X server.
200 [FILE:287:descriptions/desc.single.dmx]
201 Xdmx is proxy X server that provides multi-head support for multiple
202 displays attached to different machines (each of which is running a
203 typical X server). When Xinerama is used with Xdmx, the multiple displays
204 on multiple machines are presented to the user as a single unified screen.
207 [FILE:173:descriptions/desc.single.xephyr]
208 Xephyr is a kdrive server that outputs to a window on a pre-existing
209 'host' X display. Think Xnest but with support for modern extensions
210 like composite, damage and randr.
213 [FILE:78:descriptions/desc.single.nest]
214 This package contains Xnest, a nesting X Server that displays on an X
218 [FILE:148:descriptions/desc.single.wayland]
219 XWayland is an X Server running as a Wayland client, thus capable of
220 displaying native X11 client applications in a Wayland compositor
225 a732502f1db000cf36a376cd0c010ffdbf32ecdd7f1fa08ba7f5bdf9601cc197 5984528 xorg-server-1.19.6.tar.bz2
228 [FILE:2477:manifests/plist.single.standard]
229 %%ONLY-SUNOS%%include/xorg/solaris-amd64.il
231 %%SUID-ON%%@(,,4555) bin/Xorg
395 lib/pkgconfig/xorg-server.pc
396 lib/xorg/protocol.txt
408 lib/xorg/modules/drivers/modesetting_drv.so
409 lib/xorg/modules/extensions/.xorg/libglx.so
410 share/aclocal/xorg-server.m4
423 @dir etc/X11/xorg.conf.d
426 [FILE:34:manifests/plist.single.virtual]
428 share/man/man1/Xvfb.1.gz
431 [FILE:214:manifests/plist.single.dmx]
452 [FILE:38:manifests/plist.single.xephyr]
454 share/man/man1/Xephyr.1.gz
457 [FILE:36:manifests/plist.single.nest]
459 share/man/man1/Xnest.1.gz
462 [FILE:13:manifests/plist.single.wayland]
466 [FILE:293:patches/patch-config_config-backends.h]
467 --- config/config-backends.h.orig 2017-12-20 20:32:33 UTC
468 +++ config/config-backends.h
469 @@ -44,3 +44,8 @@ void config_hal_fini(void);
470 int config_wscons_init(void);
471 void config_wscons_fini(void);
475 +int config_devd_init(void);
476 +void config_devd_fini(void);
480 [FILE:537:patches/patch-config_config.c]
481 --- config/config.c.orig 2017-12-20 20:32:33 UTC
483 @@ -55,6 +55,9 @@ config_init(void)
484 #elif defined(CONFIG_WSCONS)
485 if (!config_wscons_init())
486 ErrorF("[config] failed to initialise wscons\n");
487 +#elif defined(CONFIG_DEVD)
488 + if (!config_devd_init())
489 + ErrorF("[config] failed to initialise devd\n");
493 @@ -67,6 +70,8 @@ config_fini(void)
495 #elif defined(CONFIG_WSCONS)
496 config_wscons_fini();
497 +#elif defined(CONFIG_DEVD)
498 + config_devd_fini();
504 [FILE:12171:patches/patch-config_devd.c]
505 --- /dev/null 2018-02-08 20:22:25 UTC
509 + * Copyright (c) 2012 Baptiste Daroussin
510 + * Copyright (c) 2013, 2014 Alex Kozlov
511 + * Copyright (c) 2014 Robert Millan
512 + * Copyright (c) 2014 Jean-Sebastien Pedron
514 + * Permission is hereby granted, free of charge, to any person obtaining a
515 + * copy of this software and associated documentation files (the "Software"),
516 + * to deal in the Software without restriction, including without limitation
517 + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
518 + * and/or sell copies of the Software, and to permit persons to whom the
519 + * Software is furnished to do so, subject to the following conditions:
521 + * The above copyright notice and this permission notice (including the next
522 + * paragraph) shall be included in all copies or substantial portions of the
525 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
526 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
527 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
528 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
529 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
530 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
531 + * DEALINGS IN THE SOFTWARE.
533 + * Author: Baptiste Daroussin <bapt@FreeBSD.org>
536 +#ifdef HAVE_DIX_CONFIG_H
537 +#include <dix-config.h>
540 +#include <sys/types.h>
541 +#include <sys/kbio.h>
542 +#include <sys/socket.h>
543 +#include <sys/stat.h>
544 +#include <sys/sysctl.h>
552 +#include <stdbool.h>
556 +#include "inputstr.h"
557 +#include "hotplug.h"
558 +#include "config-backends.h"
561 +#define DEVD_SOCK_PATH "/var/run/devd.pipe"
563 +#define DEVD_EVENT_ADD '+'
564 +#define DEVD_EVENT_REMOVE '-'
566 +#define RECONNECT_DELAY 5 * 1000
568 +static int sock_devd;
569 +static bool is_console_kbd = false;
570 +static bool is_kbdmux = false;
571 +static OsTimerPtr rtimer = NULL;
574 + const char *driver;
576 + const char *xdriver;
579 +static struct hw_type hw_types[] = {
580 + { "ukbd", ATTR_KEYBOARD, "kbd" },
581 + { "atkbd", ATTR_KEYBOARD, "kbd" },
582 + { "kbdmux", ATTR_KEYBOARD, "kbd" },
583 + { "sysmouse", ATTR_POINTER, "mouse" },
584 + { "ums", ATTR_POINTER, "mouse" },
585 + { "psm", ATTR_POINTER, "mouse" },
586 + { "vboxguest", ATTR_POINTER, "vboxmouse" },
587 + { "joy", ATTR_JOYSTICK, NULL },
588 + { "atp", ATTR_TOUCHPAD, NULL },
589 + { "uep", ATTR_TOUCHSCREEN, NULL },
590 + { NULL, -1, NULL },
594 +sysctl_exists(const struct hw_type *device, int unit,
595 + char *devname, size_t devname_len)
597 + char sysctlname[PATH_MAX];
601 + if (device == NULL || device->driver == NULL)
604 + /* Check if a sysctl exists. */
605 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%i.%%desc",
606 + device->driver, unit);
607 + ret = sysctlbyname(sysctlname, NULL, &len, NULL, 0);
609 + if (ret == 0 && len > 0) {
610 + snprintf(devname, devname_len, "%s%i", device->driver, unit);
618 +devpath_exists(const struct hw_type *device,
619 + char *devname, size_t devname_len)
625 + if (device == NULL || device->driver == NULL)
628 + /* Check if /dev/$driver exists. */
629 + asprintf(&devpath, "/dev/%s", device->driver);
630 + if (devpath == NULL)
633 + ret = stat(devpath, &st);
637 + strncpy(devname, device->driver, devname_len);
645 +sysctl_get_str(const char *sysctlname)
650 + if (sysctlname == NULL)
653 + if (sysctlbyname(sysctlname, NULL, &len, NULL, 0) == 0) {
654 + dest = malloc(len + 1);
656 + if (sysctlbyname(sysctlname, dest, &len, NULL, 0) == 0)
669 +device_added(const char *devname)
671 + char path[PATH_MAX];
672 + char sysctlname[PATH_MAX];
674 + char *product = NULL;
675 + char *config_info = NULL;
677 + InputOption *options = NULL;
678 + InputAttributes attrs = { };
679 + DeviceIntPtr dev = NULL;
683 + for (i = 0; hw_types[i].driver != NULL; i++) {
686 + len = strlen(hw_types[i].driver);
687 + if (strcmp(devname, hw_types[i].driver) == 0 ||
688 + (strncmp(devname, hw_types[i].driver, len) == 0 &&
689 + isnumber(*(devname + len)))) {
690 + attrs.flags |= hw_types[i].flag;
695 + if (hw_types[i].driver == NULL || hw_types[i].xdriver == NULL) {
696 + LogMessage(X_INFO, "config/devd: ignoring device %s\n",
701 + /* Skip keyboard devices if kbdmux is enabled */
702 + if (is_kbdmux && is_console_kbd && hw_types[i].flag & ATTR_KEYBOARD) {
703 + LogMessage(X_INFO, "config/devd: kbdmux is enabled, ignoring device %s\n",
708 + snprintf(path, sizeof(path), "/dev/%s", devname);
710 + options = input_option_new(NULL, "_source", "server/devd");
714 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%s.%%desc",
715 + hw_types[i].driver, devname + strlen(hw_types[i].driver));
716 + vendor = sysctl_get_str(sysctlname);
717 + if (vendor == NULL) {
718 + options = input_option_new(options, "name", devname);
721 + if ((walk = strchr(vendor, ' ')) != NULL) {
725 + if ((walk = strchr(product, ',')) != NULL)
729 + attrs.vendor = strdup(vendor);
731 + attrs.product = strdup(product);
732 + options = input_option_new(options, "name", product);
735 + options = input_option_new(options, "name", "(unnamed)");
740 + /* XXX implement usb_id */
741 + attrs.usb_id = NULL;
742 + attrs.device = strdup(path);
743 + options = input_option_new(options, "driver", hw_types[i].xdriver);
745 + fd = open(path, O_RDONLY);
748 + options = input_option_new(options, "device", path);
751 + if (attrs.flags & ~ATTR_KEYBOARD) {
752 + LogMessage(X_INFO, "config/devd: device %s already opened\n",
756 + * Fail if cannot open device, it breaks AllowMouseOpenFail,
757 + * but it should not matter when config/devd enabled
762 + if (is_console_kbd) {
764 + * There can be only one keyboard attached to console and
765 + * it is already added.
767 + LogMessage(X_WARNING, "config/devd: console keyboard is "
768 + "already added, ignoring %s (%s)\n",
769 + attrs.product, path);
774 + * Don't pass "device" option if the keyboard is already
775 + * attached to the console (ie. open() fails).
776 + * This would activate a special logic in xf86-input-keyboard.
777 + * Prevent any other attached to console keyboards being
778 + * processed. There can be only one such device.
780 + is_console_kbd = true;
783 + if (asprintf(&config_info, "devd:%s", devname) == -1) {
784 + config_info = NULL;
788 + if (device_is_duplicate(config_info)) {
789 + LogMessage(X_WARNING, "config/devd: device %s (%s) already added. "
790 + "ignoring\n", attrs.product, path);
794 + options = input_option_new(options, "config_info", config_info);
795 + LogMessage(X_INFO, "config/devd: adding input device %s (%s)\n",
796 + attrs.product, path);
798 + NewInputDeviceRequest(options, &attrs, &dev);
802 + input_option_free_list(&options);
803 + free(attrs.usb_id);
804 + free(attrs.product);
805 + free(attrs.device);
806 + free(attrs.vendor);
810 +device_removed(char *devname)
814 + if (asprintf(&config_info, "devd:%s", devname) == -1)
817 + remove_devices("devd", config_info);
822 +static bool is_kbdmux_enabled(void)
824 + /* Xorg uses /dev/ttyv0 as a console device */
825 + /* const char device[]="/dev/console"; */
826 + const char device[]="/dev/ttyv0";
827 + keyboard_info_t info;
830 + fd = open(device, O_RDONLY);
835 + if (ioctl(fd, KDGKBINFO, &info) == -1) {
842 + if (!strncmp(info.kb_name, "kbdmux", 6))
849 +disconnect_devd(int sock)
852 + RemoveGeneralSocket(sock);
860 + struct sockaddr_un devd;
863 + sock = socket(AF_UNIX, SOCK_STREAM, 0);
865 + LogMessage(X_ERROR, "config/devd: fail opening stream socket\n");
869 + devd.sun_family = AF_UNIX;
870 + strlcpy(devd.sun_path, DEVD_SOCK_PATH, sizeof(devd.sun_path));
872 + if (connect(sock, (struct sockaddr *) &devd, sizeof(devd)) < 0) {
874 + LogMessage(X_ERROR, "config/devd: fail to connect to devd\n");
878 + AddGeneralSocket(sock);
884 +reconnect_handler(OsTimerPtr timer, CARD32 time, void *arg)
888 + if ((newsock = connect_devd()) > 0) {
889 + sock_devd = newsock;
892 + LogMessage(X_INFO, "config/devd: reopening devd socket\n");
896 + /* Try again after RECONNECT_DELAY */
897 + return RECONNECT_DELAY;
901 +socket_getline(int fd, char **out)
903 + char *buf, *newbuf;
904 + ssize_t ret, cap, sz = 0;
908 + buf = malloc(cap * sizeof(char));
913 + ret = read(sock_devd, &c, 1);
915 + if (errno == EINTR)
919 + /* EOF - devd socket is lost */
920 + } else if (ret == 0) {
921 + disconnect_devd(sock_devd);
922 + rtimer = TimerSet(NULL, 0, 1, reconnect_handler, NULL);
923 + LogMessage(X_WARNING, "config/devd: devd socket is lost\n");
930 + if (sz + 1 >= cap) {
932 + newbuf = realloc(buf, cap * sizeof(char));
949 + /* Number of bytes in the line, not counting the line break */
954 +wakeup_handler(void *data, int err, void *read_mask)
962 + if (FD_ISSET(sock_devd, (fd_set *) read_mask)) {
963 + if (socket_getline(sock_devd, &line) < 0)
966 + walk = strchr(line + 1, ' ');
971 + case DEVD_EVENT_ADD:
972 + device_added(line + 1);
974 + case DEVD_EVENT_REMOVE:
975 + device_removed(line + 1);
985 +block_handler(void *data, struct timeval **tv, void *read_mask)
990 +config_devd_init(void)
992 + char devicename[1024];
995 + LogMessage(X_INFO, "config/devd: probing input devices...\n");
998 + * Add fake keyboard and give up on keyboards management
999 + * if kbdmux is enabled
1001 + if ((is_kbdmux = is_kbdmux_enabled()) == true)
1002 + device_added("kbdmux");
1004 + for (i = 0; hw_types[i].driver != NULL; i++) {
1005 + /* First scan the sysctl to determine the hardware */
1006 + for (j = 0; j < 16; j++) {
1007 + if (sysctl_exists(&hw_types[i], j,
1008 + devicename, sizeof(devicename)) != 0)
1009 + device_added(devicename);
1012 + if (devpath_exists(&hw_types[i], devicename, sizeof(devicename)) != 0)
1013 + device_added(devicename);
1016 + if ((sock_devd = connect_devd()) < 0)
1019 + RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
1025 +config_devd_fini(void)
1027 + LogMessage(X_INFO, "config/devd: terminating backend...\n");
1030 + TimerFree(rtimer);
1034 + disconnect_devd(sock_devd);
1036 + RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
1038 + is_console_kbd = false;
1042 [FILE:1457:patches/patch-configure]
1043 --- configure.orig 2017-12-20 20:32:47 UTC
1045 @@ -12101,7 +12101,6 @@ fi
1047 if test x$FILE_MAN_SUFFIX = x ; then
1049 - solaris*) FILE_MAN_SUFFIX=4 ;;
1050 *) FILE_MAN_SUFFIX=5 ;;
1053 @@ -12111,7 +12110,6 @@ fi
1055 if test x$MISC_MAN_SUFFIX = x ; then
1057 - solaris*) MISC_MAN_SUFFIX=5 ;;
1058 *) MISC_MAN_SUFFIX=7 ;;
1061 @@ -12121,7 +12119,6 @@ fi
1063 if test x$DRIVER_MAN_SUFFIX = x ; then
1065 - solaris*) DRIVER_MAN_SUFFIX=7 ;;
1066 *) DRIVER_MAN_SUFFIX=4 ;;
1069 @@ -12131,7 +12128,6 @@ fi
1071 if test x$ADMIN_MAN_SUFFIX = x ; then
1073 - solaris*) ADMIN_MAN_SUFFIX=1m ;;
1074 *) ADMIN_MAN_SUFFIX=8 ;;
1077 @@ -21754,7 +21750,7 @@ if test `${RAWCPP} < conftest.$ac_ext |
1078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1079 $as_echo "no" >&6; }
1081 - if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
1083 TRADITIONALCPPFLAGS="-traditional"
1084 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1086 @@ -23263,9 +23259,14 @@ $as_echo "#define USE_ALPHA_PIO 1" >>con
1088 GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee"
1093 DEFAULT_INT10="stub"
1096 + $as_echo "#define USE_DEV_IO 1" >>confdefs.h
1104 [FILE:256:patches/patch-hw_kdrive_ephyr_hostx.c]
1105 --- hw/kdrive/ephyr/hostx.c.orig 2017-12-20 20:32:33 UTC
1106 +++ hw/kdrive/ephyr/hostx.c
1108 #include <string.h> /* for memset */
1113 #include <sys/ipc.h>
1114 #include <sys/shm.h>
1117 [FILE:785:patches/patch-hw_xfree86_common_xf86AutoConfig.c]
1118 --- hw/xfree86/common/xf86AutoConfig.c.orig 2017-12-20 20:32:33 UTC
1119 +++ hw/xfree86/common/xf86AutoConfig.c
1120 @@ -276,7 +276,7 @@ listPossibleVideoDrivers(char *matches[]
1121 i += xf86PciMatchDriver(&matches[i], nmatches - i);
1124 -#if defined(__linux__)
1125 +#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
1126 matches[i++] = xnfstrdup("modesetting");
1129 @@ -285,8 +285,10 @@ listPossibleVideoDrivers(char *matches[]
1130 if (i < (nmatches - 1)) {
1131 #if !defined(__linux__) && defined(__sparc__)
1132 matches[i++] = xnfstrdup("wsfb");
1134 +#elif defined(__linux__)
1135 matches[i++] = xnfstrdup("fbdev");
1136 +#elif defined(__FreeBSD__)
1137 + matches[i++] = xnfstrdup("scfb");
1143 [FILE:700:patches/patch-hw_xfree86_common_xf86Config.c]
1144 --- hw/xfree86/common/xf86Config.c.orig 2017-12-20 20:32:33 UTC
1145 +++ hw/xfree86/common/xf86Config.c
1146 @@ -1375,13 +1375,16 @@ checkCoreInputDevices(serverLayoutPtr se
1149 if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) {
1150 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1151 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
1152 + defined(CONFIG_DEVD)
1153 const char *config_backend;
1155 #if defined(CONFIG_HAL)
1156 config_backend = "HAL";
1157 #elif defined(CONFIG_UDEV)
1158 config_backend = "udev";
1159 +#elif defined(CONFIG_DEVD)
1160 + config_backend = "devd";
1162 config_backend = "wscons";
1166 [FILE:496:patches/patch-hw_xfree86_common_xf86Globals.c]
1167 --- hw/xfree86/common/xf86Globals.c.orig 2017-12-20 20:32:33 UTC
1168 +++ hw/xfree86/common/xf86Globals.c
1169 @@ -122,7 +122,8 @@ xf86InfoRec xf86Info = {
1171 .disableRandR = FALSE,
1172 .randRFrom = X_DEFAULT,
1173 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1174 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
1175 + defined(CONFIG_DEVD)
1176 .forceInputDevices = FALSE,
1177 .autoAddDevices = TRUE,
1178 .autoEnableDevices = TRUE,
1181 [FILE:690:patches/patch-hw_xfree86_common_xf86Xinput.c]
1182 --- hw/xfree86/common/xf86Xinput.c.orig 2017-12-20 20:32:33 UTC
1183 +++ hw/xfree86/common/xf86Xinput.c
1184 @@ -874,7 +874,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, D
1186 InputDriverPtr drv = NULL;
1187 DeviceIntPtr dev = NULL;
1193 @@ -1037,6 +1037,7 @@ NewInputDeviceRequest(InputOption *optio
1194 if (strcmp(key, "_source") == 0 &&
1195 (strcmp(value, "server/hal") == 0 ||
1196 strcmp(value, "server/udev") == 0 ||
1197 + strcmp(value, "server/devd") == 0 ||
1198 strcmp(value, "server/wscons") == 0)) {
1200 if (!xf86Info.autoAddDevices) {
1203 [FILE:450:patches/patch-hw_xfree86_os-support_bsd_bsd__init.c]
1204 --- hw/xfree86/os-support/bsd/bsd_init.c.orig 2017-12-20 20:32:33 UTC
1205 +++ hw/xfree86/os-support/bsd/bsd_init.c
1206 @@ -230,6 +230,9 @@ xf86OpenConsole()
1207 * Add cases for other *BSD that behave the same.
1209 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
1210 +#if defined(__sparc64__)
1211 + pci_system_init_dev_mem(fd);
1214 i = atof(uts.release) * 100;
1218 [FILE:315:patches/patch-hw_xfree86_os-support_bsd_i386__video.c]
1219 Index: programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c
1220 --- hw/xfree86/os-support/bsd/i386_video.c.orig 2017-12-20 20:32:33 UTC
1221 +++ hw/xfree86/os-support/bsd/i386_video.c
1223 #include "xf86Priv.h"
1226 +#include <sys/types.h>
1227 #include <sys/mman.h>
1229 #include "xf86_OSlib.h"
1232 [FILE:380:patches/patch-hw_xfree86_os-support_bsd_ppc__video.c]
1233 --- hw/xfree86/os-support/bsd/ppc_video.c.orig 2017-12-20 20:32:33 UTC
1234 +++ hw/xfree86/os-support/bsd/ppc_video.c
1235 @@ -79,7 +79,11 @@ xf86DisableIO()
1238 if (ioBase != MAP_FAILED) {
1239 +#if defined(__FreeBSD__)
1240 + munmap(__DEVOLATILE(unsigned char *, ioBase), 0x10000);
1242 munmap(__UNVOLATILE(ioBase), 0x10000);
1244 ioBase = MAP_FAILED;
1249 [FILE:714:patches/patch-hw_xfree86_os-support_solaris_sun__init.c]
1250 --- hw/xfree86/os-support/solaris/sun_init.c.orig 2017-12-20 20:32:33 UTC
1251 +++ hw/xfree86/os-support/solaris/sun_init.c
1252 @@ -54,6 +54,22 @@ static int xf86StartVT = -1;
1253 static int vtEnabled = 0;
1257 +#define VTIOC ('V'<<8)
1258 +#define VT_OPENQRY (VTIOC|1)
1259 +#define VT_SETMODE (VTIOC|2)
1260 +#define VT_GETMODE (VTIOC|3)
1261 +#define VT_ACTIVATE (VTIOC|5)
1262 +#define VT_WAITACTIVE (VTIOC|6)
1263 +#define VT_GETSTATE (VTIOC|100)
1264 +#define VT_ENABLED (VTIOC|101)
1265 +#define VT_SETDISPINFO (VTIOC|103)
1266 +#define VT_GET_CONSUSER (VTIOC|108)
1267 +#define VT_SET_CONSUSER (VTIOC|109)
1269 +enum { VT_AUTO = 0, VT_PROCESS };
1272 /* Device to open as xf86Info.consoleFd */
1273 static char consoleDev[PATH_MAX] = "/dev/fb";
1277 [FILE:193:patches/patch-os_backtrace.c]
1278 --- os/backtrace.c.orig 2017-12-20 20:32:33 UTC
1284 +#include <unistd.h>
1286 #ifdef HAVE_LIBUNWIND
1290 [FILE:1021:patches/patch-test_simple-xinit.c]
1291 --- test/simple-xinit.c.orig 2017-12-20 20:32:33 UTC
1292 +++ test/simple-xinit.c
1294 #include <sys/wait.h>
1298 +#include <sys/varargs.h>
1300 +vasprintf(char **strp, const char *fmt, va_list args)
1302 + va_list args_copy;
1303 + int status, needed;
1305 + va_copy(args_copy, args);
1306 + needed = vsnprintf(NULL, 0, fmt, args_copy);
1307 + va_end(args_copy);
1312 + *strp = malloc(needed + 1);
1313 + if (*strp == NULL)
1315 + status = vsnprintf(*strp, needed + 1, fmt, args);
1326 +asprintf(char **strp, const char *fmt, ...)
1331 + va_start(args, fmt);
1332 + status = vasprintf(strp, fmt, args);
1339 kill_server(int server_pid)
1343 [FILE:215:patches/patch-xkb_Makefile.in]
1344 --- xkb/Makefile.in.orig 2017-12-20 20:32:55 UTC
1346 @@ -886,7 +886,7 @@ info: info-am
1350 -install-data-am: install-dist_xkbcompiledDATA
1353 install-dvi: install-dvi-am
1357 [FILE:135:files/pkg-deinstall-single.in]
1360 PREFIX="${PKG_PREFIX-/raven}"
1364 /bin/rm -rf ${PREFIX}/lib/xorg/modules/extensions/libglx.so*
1369 [FILE:531:files/pkg-install-single.in]
1372 PREFIX="${PKG_PREFIX-/raven}"
1376 if [ -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 ]; then
1377 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1378 ${PREFIX}/lib/xorg/modules/extensions/libglx.so
1379 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1380 ${PREFIX}/lib/xorg/modules/extensions/libglx.so.1
1382 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.xorg/libglx.so \
1383 ${PREFIX}/lib/xorg/modules/extensions/libglx.so