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.4.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= bigreqsproto compositeproto damageproto dri2proto
48 dri3proto fixesproto fontsproto glproto inputproto
49 kbproto pixman presentproto randrproto recordproto
50 renderproto resourceproto scrnsaverproto videoproto
51 xtransproto xcmiscproto xextproto xf86driproto
52 xineramaproto xproto xshmfence xau xdmcp xfont2
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 [DEVD].DESCRIPTION= Use devd for autoconfiguration of input devices
76 [NEST].DESCRIPTION= Build as nesting X server
77 [NEST].BUILD_DEPENDS_ON= libepoxy:single:standard
79 [NEST].CONFIGURE_ENABLE_BOTH= xnest
81 [NEST].XORG_COMPONENTS_ON= x11
84 [XEPHYR].DESCRIPTION= Build as kdrive-base X server
85 [XEPHYR].BUILDRUN_DEPENDS_ON= libdrm:single:standard
86 libepoxy:single:standard
87 [XEPHYR].BUILD_DEPENDS_ON= mesa:drivers:standard
88 [XEPHYR].CONFIGURE_ENABLE_BOTH= xephyr
90 [XEPHYR].USES_ON= mesa
91 [XEPHYR].XORG_COMPONENTS_ON= x11
99 [DMX].DESCRIPTION= Build as distributed multihead X server
100 [DMX].BUILD_DEPENDS_ON= libepoxy:single:standard
101 mesa:drivers:standard
102 xorg-xtst:single:standard
103 xorg-xres:single:standard
104 [DMX].CONFIGURE_ENABLE_BOTH= dmx
105 [DMX].XORG_COMPONENTS_ON= dmx
116 [VIRTUAL].DESCRIPTION= Build as virtual framebuffer server
117 [VIRTUAL].BUILD_DEPENDS_ON= libepoxy:single:standard
118 mesa:drivers:standard
119 [VIRTUAL].CONFIGURE_ENABLE_BOTH= xvfb
120 [VIRTUAL].USES_ON= mesa
122 [XORG].DESCRIPTION= Build as X server (don't change setting!)
123 [XORG].BUILDRUN_DEPENDS_ON= libdrm:single:standard
124 libepoxy:single:standard
125 mesa:drivers:standard
126 [XORG].CONFIGURE_ENABLE_BOTH= docs
129 [XORG].SUB_FILES_ON= pkg-install
132 [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 @${REINPLACE_CMD} 's/test.*-traditional.*;/true;/' ${WRKSRC}/configure
152 # build libglx.so but don't install it yet. (done in pre-install)
153 @${REINPLACE_CMD} -e 's|@GLX_TRUE@GLXMODS =|@GLX_BOGUS@GLXMODS =|g' \
154 -e 's|^LTLIBRARIES = |LTLIBRARIES = libglx.la |g' \
155 ${WRKSRC}/hw/xfree86/dixmods/Makefile.in
157 do-install-XEPHYR-ON:
158 (cd ${WRKSRC}/hw/kdrive/ephyr && \
159 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
161 do-install-WAYLAND-ON:
162 (cd ${WRKSRC}/hw/xwayland && \
163 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
165 post-install-XORG-OFF:
166 ${RM} -r ${STAGEDIR}${PREFIX}/lib/xorg
167 ${RM} ${STAGEDIR}${PREFIX}/share/man/man1/Xserver.1
169 post-configure-DEVD-ON:
170 @${REINPLACE_CMD} -e 's|config\.c|config.c devd.c|g' \
171 -e 's|config\.lo|config.lo devd.lo|g' \
172 ${WRKSRC}/config/Makefile
173 @${REINPLACE_CMD} -e 's|^/\* #undef CONFIG_UDEV \*/|#define CONFIG_DEVD 1|' \
174 ${WRKSRC}/include/dix-config.h
176 do-install-VIRTUAL-ON:
177 (cd ${WRKSRC}/hw/vfb && \
178 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
181 (cd ${WRKSRC}/hw/xnest && \
182 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
185 (cd ${WRKSRC}/hw/dmx && \
186 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
188 post-install-XORG-ON:
189 # The .xorg dir because else the xorg-server might not load the
190 # correct libglx module.
191 @${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg
192 ${INSTALL_LIB} ${WRKSRC}/hw/xfree86/dixmods/.libs/libglx.so \
193 ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg/
194 @${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d
195 ${RM} -r ${STAGEDIR}/var
197 [FILE:71:descriptions/desc.single.standard]
198 This package contains the X.Org X server and some associated programs.
201 [FILE:60:descriptions/desc.single.virtual]
202 This package contains Xvfb, a virtual framebuffer X server.
205 [FILE:287:descriptions/desc.single.dmx]
206 Xdmx is proxy X server that provides multi-head support for multiple
207 displays attached to different machines (each of which is running a
208 typical X server). When Xinerama is used with Xdmx, the multiple displays
209 on multiple machines are presented to the user as a single unified screen.
212 [FILE:173:descriptions/desc.single.xephyr]
213 Xephyr is a kdrive server that outputs to a window on a pre-existing
214 'host' X display. Think Xnest but with support for modern extensions
215 like composite, damage and randr.
218 [FILE:78:descriptions/desc.single.nest]
219 This package contains Xnest, a nesting X Server that displays on an X
223 [FILE:148:descriptions/desc.single.wayland]
224 XWayland is an X Server running as a Wayland client, thus capable of
225 displaying native X11 client applications in a Wayland compositor
230 aa758acea91deaf1f95069ddc5ea3818e13675fb14fef40ad1b3d0b2bf03c9a8 5962834 xorg-server-1.19.4.tar.bz2
233 [FILE:2433:manifests/plist.single.standard]
236 %%SUID-ON%%@(,,4555) bin/Xorg
399 lib/xorg/modules/drivers/modesetting_drv.so
400 lib/xorg/modules/extensions/.xorg/libglx.so
412 lib/xorg/protocol.txt
413 lib/pkgconfig/xorg-server.pc
426 share/aclocal/xorg-server.m4
427 @dir etc/X11/xorg.conf.d
430 [FILE:34:manifests/plist.single.virtual]
432 share/man/man1/Xvfb.1.gz
435 [FILE:214:manifests/plist.single.dmx]
456 [FILE:38:manifests/plist.single.xephyr]
458 share/man/man1/Xephyr.1.gz
461 [FILE:36:manifests/plist.single.nest]
463 share/man/man1/Xnest.1.gz
466 [FILE:13:manifests/plist.single.wayland]
470 [FILE:293:patches/patch-config_config-backends.h]
471 --- config/config-backends.h.orig 2016-07-15 16:17:45 UTC
472 +++ config/config-backends.h
473 @@ -44,3 +44,8 @@ void config_hal_fini(void);
474 int config_wscons_init(void);
475 void config_wscons_fini(void);
479 +int config_devd_init(void);
480 +void config_devd_fini(void);
484 [FILE:537:patches/patch-config_config.c]
485 --- config/config.c.orig 2016-07-19 17:07:29 UTC
487 @@ -55,6 +55,9 @@ config_init(void)
488 #elif defined(CONFIG_WSCONS)
489 if (!config_wscons_init())
490 ErrorF("[config] failed to initialise wscons\n");
491 +#elif defined(CONFIG_DEVD)
492 + if (!config_devd_init())
493 + ErrorF("[config] failed to initialise devd\n");
497 @@ -67,6 +70,8 @@ config_fini(void)
499 #elif defined(CONFIG_WSCONS)
500 config_wscons_fini();
501 +#elif defined(CONFIG_DEVD)
502 + config_devd_fini();
508 [FILE:12180:patches/patch-config_devd.c]
509 --- config/devd.c.orig 2017-01-19 15:20:42 UTC
513 + * Copyright (c) 2012 Baptiste Daroussin
514 + * Copyright (c) 2013, 2014 Alex Kozlov
515 + * Copyright (c) 2014 Robert Millan
516 + * Copyright (c) 2014 Jean-Sebastien Pedron
518 + * Permission is hereby granted, free of charge, to any person obtaining a
519 + * copy of this software and associated documentation files (the "Software"),
520 + * to deal in the Software without restriction, including without limitation
521 + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
522 + * and/or sell copies of the Software, and to permit persons to whom the
523 + * Software is furnished to do so, subject to the following conditions:
525 + * The above copyright notice and this permission notice (including the next
526 + * paragraph) shall be included in all copies or substantial portions of the
529 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
530 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
531 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
532 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
533 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
534 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
535 + * DEALINGS IN THE SOFTWARE.
537 + * Author: Baptiste Daroussin <bapt@FreeBSD.org>
540 +#ifdef HAVE_DIX_CONFIG_H
541 +#include <dix-config.h>
544 +#include <sys/types.h>
545 +#include <sys/kbio.h>
546 +#include <sys/socket.h>
547 +#include <sys/stat.h>
548 +#include <sys/sysctl.h>
556 +#include <stdbool.h>
560 +#include "inputstr.h"
561 +#include "hotplug.h"
562 +#include "config-backends.h"
565 +#define DEVD_SOCK_PATH "/var/run/devd.pipe"
567 +#define DEVD_EVENT_ADD '+'
568 +#define DEVD_EVENT_REMOVE '-'
570 +#define RECONNECT_DELAY 5 * 1000
572 +static int sock_devd;
573 +static bool is_console_kbd = false;
574 +static bool is_kbdmux = false;
575 +static OsTimerPtr rtimer = NULL;
578 + const char *driver;
580 + const char *xdriver;
583 +static struct hw_type hw_types[] = {
584 + { "ukbd", ATTR_KEYBOARD, "kbd" },
585 + { "atkbd", ATTR_KEYBOARD, "kbd" },
586 + { "kbdmux", ATTR_KEYBOARD, "kbd" },
587 + { "sysmouse", ATTR_POINTER, "mouse" },
588 + { "ums", ATTR_POINTER, "mouse" },
589 + { "psm", ATTR_POINTER, "mouse" },
590 + { "vboxguest", ATTR_POINTER, "vboxmouse" },
591 + { "joy", ATTR_JOYSTICK, NULL },
592 + { "atp", ATTR_TOUCHPAD, NULL },
593 + { "uep", ATTR_TOUCHSCREEN, NULL },
594 + { NULL, -1, NULL },
598 +sysctl_exists(const struct hw_type *device, int unit,
599 + char *devname, size_t devname_len)
601 + char sysctlname[PATH_MAX];
605 + if (device == NULL || device->driver == NULL)
608 + /* Check if a sysctl exists. */
609 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%i.%%desc",
610 + device->driver, unit);
611 + ret = sysctlbyname(sysctlname, NULL, &len, NULL, 0);
613 + if (ret == 0 && len > 0) {
614 + snprintf(devname, devname_len, "%s%i", device->driver, unit);
622 +devpath_exists(const struct hw_type *device,
623 + char *devname, size_t devname_len)
629 + if (device == NULL || device->driver == NULL)
632 + /* Check if /dev/$driver exists. */
633 + asprintf(&devpath, "/dev/%s", device->driver);
634 + if (devpath == NULL)
637 + ret = stat(devpath, &st);
641 + strncpy(devname, device->driver, devname_len);
649 +sysctl_get_str(const char *sysctlname)
654 + if (sysctlname == NULL)
657 + if (sysctlbyname(sysctlname, NULL, &len, NULL, 0) == 0) {
658 + dest = malloc(len + 1);
660 + if (sysctlbyname(sysctlname, dest, &len, NULL, 0) == 0)
673 +device_added(const char *devname)
675 + char path[PATH_MAX];
676 + char sysctlname[PATH_MAX];
678 + char *product = NULL;
679 + char *config_info = NULL;
681 + InputOption *options = NULL;
682 + InputAttributes attrs = { };
683 + DeviceIntPtr dev = NULL;
687 + for (i = 0; hw_types[i].driver != NULL; i++) {
690 + len = strlen(hw_types[i].driver);
691 + if (strcmp(devname, hw_types[i].driver) == 0 ||
692 + (strncmp(devname, hw_types[i].driver, len) == 0 &&
693 + isnumber(*(devname + len)))) {
694 + attrs.flags |= hw_types[i].flag;
699 + if (hw_types[i].driver == NULL || hw_types[i].xdriver == NULL) {
700 + LogMessage(X_INFO, "config/devd: ignoring device %s\n",
705 + /* Skip keyboard devices if kbdmux is enabled */
706 + if (is_kbdmux && is_console_kbd && hw_types[i].flag & ATTR_KEYBOARD) {
707 + LogMessage(X_INFO, "config/devd: kbdmux is enabled, ignoring device %s\n",
712 + snprintf(path, sizeof(path), "/dev/%s", devname);
714 + options = input_option_new(NULL, "_source", "server/devd");
718 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%s.%%desc",
719 + hw_types[i].driver, devname + strlen(hw_types[i].driver));
720 + vendor = sysctl_get_str(sysctlname);
721 + if (vendor == NULL) {
722 + options = input_option_new(options, "name", devname);
725 + if ((walk = strchr(vendor, ' ')) != NULL) {
729 + if ((walk = strchr(product, ',')) != NULL)
733 + attrs.vendor = strdup(vendor);
735 + attrs.product = strdup(product);
736 + options = input_option_new(options, "name", product);
739 + options = input_option_new(options, "name", "(unnamed)");
744 + /* XXX implement usb_id */
745 + attrs.usb_id = NULL;
746 + attrs.device = strdup(path);
747 + options = input_option_new(options, "driver", hw_types[i].xdriver);
749 + fd = open(path, O_RDONLY);
752 + options = input_option_new(options, "device", path);
755 + if (attrs.flags & ~ATTR_KEYBOARD) {
756 + LogMessage(X_INFO, "config/devd: device %s already opened\n",
760 + * Fail if cannot open device, it breaks AllowMouseOpenFail,
761 + * but it should not matter when config/devd enabled
766 + if (is_console_kbd) {
768 + * There can be only one keyboard attached to console and
769 + * it is already added.
771 + LogMessage(X_WARNING, "config/devd: console keyboard is "
772 + "already added, ignoring %s (%s)\n",
773 + attrs.product, path);
778 + * Don't pass "device" option if the keyboard is already
779 + * attached to the console (ie. open() fails).
780 + * This would activate a special logic in xf86-input-keyboard.
781 + * Prevent any other attached to console keyboards being
782 + * processed. There can be only one such device.
784 + is_console_kbd = true;
787 + if (asprintf(&config_info, "devd:%s", devname) == -1) {
788 + config_info = NULL;
792 + if (device_is_duplicate(config_info)) {
793 + LogMessage(X_WARNING, "config/devd: device %s (%s) already added. "
794 + "ignoring\n", attrs.product, path);
798 + options = input_option_new(options, "config_info", config_info);
799 + LogMessage(X_INFO, "config/devd: adding input device %s (%s)\n",
800 + attrs.product, path);
802 + NewInputDeviceRequest(options, &attrs, &dev);
806 + input_option_free_list(&options);
807 + free(attrs.usb_id);
808 + free(attrs.product);
809 + free(attrs.device);
810 + free(attrs.vendor);
814 +device_removed(char *devname)
818 + if (asprintf(&config_info, "devd:%s", devname) == -1)
821 + remove_devices("devd", config_info);
826 +static bool is_kbdmux_enabled(void)
828 + /* Xorg uses /dev/ttyv0 as a console device */
829 + /* const char device[]="/dev/console"; */
830 + const char device[]="/dev/ttyv0";
831 + keyboard_info_t info;
834 + fd = open(device, O_RDONLY);
839 + if (ioctl(fd, KDGKBINFO, &info) == -1) {
846 + if (!strncmp(info.kb_name, "kbdmux", 6))
853 +disconnect_devd(int sock)
856 + RemoveGeneralSocket(sock);
864 + struct sockaddr_un devd;
867 + sock = socket(AF_UNIX, SOCK_STREAM, 0);
869 + LogMessage(X_ERROR, "config/devd: fail opening stream socket\n");
873 + devd.sun_family = AF_UNIX;
874 + strlcpy(devd.sun_path, DEVD_SOCK_PATH, sizeof(devd.sun_path));
876 + if (connect(sock, (struct sockaddr *) &devd, sizeof(devd)) < 0) {
878 + LogMessage(X_ERROR, "config/devd: fail to connect to devd\n");
882 + AddGeneralSocket(sock);
888 +reconnect_handler(OsTimerPtr timer, CARD32 time, void *arg)
892 + if ((newsock = connect_devd()) > 0) {
893 + sock_devd = newsock;
896 + LogMessage(X_INFO, "config/devd: reopening devd socket\n");
900 + /* Try again after RECONNECT_DELAY */
901 + return RECONNECT_DELAY;
905 +socket_getline(int fd, char **out)
907 + char *buf, *newbuf;
908 + ssize_t ret, cap, sz = 0;
912 + buf = malloc(cap * sizeof(char));
917 + ret = read(sock_devd, &c, 1);
919 + if (errno == EINTR)
923 + /* EOF - devd socket is lost */
924 + } else if (ret == 0) {
925 + disconnect_devd(sock_devd);
926 + rtimer = TimerSet(NULL, 0, 1, reconnect_handler, NULL);
927 + LogMessage(X_WARNING, "config/devd: devd socket is lost\n");
934 + if (sz + 1 >= cap) {
936 + newbuf = realloc(buf, cap * sizeof(char));
953 + /* Number of bytes in the line, not counting the line break */
958 +wakeup_handler(void *data, int err, void *read_mask)
966 + if (FD_ISSET(sock_devd, (fd_set *) read_mask)) {
967 + if (socket_getline(sock_devd, &line) < 0)
970 + walk = strchr(line + 1, ' ');
975 + case DEVD_EVENT_ADD:
976 + device_added(line + 1);
978 + case DEVD_EVENT_REMOVE:
979 + device_removed(line + 1);
989 +block_handler(void *data, struct timeval **tv, void *read_mask)
994 +config_devd_init(void)
996 + char devicename[1024];
999 + LogMessage(X_INFO, "config/devd: probing input devices...\n");
1002 + * Add fake keyboard and give up on keyboards management
1003 + * if kbdmux is enabled
1005 + if ((is_kbdmux = is_kbdmux_enabled()) == true)
1006 + device_added("kbdmux");
1008 + for (i = 0; hw_types[i].driver != NULL; i++) {
1009 + /* First scan the sysctl to determine the hardware */
1010 + for (j = 0; j < 16; j++) {
1011 + if (sysctl_exists(&hw_types[i], j,
1012 + devicename, sizeof(devicename)) != 0)
1013 + device_added(devicename);
1016 + if (devpath_exists(&hw_types[i], devicename, sizeof(devicename)) != 0)
1017 + device_added(devicename);
1020 + if ((sock_devd = connect_devd()) < 0)
1023 + RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
1029 +config_devd_fini(void)
1031 + LogMessage(X_INFO, "config/devd: terminating backend...\n");
1034 + TimerFree(rtimer);
1038 + disconnect_devd(sock_devd);
1040 + RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
1042 + is_console_kbd = false;
1046 [FILE:372:patches/patch-configure]
1047 --- configure.orig 2017-03-15 18:05:39 UTC
1049 @@ -23280,9 +23280,14 @@ $as_echo "#define USE_ALPHA_PIO 1" >>con
1051 GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee"
1056 DEFAULT_INT10="stub"
1059 + $as_echo "#define USE_DEV_IO 1" >>confdefs.h
1067 [FILE:785:patches/patch-hw_xfree86_common_xf86AutoConfig.c]
1068 --- hw/xfree86/common/xf86AutoConfig.c.orig 2017-01-11 20:00:58 UTC
1069 +++ hw/xfree86/common/xf86AutoConfig.c
1070 @@ -276,7 +276,7 @@ listPossibleVideoDrivers(char *matches[]
1071 i += xf86PciMatchDriver(&matches[i], nmatches - i);
1074 -#if defined(__linux__)
1075 +#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
1076 matches[i++] = xnfstrdup("modesetting");
1079 @@ -285,8 +285,10 @@ listPossibleVideoDrivers(char *matches[]
1080 if (i < (nmatches - 1)) {
1081 #if !defined(__linux__) && defined(__sparc__)
1082 matches[i++] = xnfstrdup("wsfb");
1084 +#elif defined(__linux__)
1085 matches[i++] = xnfstrdup("fbdev");
1086 +#elif defined(__FreeBSD__)
1087 + matches[i++] = xnfstrdup("scfb");
1093 [FILE:700:patches/patch-hw_xfree86_common_xf86Config.c]
1094 --- hw/xfree86/common/xf86Config.c.orig 2016-07-19 17:14:30 UTC
1095 +++ hw/xfree86/common/xf86Config.c
1096 @@ -1410,13 +1410,16 @@ checkCoreInputDevices(serverLayoutPtr se
1099 if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) {
1100 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1101 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
1102 + defined(CONFIG_DEVD)
1103 const char *config_backend;
1105 #if defined(CONFIG_HAL)
1106 config_backend = "HAL";
1107 #elif defined(CONFIG_UDEV)
1108 config_backend = "udev";
1109 +#elif defined(CONFIG_DEVD)
1110 + config_backend = "devd";
1112 config_backend = "wscons";
1116 [FILE:496:patches/patch-hw_xfree86_common_xf86Globals.c]
1117 --- hw/xfree86/common/xf86Globals.c.orig 2016-07-19 17:07:29 UTC
1118 +++ hw/xfree86/common/xf86Globals.c
1119 @@ -122,7 +122,8 @@ xf86InfoRec xf86Info = {
1121 .disableRandR = FALSE,
1122 .randRFrom = X_DEFAULT,
1123 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1124 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
1125 + defined(CONFIG_DEVD)
1126 .forceInputDevices = FALSE,
1127 .autoAddDevices = TRUE,
1128 .autoEnableDevices = TRUE,
1131 [FILE:688:patches/patch-hw_xfree86_common_xf86Xinput.c]
1132 --- hw/xfree86/common/xf86Xinput.c.orig 2016-07-19 17:07:29 UTC
1133 +++ hw/xfree86/common/xf86Xinput.c
1134 @@ -841,7 +841,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, D
1136 InputDriverPtr drv = NULL;
1137 DeviceIntPtr dev = NULL;
1143 @@ -996,6 +996,7 @@ NewInputDeviceRequest(InputOption *optio
1144 if (strcmp(key, "_source") == 0 &&
1145 (strcmp(value, "server/hal") == 0 ||
1146 strcmp(value, "server/udev") == 0 ||
1147 + strcmp(value, "server/devd") == 0 ||
1148 strcmp(value, "server/wscons") == 0)) {
1150 if (!xf86Info.autoAddDevices) {
1153 [FILE:450:patches/patch-hw_xfree86_os-support_bsd_bsd__init.c]
1154 --- hw/xfree86/os-support/bsd/bsd_init.c.orig 2016-07-19 17:07:29 UTC
1155 +++ hw/xfree86/os-support/bsd/bsd_init.c
1156 @@ -230,6 +230,9 @@ xf86OpenConsole()
1157 * Add cases for other *BSD that behave the same.
1159 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
1160 +#if defined(__sparc64__)
1161 + pci_system_init_dev_mem(fd);
1164 i = atof(uts.release) * 100;
1168 [FILE:315:patches/patch-hw_xfree86_os-support_bsd_i386__video.c]
1169 Index: programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c
1170 --- hw/xfree86/os-support/bsd/i386_video.c.orig 2016-07-15 16:18:11 UTC
1171 +++ hw/xfree86/os-support/bsd/i386_video.c
1173 #include "xf86Priv.h"
1176 +#include <sys/types.h>
1177 #include <sys/mman.h>
1179 #include "xf86_OSlib.h"
1182 [FILE:380:patches/patch-hw_xfree86_os-support_bsd_ppc__video.c]
1183 --- hw/xfree86/os-support/bsd/ppc_video.c.orig 2016-07-15 16:18:11 UTC
1184 +++ hw/xfree86/os-support/bsd/ppc_video.c
1185 @@ -79,7 +79,11 @@ xf86DisableIO()
1188 if (ioBase != MAP_FAILED) {
1189 +#if defined(__FreeBSD__)
1190 + munmap(__DEVOLATILE(unsigned char *, ioBase), 0x10000);
1192 munmap(__UNVOLATILE(ioBase), 0x10000);
1194 ioBase = MAP_FAILED;
1199 [FILE:215:patches/patch-xkb_Makefile.in]
1200 --- xkb/Makefile.in.orig 2017-01-19 15:20:42 UTC
1202 @@ -878,7 +878,7 @@ info: info-am
1206 -install-data-am: install-dist_xkbcompiledDATA
1209 install-dvi: install-dvi-am
1213 [FILE:135:files/pkg-deinstall.in]
1216 PREFIX="${PKG_PREFIX-/raven}"
1220 /bin/rm -rf ${PREFIX}/lib/xorg/modules/extensions/libglx.so*
1225 [FILE:531:files/pkg-install.in]
1228 PREFIX="${PKG_PREFIX-/raven}"
1232 if [ -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 ]; then
1233 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1234 ${PREFIX}/lib/xorg/modules/extensions/libglx.so
1235 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1236 ${PREFIX}/lib/xorg/modules/extensions/libglx.so.1
1238 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.xorg/libglx.so \
1239 ${PREFIX}/lib/xorg/modules/extensions/libglx.so