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 xshmfence xau xdmcp xfont2
49 FPC_EQUIVALENT= x11-servers/xorg-server
52 CONFIGURE_ARGS= --with-xkb-path={{LOCALBASE}}/share/X11/xkb
53 --with-fontrootdir={{LOCALBASE}}/share/fonts
58 --with-shared-memory-dir=/tmp
61 --disable-config-udev-kms
62 --disable-install-setuid
67 INSTALL_TARGET= install-strip
69 VAR_OPSYS[sunos]= CFLAGS=-DO_CLOEXEC=0
71 [DEVD].DESCRIPTION= Use devd for autoconfiguration of input devices
73 [NEST].DESCRIPTION= Build as nesting X server
74 [NEST].BUILD_DEPENDS_ON= libepoxy:single:standard
76 [NEST].CONFIGURE_ENABLE_BOTH= xnest
78 [NEST].XORG_COMPONENTS_ON= x11
81 [XEPHYR].DESCRIPTION= Build as kdrive-base X server
82 [XEPHYR].BUILDRUN_DEPENDS_ON= libdrm:single:standard
83 libepoxy:single:standard
84 [XEPHYR].BUILD_DEPENDS_ON= mesa:drivers:standard
85 [XEPHYR].CONFIGURE_ENABLE_BOTH= xephyr
87 [XEPHYR].USES_ON= mesa
88 [XEPHYR].XORG_COMPONENTS_ON= x11
96 [DMX].DESCRIPTION= Build as distributed multihead X server
97 [DMX].BUILD_DEPENDS_ON= libepoxy:single:standard
99 xorg-xtst:single:standard
100 xorg-xres:single:standard
101 [DMX].CONFIGURE_ENABLE_BOTH= dmx
102 [DMX].XORG_COMPONENTS_ON= dmx
113 [VIRTUAL].DESCRIPTION= Build as virtual framebuffer server
114 [VIRTUAL].BUILD_DEPENDS_ON= libepoxy:single:standard
115 mesa:drivers:standard
116 [VIRTUAL].CONFIGURE_ENABLE_BOTH= xvfb
117 [VIRTUAL].USES_ON= mesa
119 [XORG].DESCRIPTION= Build as X server (don't change setting!)
120 [XORG].BUILDRUN_DEPENDS_ON= libdrm:single:standard
121 libepoxy:single:standard
122 mesa:drivers:standard
123 [XORG].CONFIGURE_ENABLE_BOTH= docs
126 [XORG].SUB_FILES_ON= pkg-install-single
129 [XORG].XORG_COMPONENTS_ON= pciaccess
132 [WAYLAND].DESCRIPTION= Build Wayland X clients
133 [WAYLAND].BROKEN_ON= Wayland itself not yet implemented
134 [WAYLAND].BUILDRUN_DEPENDS_ON= libdrm:single:standard
135 libepoxy:single:standard
136 [WAYLAND].BUILD_DEPENDS_ON= mesa:drivers:standard
137 [WAYLAND].CONFIGURE_ARGS_ON= --disable-xquartz
139 [WAYLAND].CONFIGURE_ENABLE_BOTH= xwayland
140 [WAYLAND].XORG_COMPONENTS_ON= x11
143 [SUID].DESCRIPTION= Install the Xorg server with setuid bit set
146 # build libglx.so but don't install it yet. (done in pre-install)
147 ${REINPLACE_CMD} -e 's|@GLX_TRUE@GLXMODS =|@GLX_BOGUS@GLXMODS =|g' \
148 -e 's|^LTLIBRARIES = |LTLIBRARIES = libglx.la |g' \
149 ${WRKSRC}/hw/xfree86/dixmods/Makefile.in
151 do-install-XEPHYR-ON:
152 (cd ${WRKSRC}/hw/kdrive/ephyr && \
153 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
155 do-install-WAYLAND-ON:
156 (cd ${WRKSRC}/hw/xwayland && \
157 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
159 post-install-XORG-OFF:
160 ${RM} -r ${STAGEDIR}${PREFIX}/lib/xorg
161 ${RM} ${STAGEDIR}${PREFIX}/share/man/man1/Xserver.1
163 post-configure-DEVD-ON:
164 ${REINPLACE_CMD} -e 's|config\.c|config.c devd.c|g' \
165 -e 's|config\.lo|config.lo devd.lo|g' \
166 ${WRKSRC}/config/Makefile
167 ${REINPLACE_CMD} -e 's|^/\* #undef CONFIG_UDEV \*/|#define CONFIG_DEVD 1|' \
168 ${WRKSRC}/include/dix-config.h
170 do-install-VIRTUAL-ON:
171 (cd ${WRKSRC}/hw/vfb && \
172 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
175 (cd ${WRKSRC}/hw/xnest && \
176 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
179 (cd ${WRKSRC}/hw/dmx && \
180 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
182 post-install-XORG-ON:
183 # The .xorg dir because else the xorg-server might not load the
184 # correct libglx module.
185 @${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg
186 ${INSTALL_LIB} ${WRKSRC}/hw/xfree86/dixmods/.libs/libglx.so \
187 ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg/
188 @${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d
189 ${RM} -r ${STAGEDIR}/var
191 [FILE:71:descriptions/desc.single.standard]
192 This package contains the X.Org X server and some associated programs.
195 [FILE:60:descriptions/desc.single.virtual]
196 This package contains Xvfb, a virtual framebuffer X server.
199 [FILE:287:descriptions/desc.single.dmx]
200 Xdmx is proxy X server that provides multi-head support for multiple
201 displays attached to different machines (each of which is running a
202 typical X server). When Xinerama is used with Xdmx, the multiple displays
203 on multiple machines are presented to the user as a single unified screen.
206 [FILE:173:descriptions/desc.single.xephyr]
207 Xephyr is a kdrive server that outputs to a window on a pre-existing
208 'host' X display. Think Xnest but with support for modern extensions
209 like composite, damage and randr.
212 [FILE:78:descriptions/desc.single.nest]
213 This package contains Xnest, a nesting X Server that displays on an X
217 [FILE:148:descriptions/desc.single.wayland]
218 XWayland is an X Server running as a Wayland client, thus capable of
219 displaying native X11 client applications in a Wayland compositor
224 a732502f1db000cf36a376cd0c010ffdbf32ecdd7f1fa08ba7f5bdf9601cc197 5984528 xorg-server-1.19.6.tar.bz2
227 [FILE:2477:manifests/plist.single.standard]
228 %%ONLY-SUNOS%%include/xorg/solaris-amd64.il
230 %%SUID-ON%%@(,,4555) bin/Xorg
394 lib/pkgconfig/xorg-server.pc
395 lib/xorg/protocol.txt
407 lib/xorg/modules/drivers/modesetting_drv.so
408 lib/xorg/modules/extensions/.xorg/libglx.so
409 share/aclocal/xorg-server.m4
422 @dir etc/X11/xorg.conf.d
425 [FILE:34:manifests/plist.single.virtual]
427 share/man/man1/Xvfb.1.gz
430 [FILE:214:manifests/plist.single.dmx]
451 [FILE:38:manifests/plist.single.xephyr]
453 share/man/man1/Xephyr.1.gz
456 [FILE:36:manifests/plist.single.nest]
458 share/man/man1/Xnest.1.gz
461 [FILE:13:manifests/plist.single.wayland]
465 [FILE:293:patches/patch-config_config-backends.h]
466 --- config/config-backends.h.orig 2017-12-20 20:32:33 UTC
467 +++ config/config-backends.h
468 @@ -44,3 +44,8 @@ void config_hal_fini(void);
469 int config_wscons_init(void);
470 void config_wscons_fini(void);
474 +int config_devd_init(void);
475 +void config_devd_fini(void);
479 [FILE:537:patches/patch-config_config.c]
480 --- config/config.c.orig 2017-12-20 20:32:33 UTC
482 @@ -55,6 +55,9 @@ config_init(void)
483 #elif defined(CONFIG_WSCONS)
484 if (!config_wscons_init())
485 ErrorF("[config] failed to initialise wscons\n");
486 +#elif defined(CONFIG_DEVD)
487 + if (!config_devd_init())
488 + ErrorF("[config] failed to initialise devd\n");
492 @@ -67,6 +70,8 @@ config_fini(void)
494 #elif defined(CONFIG_WSCONS)
495 config_wscons_fini();
496 +#elif defined(CONFIG_DEVD)
497 + config_devd_fini();
503 [FILE:12171:patches/patch-config_devd.c]
504 --- /dev/null 2018-02-08 20:22:25 UTC
508 + * Copyright (c) 2012 Baptiste Daroussin
509 + * Copyright (c) 2013, 2014 Alex Kozlov
510 + * Copyright (c) 2014 Robert Millan
511 + * Copyright (c) 2014 Jean-Sebastien Pedron
513 + * Permission is hereby granted, free of charge, to any person obtaining a
514 + * copy of this software and associated documentation files (the "Software"),
515 + * to deal in the Software without restriction, including without limitation
516 + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
517 + * and/or sell copies of the Software, and to permit persons to whom the
518 + * Software is furnished to do so, subject to the following conditions:
520 + * The above copyright notice and this permission notice (including the next
521 + * paragraph) shall be included in all copies or substantial portions of the
524 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
525 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
526 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
527 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
528 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
529 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
530 + * DEALINGS IN THE SOFTWARE.
532 + * Author: Baptiste Daroussin <bapt@FreeBSD.org>
535 +#ifdef HAVE_DIX_CONFIG_H
536 +#include <dix-config.h>
539 +#include <sys/types.h>
540 +#include <sys/kbio.h>
541 +#include <sys/socket.h>
542 +#include <sys/stat.h>
543 +#include <sys/sysctl.h>
551 +#include <stdbool.h>
555 +#include "inputstr.h"
556 +#include "hotplug.h"
557 +#include "config-backends.h"
560 +#define DEVD_SOCK_PATH "/var/run/devd.pipe"
562 +#define DEVD_EVENT_ADD '+'
563 +#define DEVD_EVENT_REMOVE '-'
565 +#define RECONNECT_DELAY 5 * 1000
567 +static int sock_devd;
568 +static bool is_console_kbd = false;
569 +static bool is_kbdmux = false;
570 +static OsTimerPtr rtimer = NULL;
573 + const char *driver;
575 + const char *xdriver;
578 +static struct hw_type hw_types[] = {
579 + { "ukbd", ATTR_KEYBOARD, "kbd" },
580 + { "atkbd", ATTR_KEYBOARD, "kbd" },
581 + { "kbdmux", ATTR_KEYBOARD, "kbd" },
582 + { "sysmouse", ATTR_POINTER, "mouse" },
583 + { "ums", ATTR_POINTER, "mouse" },
584 + { "psm", ATTR_POINTER, "mouse" },
585 + { "vboxguest", ATTR_POINTER, "vboxmouse" },
586 + { "joy", ATTR_JOYSTICK, NULL },
587 + { "atp", ATTR_TOUCHPAD, NULL },
588 + { "uep", ATTR_TOUCHSCREEN, NULL },
589 + { NULL, -1, NULL },
593 +sysctl_exists(const struct hw_type *device, int unit,
594 + char *devname, size_t devname_len)
596 + char sysctlname[PATH_MAX];
600 + if (device == NULL || device->driver == NULL)
603 + /* Check if a sysctl exists. */
604 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%i.%%desc",
605 + device->driver, unit);
606 + ret = sysctlbyname(sysctlname, NULL, &len, NULL, 0);
608 + if (ret == 0 && len > 0) {
609 + snprintf(devname, devname_len, "%s%i", device->driver, unit);
617 +devpath_exists(const struct hw_type *device,
618 + char *devname, size_t devname_len)
624 + if (device == NULL || device->driver == NULL)
627 + /* Check if /dev/$driver exists. */
628 + asprintf(&devpath, "/dev/%s", device->driver);
629 + if (devpath == NULL)
632 + ret = stat(devpath, &st);
636 + strncpy(devname, device->driver, devname_len);
644 +sysctl_get_str(const char *sysctlname)
649 + if (sysctlname == NULL)
652 + if (sysctlbyname(sysctlname, NULL, &len, NULL, 0) == 0) {
653 + dest = malloc(len + 1);
655 + if (sysctlbyname(sysctlname, dest, &len, NULL, 0) == 0)
668 +device_added(const char *devname)
670 + char path[PATH_MAX];
671 + char sysctlname[PATH_MAX];
673 + char *product = NULL;
674 + char *config_info = NULL;
676 + InputOption *options = NULL;
677 + InputAttributes attrs = { };
678 + DeviceIntPtr dev = NULL;
682 + for (i = 0; hw_types[i].driver != NULL; i++) {
685 + len = strlen(hw_types[i].driver);
686 + if (strcmp(devname, hw_types[i].driver) == 0 ||
687 + (strncmp(devname, hw_types[i].driver, len) == 0 &&
688 + isnumber(*(devname + len)))) {
689 + attrs.flags |= hw_types[i].flag;
694 + if (hw_types[i].driver == NULL || hw_types[i].xdriver == NULL) {
695 + LogMessage(X_INFO, "config/devd: ignoring device %s\n",
700 + /* Skip keyboard devices if kbdmux is enabled */
701 + if (is_kbdmux && is_console_kbd && hw_types[i].flag & ATTR_KEYBOARD) {
702 + LogMessage(X_INFO, "config/devd: kbdmux is enabled, ignoring device %s\n",
707 + snprintf(path, sizeof(path), "/dev/%s", devname);
709 + options = input_option_new(NULL, "_source", "server/devd");
713 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%s.%%desc",
714 + hw_types[i].driver, devname + strlen(hw_types[i].driver));
715 + vendor = sysctl_get_str(sysctlname);
716 + if (vendor == NULL) {
717 + options = input_option_new(options, "name", devname);
720 + if ((walk = strchr(vendor, ' ')) != NULL) {
724 + if ((walk = strchr(product, ',')) != NULL)
728 + attrs.vendor = strdup(vendor);
730 + attrs.product = strdup(product);
731 + options = input_option_new(options, "name", product);
734 + options = input_option_new(options, "name", "(unnamed)");
739 + /* XXX implement usb_id */
740 + attrs.usb_id = NULL;
741 + attrs.device = strdup(path);
742 + options = input_option_new(options, "driver", hw_types[i].xdriver);
744 + fd = open(path, O_RDONLY);
747 + options = input_option_new(options, "device", path);
750 + if (attrs.flags & ~ATTR_KEYBOARD) {
751 + LogMessage(X_INFO, "config/devd: device %s already opened\n",
755 + * Fail if cannot open device, it breaks AllowMouseOpenFail,
756 + * but it should not matter when config/devd enabled
761 + if (is_console_kbd) {
763 + * There can be only one keyboard attached to console and
764 + * it is already added.
766 + LogMessage(X_WARNING, "config/devd: console keyboard is "
767 + "already added, ignoring %s (%s)\n",
768 + attrs.product, path);
773 + * Don't pass "device" option if the keyboard is already
774 + * attached to the console (ie. open() fails).
775 + * This would activate a special logic in xf86-input-keyboard.
776 + * Prevent any other attached to console keyboards being
777 + * processed. There can be only one such device.
779 + is_console_kbd = true;
782 + if (asprintf(&config_info, "devd:%s", devname) == -1) {
783 + config_info = NULL;
787 + if (device_is_duplicate(config_info)) {
788 + LogMessage(X_WARNING, "config/devd: device %s (%s) already added. "
789 + "ignoring\n", attrs.product, path);
793 + options = input_option_new(options, "config_info", config_info);
794 + LogMessage(X_INFO, "config/devd: adding input device %s (%s)\n",
795 + attrs.product, path);
797 + NewInputDeviceRequest(options, &attrs, &dev);
801 + input_option_free_list(&options);
802 + free(attrs.usb_id);
803 + free(attrs.product);
804 + free(attrs.device);
805 + free(attrs.vendor);
809 +device_removed(char *devname)
813 + if (asprintf(&config_info, "devd:%s", devname) == -1)
816 + remove_devices("devd", config_info);
821 +static bool is_kbdmux_enabled(void)
823 + /* Xorg uses /dev/ttyv0 as a console device */
824 + /* const char device[]="/dev/console"; */
825 + const char device[]="/dev/ttyv0";
826 + keyboard_info_t info;
829 + fd = open(device, O_RDONLY);
834 + if (ioctl(fd, KDGKBINFO, &info) == -1) {
841 + if (!strncmp(info.kb_name, "kbdmux", 6))
848 +disconnect_devd(int sock)
851 + RemoveGeneralSocket(sock);
859 + struct sockaddr_un devd;
862 + sock = socket(AF_UNIX, SOCK_STREAM, 0);
864 + LogMessage(X_ERROR, "config/devd: fail opening stream socket\n");
868 + devd.sun_family = AF_UNIX;
869 + strlcpy(devd.sun_path, DEVD_SOCK_PATH, sizeof(devd.sun_path));
871 + if (connect(sock, (struct sockaddr *) &devd, sizeof(devd)) < 0) {
873 + LogMessage(X_ERROR, "config/devd: fail to connect to devd\n");
877 + AddGeneralSocket(sock);
883 +reconnect_handler(OsTimerPtr timer, CARD32 time, void *arg)
887 + if ((newsock = connect_devd()) > 0) {
888 + sock_devd = newsock;
891 + LogMessage(X_INFO, "config/devd: reopening devd socket\n");
895 + /* Try again after RECONNECT_DELAY */
896 + return RECONNECT_DELAY;
900 +socket_getline(int fd, char **out)
902 + char *buf, *newbuf;
903 + ssize_t ret, cap, sz = 0;
907 + buf = malloc(cap * sizeof(char));
912 + ret = read(sock_devd, &c, 1);
914 + if (errno == EINTR)
918 + /* EOF - devd socket is lost */
919 + } else if (ret == 0) {
920 + disconnect_devd(sock_devd);
921 + rtimer = TimerSet(NULL, 0, 1, reconnect_handler, NULL);
922 + LogMessage(X_WARNING, "config/devd: devd socket is lost\n");
929 + if (sz + 1 >= cap) {
931 + newbuf = realloc(buf, cap * sizeof(char));
948 + /* Number of bytes in the line, not counting the line break */
953 +wakeup_handler(void *data, int err, void *read_mask)
961 + if (FD_ISSET(sock_devd, (fd_set *) read_mask)) {
962 + if (socket_getline(sock_devd, &line) < 0)
965 + walk = strchr(line + 1, ' ');
970 + case DEVD_EVENT_ADD:
971 + device_added(line + 1);
973 + case DEVD_EVENT_REMOVE:
974 + device_removed(line + 1);
984 +block_handler(void *data, struct timeval **tv, void *read_mask)
989 +config_devd_init(void)
991 + char devicename[1024];
994 + LogMessage(X_INFO, "config/devd: probing input devices...\n");
997 + * Add fake keyboard and give up on keyboards management
998 + * if kbdmux is enabled
1000 + if ((is_kbdmux = is_kbdmux_enabled()) == true)
1001 + device_added("kbdmux");
1003 + for (i = 0; hw_types[i].driver != NULL; i++) {
1004 + /* First scan the sysctl to determine the hardware */
1005 + for (j = 0; j < 16; j++) {
1006 + if (sysctl_exists(&hw_types[i], j,
1007 + devicename, sizeof(devicename)) != 0)
1008 + device_added(devicename);
1011 + if (devpath_exists(&hw_types[i], devicename, sizeof(devicename)) != 0)
1012 + device_added(devicename);
1015 + if ((sock_devd = connect_devd()) < 0)
1018 + RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
1024 +config_devd_fini(void)
1026 + LogMessage(X_INFO, "config/devd: terminating backend...\n");
1029 + TimerFree(rtimer);
1033 + disconnect_devd(sock_devd);
1035 + RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
1037 + is_console_kbd = false;
1041 [FILE:1457:patches/patch-configure]
1042 --- configure.orig 2017-12-20 20:32:47 UTC
1044 @@ -12101,7 +12101,6 @@ fi
1046 if test x$FILE_MAN_SUFFIX = x ; then
1048 - solaris*) FILE_MAN_SUFFIX=4 ;;
1049 *) FILE_MAN_SUFFIX=5 ;;
1052 @@ -12111,7 +12110,6 @@ fi
1054 if test x$MISC_MAN_SUFFIX = x ; then
1056 - solaris*) MISC_MAN_SUFFIX=5 ;;
1057 *) MISC_MAN_SUFFIX=7 ;;
1060 @@ -12121,7 +12119,6 @@ fi
1062 if test x$DRIVER_MAN_SUFFIX = x ; then
1064 - solaris*) DRIVER_MAN_SUFFIX=7 ;;
1065 *) DRIVER_MAN_SUFFIX=4 ;;
1068 @@ -12131,7 +12128,6 @@ fi
1070 if test x$ADMIN_MAN_SUFFIX = x ; then
1072 - solaris*) ADMIN_MAN_SUFFIX=1m ;;
1073 *) ADMIN_MAN_SUFFIX=8 ;;
1076 @@ -21754,7 +21750,7 @@ if test `${RAWCPP} < conftest.$ac_ext |
1077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1078 $as_echo "no" >&6; }
1080 - if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
1082 TRADITIONALCPPFLAGS="-traditional"
1083 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1085 @@ -23263,9 +23259,14 @@ $as_echo "#define USE_ALPHA_PIO 1" >>con
1087 GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee"
1092 DEFAULT_INT10="stub"
1095 + $as_echo "#define USE_DEV_IO 1" >>confdefs.h
1103 [FILE:256:patches/patch-hw_kdrive_ephyr_hostx.c]
1104 --- hw/kdrive/ephyr/hostx.c.orig 2017-12-20 20:32:33 UTC
1105 +++ hw/kdrive/ephyr/hostx.c
1107 #include <string.h> /* for memset */
1112 #include <sys/ipc.h>
1113 #include <sys/shm.h>
1116 [FILE:785:patches/patch-hw_xfree86_common_xf86AutoConfig.c]
1117 --- hw/xfree86/common/xf86AutoConfig.c.orig 2017-12-20 20:32:33 UTC
1118 +++ hw/xfree86/common/xf86AutoConfig.c
1119 @@ -276,7 +276,7 @@ listPossibleVideoDrivers(char *matches[]
1120 i += xf86PciMatchDriver(&matches[i], nmatches - i);
1123 -#if defined(__linux__)
1124 +#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
1125 matches[i++] = xnfstrdup("modesetting");
1128 @@ -285,8 +285,10 @@ listPossibleVideoDrivers(char *matches[]
1129 if (i < (nmatches - 1)) {
1130 #if !defined(__linux__) && defined(__sparc__)
1131 matches[i++] = xnfstrdup("wsfb");
1133 +#elif defined(__linux__)
1134 matches[i++] = xnfstrdup("fbdev");
1135 +#elif defined(__FreeBSD__)
1136 + matches[i++] = xnfstrdup("scfb");
1142 [FILE:700:patches/patch-hw_xfree86_common_xf86Config.c]
1143 --- hw/xfree86/common/xf86Config.c.orig 2017-12-20 20:32:33 UTC
1144 +++ hw/xfree86/common/xf86Config.c
1145 @@ -1375,13 +1375,16 @@ checkCoreInputDevices(serverLayoutPtr se
1148 if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) {
1149 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1150 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
1151 + defined(CONFIG_DEVD)
1152 const char *config_backend;
1154 #if defined(CONFIG_HAL)
1155 config_backend = "HAL";
1156 #elif defined(CONFIG_UDEV)
1157 config_backend = "udev";
1158 +#elif defined(CONFIG_DEVD)
1159 + config_backend = "devd";
1161 config_backend = "wscons";
1165 [FILE:496:patches/patch-hw_xfree86_common_xf86Globals.c]
1166 --- hw/xfree86/common/xf86Globals.c.orig 2017-12-20 20:32:33 UTC
1167 +++ hw/xfree86/common/xf86Globals.c
1168 @@ -122,7 +122,8 @@ xf86InfoRec xf86Info = {
1170 .disableRandR = FALSE,
1171 .randRFrom = X_DEFAULT,
1172 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1173 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
1174 + defined(CONFIG_DEVD)
1175 .forceInputDevices = FALSE,
1176 .autoAddDevices = TRUE,
1177 .autoEnableDevices = TRUE,
1180 [FILE:690:patches/patch-hw_xfree86_common_xf86Xinput.c]
1181 --- hw/xfree86/common/xf86Xinput.c.orig 2017-12-20 20:32:33 UTC
1182 +++ hw/xfree86/common/xf86Xinput.c
1183 @@ -874,7 +874,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, D
1185 InputDriverPtr drv = NULL;
1186 DeviceIntPtr dev = NULL;
1192 @@ -1037,6 +1037,7 @@ NewInputDeviceRequest(InputOption *optio
1193 if (strcmp(key, "_source") == 0 &&
1194 (strcmp(value, "server/hal") == 0 ||
1195 strcmp(value, "server/udev") == 0 ||
1196 + strcmp(value, "server/devd") == 0 ||
1197 strcmp(value, "server/wscons") == 0)) {
1199 if (!xf86Info.autoAddDevices) {
1202 [FILE:450:patches/patch-hw_xfree86_os-support_bsd_bsd__init.c]
1203 --- hw/xfree86/os-support/bsd/bsd_init.c.orig 2017-12-20 20:32:33 UTC
1204 +++ hw/xfree86/os-support/bsd/bsd_init.c
1205 @@ -230,6 +230,9 @@ xf86OpenConsole()
1206 * Add cases for other *BSD that behave the same.
1208 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
1209 +#if defined(__sparc64__)
1210 + pci_system_init_dev_mem(fd);
1213 i = atof(uts.release) * 100;
1217 [FILE:315:patches/patch-hw_xfree86_os-support_bsd_i386__video.c]
1218 Index: programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c
1219 --- hw/xfree86/os-support/bsd/i386_video.c.orig 2017-12-20 20:32:33 UTC
1220 +++ hw/xfree86/os-support/bsd/i386_video.c
1222 #include "xf86Priv.h"
1225 +#include <sys/types.h>
1226 #include <sys/mman.h>
1228 #include "xf86_OSlib.h"
1231 [FILE:380:patches/patch-hw_xfree86_os-support_bsd_ppc__video.c]
1232 --- hw/xfree86/os-support/bsd/ppc_video.c.orig 2017-12-20 20:32:33 UTC
1233 +++ hw/xfree86/os-support/bsd/ppc_video.c
1234 @@ -79,7 +79,11 @@ xf86DisableIO()
1237 if (ioBase != MAP_FAILED) {
1238 +#if defined(__FreeBSD__)
1239 + munmap(__DEVOLATILE(unsigned char *, ioBase), 0x10000);
1241 munmap(__UNVOLATILE(ioBase), 0x10000);
1243 ioBase = MAP_FAILED;
1248 [FILE:714:patches/patch-hw_xfree86_os-support_solaris_sun__init.c]
1249 --- hw/xfree86/os-support/solaris/sun_init.c.orig 2017-12-20 20:32:33 UTC
1250 +++ hw/xfree86/os-support/solaris/sun_init.c
1251 @@ -54,6 +54,22 @@ static int xf86StartVT = -1;
1252 static int vtEnabled = 0;
1256 +#define VTIOC ('V'<<8)
1257 +#define VT_OPENQRY (VTIOC|1)
1258 +#define VT_SETMODE (VTIOC|2)
1259 +#define VT_GETMODE (VTIOC|3)
1260 +#define VT_ACTIVATE (VTIOC|5)
1261 +#define VT_WAITACTIVE (VTIOC|6)
1262 +#define VT_GETSTATE (VTIOC|100)
1263 +#define VT_ENABLED (VTIOC|101)
1264 +#define VT_SETDISPINFO (VTIOC|103)
1265 +#define VT_GET_CONSUSER (VTIOC|108)
1266 +#define VT_SET_CONSUSER (VTIOC|109)
1268 +enum { VT_AUTO = 0, VT_PROCESS };
1271 /* Device to open as xf86Info.consoleFd */
1272 static char consoleDev[PATH_MAX] = "/dev/fb";
1276 [FILE:193:patches/patch-os_backtrace.c]
1277 --- os/backtrace.c.orig 2017-12-20 20:32:33 UTC
1283 +#include <unistd.h>
1285 #ifdef HAVE_LIBUNWIND
1289 [FILE:1021:patches/patch-test_simple-xinit.c]
1290 --- test/simple-xinit.c.orig 2017-12-20 20:32:33 UTC
1291 +++ test/simple-xinit.c
1293 #include <sys/wait.h>
1297 +#include <sys/varargs.h>
1299 +vasprintf(char **strp, const char *fmt, va_list args)
1301 + va_list args_copy;
1302 + int status, needed;
1304 + va_copy(args_copy, args);
1305 + needed = vsnprintf(NULL, 0, fmt, args_copy);
1306 + va_end(args_copy);
1311 + *strp = malloc(needed + 1);
1312 + if (*strp == NULL)
1314 + status = vsnprintf(*strp, needed + 1, fmt, args);
1325 +asprintf(char **strp, const char *fmt, ...)
1330 + va_start(args, fmt);
1331 + status = vasprintf(strp, fmt, args);
1338 kill_server(int server_pid)
1342 [FILE:215:patches/patch-xkb_Makefile.in]
1343 --- xkb/Makefile.in.orig 2017-12-20 20:32:55 UTC
1345 @@ -886,7 +886,7 @@ info: info-am
1349 -install-data-am: install-dist_xkbcompiledDATA
1352 install-dvi: install-dvi-am
1356 [FILE:135:files/pkg-deinstall-single.in]
1359 PREFIX="${PKG_PREFIX-/raven}"
1363 /bin/rm -rf ${PREFIX}/lib/xorg/modules/extensions/libglx.so*
1368 [FILE:531:files/pkg-install-single.in]
1371 PREFIX="${PKG_PREFIX-/raven}"
1375 if [ -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 ]; then
1376 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1377 ${PREFIX}/lib/xorg/modules/extensions/libglx.so
1378 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1379 ${PREFIX}/lib/xorg/modules/extensions/libglx.so.1
1381 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.xorg/libglx.so \
1382 ${PREFIX}/lib/xorg/modules/extensions/libglx.so