1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
6 VARIANTS= standard virtual xephyr nest
7 SDESC[xephyr]= X server from X.Org based on kdrive
8 SDESC[virtual]= X virtual framebuffer server from X.Org
9 SDESC[standard]= X.Org X server and related programs
10 SDESC[nest]= Nesting X server from X.Org
11 HOMEPAGE= https://www.x.org/
15 SITES[main]= XORG/individual/xserver
16 DISTFILE[1]= xorg-server-21.1.4.tar.xz:main
19 SPKGS[virtual]= single
20 SPKGS[standard]= single
23 OPTIONS_AVAILABLE= XORG VIRTUAL XEPHYR NEST DEVD SUID
24 OPTIONS_STANDARD= XORG DEVD SUID
25 VOPTS[xephyr]= XORG=OFF VIRTUAL=OFF XEPHYR=ON NEST=OFF DEVD=OFF
27 VOPTS[virtual]= XORG=OFF VIRTUAL=ON XEPHYR=OFF NEST=OFF DEVD=OFF
29 VOPTS[nest]= XORG=OFF VIRTUAL=OFF XEPHYR=OFF NEST=ON DEVD=OFF
31 OPT_ON[all]= XORG SUID
33 BUILD_DEPENDS= xorg-fontutil:single:standard
34 xorg-xkbfile:single:standard
35 BUILDRUN_DEPENDS= xorg-xcvt:single:standard
36 RUN_DEPENDS= xorg-xkeyboard-config:primary:standard
37 xorg-xkbcomp:single:standard
39 USES= cpe gmake libtool perl:build ssl solaris-funcs
40 XORG_COMPONENTS= xorgproto xtransproto pixman xshmfence xau xdmcp
44 LICENSE_FILE= MIT:{{WRKSRC}}/COPYING
48 FPC_EQUIVALENT= x11-servers/xorg-server
49 SOL_FUNCTIONS= strnlen:xkb/XKBGAlloc.c
52 CONFIGURE_ARGS= --with-xkb-path={{LOCALBASE}}/share/X11/xkb
53 --with-fontrootdir={{LOCALBASE}}/share/fonts
60 --disable-config-udev-kms
61 --disable-install-setuid
65 --enable-xtrans-send-fds=yes
67 INSTALL_TARGET= install-strip
69 VAR_OPSYS[sunos]= CFLAGS=-DO_CLOEXEC=0
70 VAR_OPSYS[netbsd]= CPPFLAGS=-D_OPENBSD_SOURCE
72 [DEVD].DESCRIPTION= Use devd for autoconfiguration of input devices
74 [NEST].DESCRIPTION= Build as nesting X server
75 [NEST].BUILDRUN_DEPENDS_ON= libglvnd:single:standard
76 [NEST].BUILD_DEPENDS_ON= libepoxy:single:standard
78 libglvnd:single:standard
79 [NEST].CONFIGURE_ENABLE_BOTH= xnest
80 [NEST].XORG_COMPONENTS_ON= x11
83 [XEPHYR].DESCRIPTION= Build as kdrive-base X server
84 [XEPHYR].BUILDRUN_DEPENDS_ON= libdrm:single:standard
85 libepoxy:single:standard
86 libglvnd:single:standard
87 [XEPHYR].BUILD_DEPENDS_ON= mesa:drivers:standard
88 [XEPHYR].CONFIGURE_ENABLE_BOTH= xephyr
90 [XEPHYR].XORG_COMPONENTS_ON= x11
98 [VIRTUAL].DESCRIPTION= Build as virtual framebuffer server
99 [VIRTUAL].BUILDRUN_DEPENDS_ON= libglvnd:single:standard
100 [VIRTUAL].BUILD_DEPENDS_ON= libepoxy:single:standard
101 mesa:drivers:standard
102 libglvnd:single:standard
103 [VIRTUAL].CONFIGURE_ENABLE_BOTH= xvfb
105 [XORG].DESCRIPTION= Build as X server (don't change setting!)
106 [XORG].BUILDRUN_DEPENDS_ON= libdrm:single:standard
107 libepoxy:single:standard
108 mesa:drivers:standard
109 [XORG].CONFIGURE_ENABLE_BOTH= docs
112 [XORG].SUB_FILES_ON= pkg-install-single
114 [XORG].XORG_COMPONENTS_ON= pciaccess
117 [SUID].DESCRIPTION= Install the Xorg server with setuid bit set
120 # build libglx.so but don't install it yet. (done in pre-install)
121 ${REINPLACE_CMD} -e 's|@GLX_TRUE@GLXMODS =|@GLX_BOGUS@GLXMODS =|g' \
122 -e 's|^LTLIBRARIES = |LTLIBRARIES = libglx.la |g' \
123 ${WRKSRC}/hw/xfree86/dixmods/Makefile.in
125 do-install-XEPHYR-ON:
126 (cd ${WRKSRC}/hw/kdrive/ephyr && \
127 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
129 post-install-XORG-OFF:
130 ${RM} -r ${STAGEDIR}${PREFIX}/lib/xorg
131 ${RM} ${STAGEDIR}${PREFIX}/share/man/man1/Xserver.1
133 post-configure-DEVD-ON:
134 ${REINPLACE_CMD} -e 's|config\.c|config.c devd.c|g' \
135 -e 's|config\.lo|config.lo devd.lo|g' \
136 ${WRKSRC}/config/Makefile
137 ${REINPLACE_CMD} -e 's|^/\* #undef CONFIG_UDEV \*/|#define CONFIG_DEVD 1|' \
138 ${WRKSRC}/include/dix-config.h
140 do-install-VIRTUAL-ON:
141 (cd ${WRKSRC}/hw/vfb && \
142 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
145 (cd ${WRKSRC}/hw/xnest && \
146 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
148 post-install-XORG-ON:
149 # The .xorg dir because else the xorg-server might not load the
150 # correct libglx module.
151 ${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg
152 ${INSTALL_LIB} ${WRKSRC}/hw/xfree86/dixmods/.libs/libglx.so \
153 ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg/
154 ${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d
155 ${RM} -r ${STAGEDIR}/var
157 [FILE:71:descriptions/desc.single.standard]
158 This package contains the X.Org X server and some associated programs.
161 [FILE:60:descriptions/desc.single.virtual]
162 This package contains Xvfb, a virtual framebuffer X server.
165 [FILE:173:descriptions/desc.single.xephyr]
166 Xephyr is a kdrive server that outputs to a window on a pre-existing
167 'host' X display. Think Xnest but with support for modern extensions
168 like composite, damage and randr.
171 [FILE:78:descriptions/desc.single.nest]
172 This package contains Xnest, a nesting X Server that displays on an X
177 5cc4be8ee47edb58d4a90e603a59d56b40291ad38371b0bd2471fc3cbee1c587 4940176 xorg-server-21.1.4.tar.xz
180 [FILE:2538:manifests/plist.single.standard]
181 %%ONLY-SUNOS%%include/xorg/solaris-amd64.il
183 %%SUID-ON%%@(,,4555) bin/Xorg
303 xf86-input-inputtest-protocol.h
345 lib/pkgconfig/xorg-server.pc
346 lib/xorg/protocol.txt
356 lib/xorg/modules/drivers/modesetting_drv.so
357 lib/xorg/modules/extensions/.xorg/libglx.so
358 lib/xorg/modules/input/inputtest_drv.so
359 share/aclocal/xorg-server.m4
372 @dir etc/X11/xorg.conf.d
375 [FILE:34:manifests/plist.single.virtual]
377 share/man/man1/Xvfb.1.gz
380 [FILE:38:manifests/plist.single.xephyr]
382 share/man/man1/Xephyr.1.gz
385 [FILE:36:manifests/plist.single.nest]
387 share/man/man1/Xnest.1.gz
390 [FILE:293:patches/patch-config_config-backends.h]
391 --- config/config-backends.h.orig 2022-01-02 22:41:56 UTC
392 +++ config/config-backends.h
393 @@ -44,3 +44,8 @@ void config_hal_fini(void);
394 int config_wscons_init(void);
395 void config_wscons_fini(void);
399 +int config_devd_init(void);
400 +void config_devd_fini(void);
404 [FILE:537:patches/patch-config_config.c]
405 --- config/config.c.orig 2022-01-02 22:41:56 UTC
407 @@ -55,6 +55,9 @@ config_init(void)
408 #elif defined(CONFIG_WSCONS)
409 if (!config_wscons_init())
410 ErrorF("[config] failed to initialise wscons\n");
411 +#elif defined(CONFIG_DEVD)
412 + if (!config_devd_init())
413 + ErrorF("[config] failed to initialise devd\n");
417 @@ -67,6 +70,8 @@ config_fini(void)
419 #elif defined(CONFIG_WSCONS)
420 config_wscons_fini();
421 +#elif defined(CONFIG_DEVD)
422 + config_devd_fini();
428 [FILE:12171:patches/patch-config_devd.c]
429 --- /dev/null 2022-07-21 12:52:59 UTC
433 + * Copyright (c) 2012 Baptiste Daroussin
434 + * Copyright (c) 2013, 2014 Alex Kozlov
435 + * Copyright (c) 2014 Robert Millan
436 + * Copyright (c) 2014 Jean-Sebastien Pedron
438 + * Permission is hereby granted, free of charge, to any person obtaining a
439 + * copy of this software and associated documentation files (the "Software"),
440 + * to deal in the Software without restriction, including without limitation
441 + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
442 + * and/or sell copies of the Software, and to permit persons to whom the
443 + * Software is furnished to do so, subject to the following conditions:
445 + * The above copyright notice and this permission notice (including the next
446 + * paragraph) shall be included in all copies or substantial portions of the
449 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
450 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
451 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
452 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
453 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
454 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
455 + * DEALINGS IN THE SOFTWARE.
457 + * Author: Baptiste Daroussin <bapt@FreeBSD.org>
460 +#ifdef HAVE_DIX_CONFIG_H
461 +#include <dix-config.h>
464 +#include <sys/types.h>
465 +#include <sys/kbio.h>
466 +#include <sys/socket.h>
467 +#include <sys/stat.h>
468 +#include <sys/sysctl.h>
476 +#include <stdbool.h>
480 +#include "inputstr.h"
481 +#include "hotplug.h"
482 +#include "config-backends.h"
485 +#define DEVD_SOCK_PATH "/var/run/devd.pipe"
487 +#define DEVD_EVENT_ADD '+'
488 +#define DEVD_EVENT_REMOVE '-'
490 +#define RECONNECT_DELAY 5 * 1000
492 +static int sock_devd;
493 +static bool is_console_kbd = false;
494 +static bool is_kbdmux = false;
495 +static OsTimerPtr rtimer = NULL;
498 + const char *driver;
500 + const char *xdriver;
503 +static struct hw_type hw_types[] = {
504 + { "ukbd", ATTR_KEYBOARD, "kbd" },
505 + { "atkbd", ATTR_KEYBOARD, "kbd" },
506 + { "kbdmux", ATTR_KEYBOARD, "kbd" },
507 + { "sysmouse", ATTR_POINTER, "mouse" },
508 + { "ums", ATTR_POINTER, "mouse" },
509 + { "psm", ATTR_POINTER, "mouse" },
510 + { "vboxguest", ATTR_POINTER, "vboxmouse" },
511 + { "joy", ATTR_JOYSTICK, NULL },
512 + { "atp", ATTR_TOUCHPAD, NULL },
513 + { "uep", ATTR_TOUCHSCREEN, NULL },
514 + { NULL, -1, NULL },
518 +sysctl_exists(const struct hw_type *device, int unit,
519 + char *devname, size_t devname_len)
521 + char sysctlname[PATH_MAX];
525 + if (device == NULL || device->driver == NULL)
528 + /* Check if a sysctl exists. */
529 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%i.%%desc",
530 + device->driver, unit);
531 + ret = sysctlbyname(sysctlname, NULL, &len, NULL, 0);
533 + if (ret == 0 && len > 0) {
534 + snprintf(devname, devname_len, "%s%i", device->driver, unit);
542 +devpath_exists(const struct hw_type *device,
543 + char *devname, size_t devname_len)
549 + if (device == NULL || device->driver == NULL)
552 + /* Check if /dev/$driver exists. */
553 + asprintf(&devpath, "/dev/%s", device->driver);
554 + if (devpath == NULL)
557 + ret = stat(devpath, &st);
561 + strncpy(devname, device->driver, devname_len);
569 +sysctl_get_str(const char *sysctlname)
574 + if (sysctlname == NULL)
577 + if (sysctlbyname(sysctlname, NULL, &len, NULL, 0) == 0) {
578 + dest = malloc(len + 1);
580 + if (sysctlbyname(sysctlname, dest, &len, NULL, 0) == 0)
593 +device_added(const char *devname)
595 + char path[PATH_MAX];
596 + char sysctlname[PATH_MAX];
598 + char *product = NULL;
599 + char *config_info = NULL;
601 + InputOption *options = NULL;
602 + InputAttributes attrs = { };
603 + DeviceIntPtr dev = NULL;
607 + for (i = 0; hw_types[i].driver != NULL; i++) {
610 + len = strlen(hw_types[i].driver);
611 + if (strcmp(devname, hw_types[i].driver) == 0 ||
612 + (strncmp(devname, hw_types[i].driver, len) == 0 &&
613 + isnumber(*(devname + len)))) {
614 + attrs.flags |= hw_types[i].flag;
619 + if (hw_types[i].driver == NULL || hw_types[i].xdriver == NULL) {
620 + LogMessage(X_INFO, "config/devd: ignoring device %s\n",
625 + /* Skip keyboard devices if kbdmux is enabled */
626 + if (is_kbdmux && is_console_kbd && hw_types[i].flag & ATTR_KEYBOARD) {
627 + LogMessage(X_INFO, "config/devd: kbdmux is enabled, ignoring device %s\n",
632 + snprintf(path, sizeof(path), "/dev/%s", devname);
634 + options = input_option_new(NULL, "_source", "server/devd");
638 + snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%s.%%desc",
639 + hw_types[i].driver, devname + strlen(hw_types[i].driver));
640 + vendor = sysctl_get_str(sysctlname);
641 + if (vendor == NULL) {
642 + options = input_option_new(options, "name", devname);
645 + if ((walk = strchr(vendor, ' ')) != NULL) {
649 + if ((walk = strchr(product, ',')) != NULL)
653 + attrs.vendor = strdup(vendor);
655 + attrs.product = strdup(product);
656 + options = input_option_new(options, "name", product);
659 + options = input_option_new(options, "name", "(unnamed)");
664 + /* XXX implement usb_id */
665 + attrs.usb_id = NULL;
666 + attrs.device = strdup(path);
667 + options = input_option_new(options, "driver", hw_types[i].xdriver);
669 + fd = open(path, O_RDONLY);
672 + options = input_option_new(options, "device", path);
675 + if (attrs.flags & ~ATTR_KEYBOARD) {
676 + LogMessage(X_INFO, "config/devd: device %s already opened\n",
680 + * Fail if cannot open device, it breaks AllowMouseOpenFail,
681 + * but it should not matter when config/devd enabled
686 + if (is_console_kbd) {
688 + * There can be only one keyboard attached to console and
689 + * it is already added.
691 + LogMessage(X_WARNING, "config/devd: console keyboard is "
692 + "already added, ignoring %s (%s)\n",
693 + attrs.product, path);
698 + * Don't pass "device" option if the keyboard is already
699 + * attached to the console (ie. open() fails).
700 + * This would activate a special logic in xf86-input-keyboard.
701 + * Prevent any other attached to console keyboards being
702 + * processed. There can be only one such device.
704 + is_console_kbd = true;
707 + if (asprintf(&config_info, "devd:%s", devname) == -1) {
708 + config_info = NULL;
712 + if (device_is_duplicate(config_info)) {
713 + LogMessage(X_WARNING, "config/devd: device %s (%s) already added. "
714 + "ignoring\n", attrs.product, path);
718 + options = input_option_new(options, "config_info", config_info);
719 + LogMessage(X_INFO, "config/devd: adding input device %s (%s)\n",
720 + attrs.product, path);
722 + NewInputDeviceRequest(options, &attrs, &dev);
726 + input_option_free_list(&options);
727 + free(attrs.usb_id);
728 + free(attrs.product);
729 + free(attrs.device);
730 + free(attrs.vendor);
734 +device_removed(char *devname)
738 + if (asprintf(&config_info, "devd:%s", devname) == -1)
741 + remove_devices("devd", config_info);
746 +static bool is_kbdmux_enabled(void)
748 + /* Xorg uses /dev/ttyv0 as a console device */
749 + /* const char device[]="/dev/console"; */
750 + const char device[]="/dev/ttyv0";
751 + keyboard_info_t info;
754 + fd = open(device, O_RDONLY);
759 + if (ioctl(fd, KDGKBINFO, &info) == -1) {
766 + if (!strncmp(info.kb_name, "kbdmux", 6))
773 +disconnect_devd(int sock)
776 + RemoveGeneralSocket(sock);
784 + struct sockaddr_un devd;
787 + sock = socket(AF_UNIX, SOCK_STREAM, 0);
789 + LogMessage(X_ERROR, "config/devd: fail opening stream socket\n");
793 + devd.sun_family = AF_UNIX;
794 + strlcpy(devd.sun_path, DEVD_SOCK_PATH, sizeof(devd.sun_path));
796 + if (connect(sock, (struct sockaddr *) &devd, sizeof(devd)) < 0) {
798 + LogMessage(X_ERROR, "config/devd: fail to connect to devd\n");
802 + AddGeneralSocket(sock);
808 +reconnect_handler(OsTimerPtr timer, CARD32 time, void *arg)
812 + if ((newsock = connect_devd()) > 0) {
813 + sock_devd = newsock;
816 + LogMessage(X_INFO, "config/devd: reopening devd socket\n");
820 + /* Try again after RECONNECT_DELAY */
821 + return RECONNECT_DELAY;
825 +socket_getline(int fd, char **out)
827 + char *buf, *newbuf;
828 + ssize_t ret, cap, sz = 0;
832 + buf = malloc(cap * sizeof(char));
837 + ret = read(sock_devd, &c, 1);
839 + if (errno == EINTR)
843 + /* EOF - devd socket is lost */
844 + } else if (ret == 0) {
845 + disconnect_devd(sock_devd);
846 + rtimer = TimerSet(NULL, 0, 1, reconnect_handler, NULL);
847 + LogMessage(X_WARNING, "config/devd: devd socket is lost\n");
854 + if (sz + 1 >= cap) {
856 + newbuf = realloc(buf, cap * sizeof(char));
873 + /* Number of bytes in the line, not counting the line break */
878 +wakeup_handler(void *data, int err, void *read_mask)
886 + if (FD_ISSET(sock_devd, (fd_set *) read_mask)) {
887 + if (socket_getline(sock_devd, &line) < 0)
890 + walk = strchr(line + 1, ' ');
895 + case DEVD_EVENT_ADD:
896 + device_added(line + 1);
898 + case DEVD_EVENT_REMOVE:
899 + device_removed(line + 1);
909 +block_handler(void *data, struct timeval **tv, void *read_mask)
914 +config_devd_init(void)
916 + char devicename[1024];
919 + LogMessage(X_INFO, "config/devd: probing input devices...\n");
922 + * Add fake keyboard and give up on keyboards management
923 + * if kbdmux is enabled
925 + if ((is_kbdmux = is_kbdmux_enabled()) == true)
926 + device_added("kbdmux");
928 + for (i = 0; hw_types[i].driver != NULL; i++) {
929 + /* First scan the sysctl to determine the hardware */
930 + for (j = 0; j < 16; j++) {
931 + if (sysctl_exists(&hw_types[i], j,
932 + devicename, sizeof(devicename)) != 0)
933 + device_added(devicename);
936 + if (devpath_exists(&hw_types[i], devicename, sizeof(devicename)) != 0)
937 + device_added(devicename);
940 + if ((sock_devd = connect_devd()) < 0)
943 + RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
949 +config_devd_fini(void)
951 + LogMessage(X_INFO, "config/devd: terminating backend...\n");
958 + disconnect_devd(sock_devd);
960 + RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
962 + is_console_kbd = false;
966 [FILE:1999:patches/patch-configure]
967 For NetBSD, force pass thread configure and set USE_AMD64_IOPL
969 --- configure.orig 2022-01-02 22:42:07 UTC
971 @@ -11959,7 +11959,6 @@ fi
973 if test x$FILE_MAN_SUFFIX = x ; then
975 - solaris*) FILE_MAN_SUFFIX=4 ;;
976 *) FILE_MAN_SUFFIX=5 ;;
979 @@ -11969,7 +11968,6 @@ fi
981 if test x$MISC_MAN_SUFFIX = x ; then
983 - solaris*) MISC_MAN_SUFFIX=5 ;;
984 *) MISC_MAN_SUFFIX=7 ;;
987 @@ -11979,7 +11977,6 @@ fi
989 if test x$DRIVER_MAN_SUFFIX = x ; then
991 - solaris*) DRIVER_MAN_SUFFIX=7 ;;
992 *) DRIVER_MAN_SUFFIX=4 ;;
995 @@ -11989,7 +11986,6 @@ fi
997 if test x$ADMIN_MAN_SUFFIX = x ; then
999 - solaris*) ADMIN_MAN_SUFFIX=1m ;;
1000 *) ADMIN_MAN_SUFFIX=8 ;;
1003 @@ -21639,7 +21635,7 @@ if test `${RAWCPP} < conftest.$ac_ext |
1004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1005 $as_echo "no" >&6; }
1007 - if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
1009 TRADITIONALCPPFLAGS="-traditional"
1010 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1012 @@ -22986,9 +22982,14 @@ $as_echo "#define USE_ALPHA_PIO 1" >>con
1014 GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee"
1019 DEFAULT_INT10="stub"
1022 + $as_echo "#define USE_DEV_IO 1" >>confdefs.h
1028 @@ -23028,7 +23029,7 @@ $as_echo "#define USE_DEV_IO 1" >>confde
1029 $as_echo "#define USE_DEV_IO 1" >>confdefs.h
1032 -$as_echo "#define USE_I386_IOPL 1" >>confdefs.h
1033 +$as_echo "#define USE_AMD64_IOPL 1" >>confdefs.h
1037 @@ -24794,7 +24795,8 @@ case ${host_os} in
1039 # use libc stubs, don't link against libpthread, to allow
1041 - ax_pthread_flags=""
1042 + ax_pthread_flags="none"
1043 + ax_pthread_ok="yes"
1049 [FILE:256:patches/patch-hw_kdrive_ephyr_hostx.c]
1050 --- hw/kdrive/ephyr/hostx.c.orig 2022-01-02 22:41:56 UTC
1051 +++ hw/kdrive/ephyr/hostx.c
1053 #include <string.h> /* for memset */
1058 #include <sys/ipc.h>
1059 #include <sys/shm.h>
1062 [FILE:765:patches/patch-hw_xfree86_common_xf86AutoConfig.c]
1063 --- hw/xfree86/common/xf86AutoConfig.c.orig 2022-01-02 22:41:56 UTC
1064 +++ hw/xfree86/common/xf86AutoConfig.c
1065 @@ -294,7 +294,7 @@ listPossibleVideoDrivers(XF86MatchedDriv
1066 xf86PciMatchDriver(md);
1069 -#if defined(__linux__)
1070 +#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
1071 xf86AddMatchedDriver(md, "modesetting");
1074 @@ -302,8 +302,10 @@ listPossibleVideoDrivers(XF86MatchedDriv
1075 /* Fallback to platform default frame buffer driver */
1076 #if !defined(__linux__) && defined(__sparc__)
1077 xf86AddMatchedDriver(md, "wsfb");
1079 +#elif defined(__linux__)
1080 xf86AddMatchedDriver(md, "fbdev");
1081 +#elif defined(__FreeBSD__)
1082 + xf86AddMatchedDriver(md, "scfb");
1088 [FILE:700:patches/patch-hw_xfree86_common_xf86Config.c]
1089 --- hw/xfree86/common/xf86Config.c.orig 2022-01-02 22:41:56 UTC
1090 +++ hw/xfree86/common/xf86Config.c
1091 @@ -1279,13 +1279,16 @@ checkCoreInputDevices(serverLayoutPtr se
1094 if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) {
1095 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1096 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
1097 + defined(CONFIG_DEVD)
1098 const char *config_backend;
1100 #if defined(CONFIG_HAL)
1101 config_backend = "HAL";
1102 #elif defined(CONFIG_UDEV)
1103 config_backend = "udev";
1104 +#elif defined(CONFIG_DEVD)
1105 + config_backend = "devd";
1107 config_backend = "wscons";
1111 [FILE:510:patches/patch-hw_xfree86_common_xf86Globals.c]
1112 --- hw/xfree86/common/xf86Globals.c.orig 2022-01-02 22:41:56 UTC
1113 +++ hw/xfree86/common/xf86Globals.c
1114 @@ -118,7 +118,7 @@ xf86InfoRec xf86Info = {
1115 .miscModInDevEnabled = TRUE,
1116 .miscModInDevAllowNonLocal = FALSE,
1118 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1119 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || defined(CONFIG_DEVD)
1120 .forceInputDevices = FALSE,
1121 .autoAddDevices = TRUE,
1122 .autoEnableDevices = TRUE,
1125 [FILE:483:patches/patch-hw_xfree86_common_xf86Xinput.c]
1126 --- hw/xfree86/common/xf86Xinput.c.orig 2022-01-02 22:41:56 UTC
1127 +++ hw/xfree86/common/xf86Xinput.c
1128 @@ -1065,6 +1065,7 @@ NewInputDeviceRequest(InputOption *optio
1129 if (strcmp(key, "_source") == 0 &&
1130 (strcmp(value, "server/hal") == 0 ||
1131 strcmp(value, "server/udev") == 0 ||
1132 + strcmp(value, "server/devd") == 0 ||
1133 strcmp(value, "server/wscons") == 0)) {
1135 if (!xf86Info.autoAddDevices) {
1138 [FILE:450:patches/patch-hw_xfree86_os-support_bsd_bsd__init.c]
1139 --- hw/xfree86/os-support/bsd/bsd_init.c.orig 2022-01-02 22:41:56 UTC
1140 +++ hw/xfree86/os-support/bsd/bsd_init.c
1141 @@ -230,6 +230,9 @@ xf86OpenConsole()
1142 * Add cases for other *BSD that behave the same.
1144 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
1145 +#if defined(__sparc64__)
1146 + pci_system_init_dev_mem(fd);
1149 i = atof(uts.release) * 100;
1153 [FILE:519:patches/patch-hw_xfree86_os-support_bsd_i386__video.c]
1154 --- hw/xfree86/os-support/bsd/i386_video.c.orig 2022-01-02 22:41:56 UTC
1155 +++ hw/xfree86/os-support/bsd/i386_video.c
1157 #include "xf86Priv.h"
1160 +#include <sys/types.h>
1161 #include <sys/mman.h>
1163 #include "xf86_OSlib.h"
1166 #define MAP_FLAGS (MAP_FILE | MAP_SHARED)
1168 +#if defined(__NetBSD__) && defined(USE_AMD64_IOPL)
1169 +#define amd64_iopl x86_64_iopl
1173 #define SYSCTL_MSG "\tCheck that you have set 'machdep.allowaperture=1'\n"\
1176 [FILE:380:patches/patch-hw_xfree86_os-support_bsd_ppc__video.c]
1177 --- hw/xfree86/os-support/bsd/ppc_video.c.orig 2022-01-02 22:41:56 UTC
1178 +++ hw/xfree86/os-support/bsd/ppc_video.c
1179 @@ -79,7 +79,11 @@ xf86DisableIO()
1182 if (ioBase != MAP_FAILED) {
1183 +#if defined(__FreeBSD__)
1184 + munmap(__DEVOLATILE(unsigned char *, ioBase), 0x10000);
1186 munmap(__UNVOLATILE(ioBase), 0x10000);
1188 ioBase = MAP_FAILED;
1193 [FILE:714:patches/patch-hw_xfree86_os-support_solaris_sun__init.c]
1194 --- hw/xfree86/os-support/solaris/sun_init.c.orig 2022-01-02 22:41:56 UTC
1195 +++ hw/xfree86/os-support/solaris/sun_init.c
1196 @@ -54,6 +54,22 @@ static int xf86StartVT = -1;
1197 static int vtEnabled = 0;
1201 +#define VTIOC ('V'<<8)
1202 +#define VT_OPENQRY (VTIOC|1)
1203 +#define VT_SETMODE (VTIOC|2)
1204 +#define VT_GETMODE (VTIOC|3)
1205 +#define VT_ACTIVATE (VTIOC|5)
1206 +#define VT_WAITACTIVE (VTIOC|6)
1207 +#define VT_GETSTATE (VTIOC|100)
1208 +#define VT_ENABLED (VTIOC|101)
1209 +#define VT_SETDISPINFO (VTIOC|103)
1210 +#define VT_GET_CONSUSER (VTIOC|108)
1211 +#define VT_SET_CONSUSER (VTIOC|109)
1213 +enum { VT_AUTO = 0, VT_PROCESS };
1216 /* Device to open as xf86Info.consoleFd */
1217 static char consoleDev[PATH_MAX] = "/dev/fb";
1221 [FILE:193:patches/patch-os_backtrace.c]
1222 --- os/backtrace.c.orig 2022-01-02 22:41:56 UTC
1228 +#include <unistd.h>
1230 #ifdef HAVE_LIBUNWIND
1234 [FILE:1021:patches/patch-test_simple-xinit.c]
1235 --- test/simple-xinit.c.orig 2022-01-02 22:41:56 UTC
1236 +++ test/simple-xinit.c
1238 #include <sys/wait.h>
1242 +#include <sys/varargs.h>
1244 +vasprintf(char **strp, const char *fmt, va_list args)
1246 + va_list args_copy;
1247 + int status, needed;
1249 + va_copy(args_copy, args);
1250 + needed = vsnprintf(NULL, 0, fmt, args_copy);
1251 + va_end(args_copy);
1256 + *strp = malloc(needed + 1);
1257 + if (*strp == NULL)
1259 + status = vsnprintf(*strp, needed + 1, fmt, args);
1270 +asprintf(char **strp, const char *fmt, ...)
1275 + va_start(args, fmt);
1276 + status = vasprintf(strp, fmt, args);
1283 kill_server(int server_pid)
1287 [FILE:215:patches/patch-xkb_Makefile.in]
1288 --- xkb/Makefile.in.orig 2022-01-02 22:42:13 UTC
1290 @@ -903,7 +903,7 @@ info: info-am
1294 -install-data-am: install-dist_xkbcompiledDATA
1297 install-dvi: install-dvi-am
1301 [FILE:135:files/pkg-deinstall-single.in]
1304 PREFIX="${PKG_PREFIX-/raven}"
1308 /bin/rm -rf ${PREFIX}/lib/xorg/modules/extensions/libglx.so*
1313 [FILE:531:files/pkg-install-single.in]
1316 PREFIX="${PKG_PREFIX-/raven}"
1320 if [ -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 ]; then
1321 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1322 ${PREFIX}/lib/xorg/modules/extensions/libglx.so
1323 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1324 ${PREFIX}/lib/xorg/modules/extensions/libglx.so.1
1326 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.xorg/libglx.so \
1327 ${PREFIX}/lib/xorg/modules/extensions/libglx.so