Ravenports generated: 11 May 2020 15:44
[ravenports.git] / bucket_E7 / xorg-server
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               xorg-server
4 VERSION=                1.20.8
5 REVISION=               1
6 KEYWORDS=               x11_servers
7 VARIANTS=               standard virtual dmx xephyr nest wayland
8 SDESC[xephyr]=          X server from X.Org based on kdrive
9 SDESC[virtual]=         X virtual framebuffer server from X.Org
10 SDESC[wayland]=         X Clients under Wayland
11 SDESC[standard]=        X.Org X server and related programs
12 SDESC[dmx]=             Distributed Multihead X from X.Org
13 SDESC[nest]=            Nesting X server from X.Org
14 HOMEPAGE=               https://www.x.org/
15 CONTACT=                nobody
16
17 DOWNLOAD_GROUPS=        main
18 SITES[main]=            XORG/individual/xserver
19 DISTFILE[1]=            xorg-server-1.20.8.tar.bz2:main
20 DF_INDEX=               1
21 SPKGS[xephyr]=          single
22 SPKGS[virtual]=         single
23 SPKGS[wayland]=         single
24 SPKGS[standard]=        single
25 SPKGS[dmx]=             single
26 SPKGS[nest]=            single
27
28 OPTIONS_AVAILABLE=      XORG VIRTUAL DMX XEPHYR NEST WAYLAND DEVD SUID
29 OPTIONS_STANDARD=       XORG DEVD SUID
30 VOPTS[xephyr]=          XORG=OFF VIRTUAL=OFF DMX=OFF XEPHYR=ON NEST=OFF
31                         WAYLAND=OFF DEVD=OFF SUID=OFF
32 VOPTS[virtual]=         XORG=OFF VIRTUAL=ON DMX=OFF XEPHYR=OFF NEST=OFF
33                         WAYLAND=OFF DEVD=OFF SUID=OFF
34 VOPTS[wayland]=         XORG=OFF VIRTUAL=OFF DMX=OFF XEPHYR=OFF NEST=OFF
35                         WAYLAND=ON DEVD=OFF SUID=OFF
36 VOPTS[dmx]=             XORG=OFF VIRTUAL=OFF DMX=ON XEPHYR=OFF NEST=OFF
37                         WAYLAND=OFF DEVD=OFF SUID=OFF
38 VOPTS[nest]=            XORG=OFF VIRTUAL=OFF DMX=OFF XEPHYR=OFF NEST=ON
39                         WAYLAND=OFF DEVD=OFF SUID=OFF
40 OPT_ON[all]=            XORG SUID
41
42 BUILD_DEPENDS=          xorg-fontutil:single:standard
43                         xorg-xkbfile:single:standard
44 RUN_DEPENDS=            xorg-xkeyboard-config:primary:standard
45                         xorg-xkbcomp:single:standard
46
47 USES=                   cpe gmake libtool perl:build ssl
48 XORG_COMPONENTS=        xorgproto xtransproto pixman xshmfence xau xdmcp
49                         xfont2
50
51 LICENSE=                MIT:single
52 LICENSE_FILE=           MIT:{{WRKSRC}}/COPYING
53 LICENSE_SCHEME=         solo
54
55 CPE_VENDOR=             x.org
56 FPC_EQUIVALENT=         x11-servers/xorg-server
57
58 MUST_CONFIGURE=         gnu
59 CONFIGURE_ARGS=         --with-xkb-path={{LOCALBASE}}/share/X11/xkb
60                         --with-fontrootdir={{LOCALBASE}}/share/fonts
61                         --without-doxygen
62                         --without-xmlto
63                         --without-fop
64                         --localstatedir=/var
65                         --with-shared-memory-dir=/tmp
66                         --disable-config-hal
67                         --disable-config-udev
68                         --disable-config-udev-kms
69                         --disable-install-setuid
70                         --without-dtrace
71                         --enable-glamor
72                         --enable-xcsecurity
73
74 INSTALL_TARGET=         install-strip
75
76 VAR_OPSYS[sunos]=       CFLAGS=-DO_CLOEXEC=0
77
78 [DEVD].DESCRIPTION=                     Use devd for autoconfiguration of input devices
79
80 [NEST].DESCRIPTION=                     Build as nesting X server
81 [NEST].BUILD_DEPENDS_ON=                libepoxy:single:standard
82                                         mesa:drivers:standard
83 [NEST].CONFIGURE_ENABLE_BOTH=           xnest
84 [NEST].USES_ON=                         mesa
85 [NEST].XORG_COMPONENTS_ON=              x11
86                                         xext
87
88 [XEPHYR].DESCRIPTION=                   Build as kdrive-base X server
89 [XEPHYR].BUILDRUN_DEPENDS_ON=           libdrm:single:standard
90                                         libepoxy:single:standard
91 [XEPHYR].BUILD_DEPENDS_ON=              mesa:drivers:standard
92 [XEPHYR].CONFIGURE_ENABLE_BOTH=         xephyr
93                                         kdrive
94 [XEPHYR].USES_ON=                       mesa
95 [XEPHYR].XORG_COMPONENTS_ON=            x11
96                                         xcb
97                                         xcb-util
98                                         xcb-util-image
99                                         xcb-util-wm
100                                         xcb-util-keysyms
101                                         xcb-render-util
102
103 [DMX].DESCRIPTION=                      Build as distributed multihead X server
104 [DMX].BUILD_DEPENDS_ON=                 libepoxy:single:standard
105                                         mesa:drivers:standard
106                                         xorg-xtst:single:standard
107                                         xorg-xres:single:standard
108 [DMX].CONFIGURE_ENABLE_BOTH=            dmx
109 [DMX].XORG_COMPONENTS_ON=               dmx
110                                         x11
111                                         xaw
112                                         xext
113                                         xfixes
114                                         xi
115                                         xmu
116                                         xpm
117                                         xrender
118                                         xt
119
120 [VIRTUAL].DESCRIPTION=                  Build as virtual framebuffer server
121 [VIRTUAL].BUILD_DEPENDS_ON=             libepoxy:single:standard
122                                         mesa:drivers:standard
123 [VIRTUAL].CONFIGURE_ENABLE_BOTH=        xvfb
124 [VIRTUAL].USES_ON=                      mesa
125
126 [XORG].DESCRIPTION=                     Build as X server (don't change setting!)
127 [XORG].BUILDRUN_DEPENDS_ON=             libdrm:single:standard
128                                         libepoxy:single:standard
129                                         mesa:drivers:standard
130 [XORG].CONFIGURE_ENABLE_BOTH=           docs
131                                         devel-docs
132                                         xorg
133 [XORG].SUB_FILES_ON=                    pkg-install-single
134                                         pkg-deinstall-single
135 [XORG].USES_ON=                         mesa
136 [XORG].XORG_COMPONENTS_ON=              pciaccess
137                                         xfont2
138
139 [WAYLAND].DESCRIPTION=                  Build Wayland X clients
140 [WAYLAND].BUILDRUN_DEPENDS_ON=          libdrm:single:standard
141                                         libepoxy:single:standard
142                                         wayland:primary:standard
143 [WAYLAND].BUILD_DEPENDS_ON=             mesa:drivers:standard
144                                         wayland-protocols:single:standard
145                                         evdev-proto:single:standard
146 [WAYLAND].CONFIGURE_ARGS_ON=            --disable-xquartz
147                                         --disable-xwin
148 [WAYLAND].CONFIGURE_ENABLE_BOTH=        xwayland
149 [WAYLAND].XORG_COMPONENTS_ON=           x11
150                                         xext
151
152 [SUID].DESCRIPTION=                     Install the Xorg server with setuid bit set
153
154 post-patch:
155         # build libglx.so but don't install it yet. (done in pre-install)
156         ${REINPLACE_CMD} -e 's|@GLX_TRUE@GLXMODS =|@GLX_BOGUS@GLXMODS =|g' \
157                 -e 's|^LTLIBRARIES = |LTLIBRARIES = libglx.la |g' \
158                 ${WRKSRC}/hw/xfree86/dixmods/Makefile.in
159
160 do-install-XEPHYR-ON:
161         (cd ${WRKSRC}/hw/kdrive/ephyr && \
162                 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
163
164 do-install-WAYLAND-ON:
165         (cd ${WRKSRC}/hw/xwayland && \
166                 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
167
168 post-install-XORG-OFF:
169         ${RM} -r ${STAGEDIR}${PREFIX}/lib/xorg
170         ${RM} ${STAGEDIR}${PREFIX}/share/man/man1/Xserver.1
171
172 post-configure-DEVD-ON:
173         ${REINPLACE_CMD} -e 's|config\.c|config.c devd.c|g' \
174                 -e 's|config\.lo|config.lo devd.lo|g' \
175                 ${WRKSRC}/config/Makefile
176         ${REINPLACE_CMD} -e 's|^/\* #undef CONFIG_UDEV \*/|#define CONFIG_DEVD 1|' \
177                 ${WRKSRC}/include/dix-config.h
178
179 do-install-VIRTUAL-ON:
180         (cd ${WRKSRC}/hw/vfb && \
181                 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
182
183 do-install-NEST-ON:
184         (cd ${WRKSRC}/hw/xnest && \
185                 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
186
187 do-install-DMX-ON:
188         (cd ${WRKSRC}/hw/dmx && \
189                 DESTDIR=${STAGEDIR} ${MAKE_CMD} install)
190
191 post-install-XORG-ON:
192         # The .xorg dir because else the xorg-server might not load the
193         # correct libglx module.
194         @${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg
195         ${INSTALL_LIB} ${WRKSRC}/hw/xfree86/dixmods/.libs/libglx.so \
196                 ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg/
197         @${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d
198         ${RM} -r ${STAGEDIR}/var
199
200 [FILE:71:descriptions/desc.single.standard]
201 This package contains the X.Org X server and some associated programs.
202
203
204 [FILE:60:descriptions/desc.single.virtual]
205 This package contains Xvfb, a virtual framebuffer X server.
206
207
208 [FILE:287:descriptions/desc.single.dmx]
209 Xdmx is proxy X server that provides multi-head support for multiple
210 displays attached to different machines (each of which is running a
211 typical X server).  When Xinerama is used with Xdmx, the multiple displays
212 on multiple machines are presented to the user as a single unified screen.
213
214
215 [FILE:173:descriptions/desc.single.xephyr]
216 Xephyr is a kdrive server that outputs to a window on a pre-existing
217 'host' X display.  Think Xnest but with support for modern extensions
218 like composite, damage and randr.
219
220
221 [FILE:78:descriptions/desc.single.nest]
222 This package contains Xnest, a nesting X Server that displays on an X
223 Server.
224
225
226 [FILE:148:descriptions/desc.single.wayland]
227 XWayland is an X Server running as a Wayland client, thus capable of
228 displaying native X11 client applications in a Wayland compositor
229 environment.
230
231
232 [FILE:105:distinfo]
233 d17b646bee4ba0fb7850c1cc55b18e3e8513ed5c02bdf38da7e107f84e2d0146      6309640 xorg-server-1.20.8.tar.bz2
234
235
236 [FILE:2523:manifests/plist.single.standard]
237 %%ONLY-SUNOS%%include/xorg/solaris-amd64.il
238 %%SUID-OFF%%bin/Xorg
239 %%SUID-ON%%@(,,4555) bin/Xorg
240 bin/
241  X
242  cvt
243  gtf
244 include/xorg/
245  BT.h
246  IBM.h
247  TI.h
248  XIstubs.h
249  Xprintf.h
250  callback.h
251  client.h
252  closestr.h
253  closure.h
254  colormap.h
255  colormapst.h
256  compiler.h
257  compositeext.h
258  cursor.h
259  cursorstr.h
260  damage.h
261  damagestr.h
262  dbestruct.h
263  dgaproc.h
264  displaymode.h
265  dix.h
266  dixaccess.h
267  dixevents.h
268  dixfont.h
269  dixfontstr.h
270  dixgrabs.h
271  dixstruct.h
272  dri.h
273  dri2.h
274  dri3.h
275  dristruct.h
276  edid.h
277  events.h
278  exa.h
279  exevents.h
280  extension.h
281  extinit.h
282  extnsionst.h
283  fb.h
284  fbdevhw.h
285  fboverlay.h
286  fbpict.h
287  fbrop.h
288  fourcc.h
289  gc.h
290  gcstruct.h
291  geext.h
292  geint.h
293  glamor.h
294  globals.h
295  glx_extinit.h
296  glxvndabi.h
297  glyphstr.h
298  hotplug.h
299  i2c_def.h
300  input.h
301  inputstr.h
302  list.h
303  mi.h
304  micmap.h
305  micoord.h
306  migc.h
307  miline.h
308  mioverlay.h
309  mipict.h
310  mipointer.h
311  mipointrst.h
312  misc.h
313  miscstruct.h
314  mistruct.h
315  misync.h
316  misyncfd.h
317  misyncshm.h
318  misyncstr.h
319  mizerarc.h
320  nonsdk_extinit.h
321  opaque.h
322  optionstr.h
323  os.h
324  panoramiX.h
325  panoramiXsrv.h
326  picture.h
327  picturestr.h
328  pixmap.h
329  pixmapstr.h
330  present.h
331  presentext.h
332  privates.h
333  property.h
334  propertyst.h
335  ptrveloc.h
336  randrstr.h
337  region.h
338  regionstr.h
339  registry.h
340  resource.h
341  rgb.h
342  rrtransform.h
343  sarea.h
344  screenint.h
345  scrnintstr.h
346  selection.h
347  servermd.h
348  shadow.h
349  shadowfb.h
350  shmint.h
351  site.h
352  syncsdk.h
353  validate.h
354  vbe.h
355  vbeModes.h
356  vgaHW.h
357  vndserver.h
358  wfbrename.h
359  window.h
360  windowstr.h
361  xaarop.h
362  xace.h
363  xacestr.h
364  xf86.h
365  xf86Crtc.h
366  xf86Cursor.h
367  xf86DDC.h
368  xf86MatchDrivers.h
369  xf86Modes.h
370  xf86Module.h
371  xf86Opt.h
372  xf86Optionstr.h
373  xf86Optrec.h
374  xf86Parser.h
375  xf86Pci.h
376  xf86PciInfo.h
377  xf86Priv.h
378  xf86Privstr.h
379  xf86RamDac.h
380  xf86RandR12.h
381  xf86VGAarbiter.h
382  xf86Xinput.h
383  xf86_OSlib.h
384  xf86_OSproc.h
385  xf86cmap.h
386  xf86fbman.h
387  xf86i2c.h
388  xf86int10.h
389  xf86platformBus.h
390  xf86sbusBus.h
391  xf86str.h
392  xf86xv.h
393  xf86xvmc.h
394  xf86xvpriv.h
395  xisb.h
396  xkbfile.h
397  xkbrules.h
398  xkbsrv.h
399  xkbstr.h
400  xorg-server.h
401  xorgVersion.h
402  xserver-properties.h
403  xserver_poll.h
404  xvdix.h
405  xvmcext.h
406 lib/pkgconfig/xorg-server.pc
407 lib/xorg/protocol.txt
408 lib/xorg/modules/
409  libexa.so
410  libfb.so
411  libfbdevhw.so
412  libglamoregl.so
413  libint10.so
414  libshadow.so
415  libshadowfb.so
416  libvbe.so
417  libvgahw.so
418  libwfb.so
419 lib/xorg/modules/drivers/modesetting_drv.so
420 lib/xorg/modules/extensions/.xorg/libglx.so
421 share/aclocal/xorg-server.m4
422 share/man/man1/
423  Xorg.1.gz
424  Xserver.1.gz
425  cvt.1.gz
426  gtf.1.gz
427 share/man/man4/
428  exa.4.gz
429  fbdevhw.4.gz
430  modesetting.4.gz
431 share/man/man5/
432  xorg.conf.5.gz
433  xorg.conf.d.5.gz
434 @dir etc/X11/xorg.conf.d
435
436
437 [FILE:34:manifests/plist.single.virtual]
438 bin/Xvfb
439 share/man/man1/Xvfb.1.gz
440
441
442 [FILE:214:manifests/plist.single.dmx]
443 bin/
444  Xdmx
445  dmxaddinput
446  dmxaddscreen
447  dmxinfo
448  dmxreconfig
449  dmxresize
450  dmxrminput
451  dmxrmscreen
452  dmxtodmx
453  dmxwininfo
454  vdltodmx
455  xdmxconfig
456 share/man/man1/
457  Xdmx.1.gz
458  dmxtodmx.1.gz
459  vdltodmx.1.gz
460  xdmxconfig.1.gz
461
462
463 [FILE:38:manifests/plist.single.xephyr]
464 bin/Xephyr
465 share/man/man1/Xephyr.1.gz
466
467
468 [FILE:36:manifests/plist.single.nest]
469 bin/Xnest
470 share/man/man1/Xnest.1.gz
471
472
473 [FILE:13:manifests/plist.single.wayland]
474 bin/Xwayland
475
476
477 [FILE:293:patches/patch-config_config-backends.h]
478 --- config/config-backends.h.orig       2020-03-29 20:21:15 UTC
479 +++ config/config-backends.h
480 @@ -44,3 +44,8 @@ void config_hal_fini(void);
481  int config_wscons_init(void);
482  void config_wscons_fini(void);
483  #endif
484 +
485 +#ifdef CONFIG_DEVD
486 +int config_devd_init(void);
487 +void config_devd_fini(void);
488 +#endif
489
490
491 [FILE:537:patches/patch-config_config.c]
492 --- config/config.c.orig        2020-03-29 20:21:15 UTC
493 +++ config/config.c
494 @@ -55,6 +55,9 @@ config_init(void)
495  #elif defined(CONFIG_WSCONS)
496      if (!config_wscons_init())
497          ErrorF("[config] failed to initialise wscons\n");
498 +#elif defined(CONFIG_DEVD)
499 +    if (!config_devd_init())
500 +        ErrorF("[config] failed to initialise devd\n");
501  #endif
502  }
503  
504 @@ -67,6 +70,8 @@ config_fini(void)
505      config_hal_fini();
506  #elif defined(CONFIG_WSCONS)
507      config_wscons_fini();
508 +#elif defined(CONFIG_DEVD)
509 +    config_devd_fini();
510  #endif
511  }
512  
513
514
515 [FILE:12171:patches/patch-config_devd.c]
516 --- /dev/null   2020-04-01 15:08:07 UTC
517 +++ config/devd.c
518 @@ -0,0 +1,532 @@
519 +/*
520 + * Copyright (c) 2012 Baptiste Daroussin
521 + * Copyright (c) 2013, 2014 Alex Kozlov
522 + * Copyright (c) 2014 Robert Millan
523 + * Copyright (c) 2014 Jean-Sebastien Pedron
524 + *
525 + * Permission is hereby granted, free of charge, to any person obtaining a
526 + * copy of this software and associated documentation files (the "Software"),
527 + * to deal in the Software without restriction, including without limitation
528 + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
529 + * and/or sell copies of the Software, and to permit persons to whom the
530 + * Software is furnished to do so, subject to the following conditions:
531 + *
532 + * The above copyright notice and this permission notice (including the next
533 + * paragraph) shall be included in all copies or substantial portions of the
534 + * Software.
535 + *
536 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
537 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
538 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
539 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
540 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
541 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
542 + * DEALINGS IN THE SOFTWARE.
543 + *
544 + * Author: Baptiste Daroussin <bapt@FreeBSD.org>
545 + */
546 +
547 +#ifdef HAVE_DIX_CONFIG_H
548 +#include <dix-config.h>
549 +#endif
550 +
551 +#include <sys/types.h>
552 +#include <sys/kbio.h>
553 +#include <sys/socket.h>
554 +#include <sys/stat.h>
555 +#include <sys/sysctl.h>
556 +#include <sys/un.h>
557 +
558 +#include <ctype.h>
559 +#include <errno.h>
560 +#include <fcntl.h>
561 +#include <stdlib.h>
562 +#include <stdio.h>
563 +#include <stdbool.h>
564 +#include <unistd.h>
565 +
566 +#include "input.h"
567 +#include "inputstr.h"
568 +#include "hotplug.h"
569 +#include "config-backends.h"
570 +#include "os.h"
571 +
572 +#define DEVD_SOCK_PATH "/var/run/devd.pipe"
573 +
574 +#define DEVD_EVENT_ADD         '+'
575 +#define DEVD_EVENT_REMOVE      '-'
576 +
577 +#define RECONNECT_DELAY                5 * 1000
578 +
579 +static int sock_devd;
580 +static bool is_console_kbd = false;
581 +static bool is_kbdmux = false;
582 +static OsTimerPtr rtimer = NULL;
583 +
584 +struct hw_type {
585 +       const char *driver;
586 +       int flag;
587 +       const char *xdriver;
588 +};
589 +
590 +static struct hw_type hw_types[] = {
591 +       { "ukbd", ATTR_KEYBOARD, "kbd" },
592 +       { "atkbd", ATTR_KEYBOARD, "kbd" },
593 +       { "kbdmux", ATTR_KEYBOARD, "kbd" },
594 +       { "sysmouse", ATTR_POINTER, "mouse" },
595 +       { "ums", ATTR_POINTER, "mouse" },
596 +       { "psm", ATTR_POINTER, "mouse" },
597 +       { "vboxguest", ATTR_POINTER, "vboxmouse" },
598 +       { "joy", ATTR_JOYSTICK, NULL },
599 +       { "atp", ATTR_TOUCHPAD, NULL },
600 +       { "uep", ATTR_TOUCHSCREEN, NULL },
601 +       { NULL, -1, NULL },
602 +};
603 +
604 +static bool
605 +sysctl_exists(const struct hw_type *device, int unit,
606 +       char *devname, size_t devname_len)
607 +{
608 +       char sysctlname[PATH_MAX];
609 +       size_t len;
610 +       int ret;
611 +
612 +       if (device == NULL || device->driver == NULL)
613 +               return false;
614 +
615 +       /* Check if a sysctl exists. */
616 +       snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%i.%%desc",
617 +           device->driver, unit);
618 +       ret = sysctlbyname(sysctlname, NULL, &len, NULL, 0);
619 +
620 +       if (ret == 0 && len > 0) {
621 +               snprintf(devname, devname_len, "%s%i", device->driver, unit);
622 +               return true;
623 +       }
624 +
625 +       return false;
626 +}
627 +
628 +static bool
629 +devpath_exists(const struct hw_type *device,
630 +       char *devname, size_t devname_len)
631 +{
632 +       char *devpath;
633 +       struct stat st;
634 +       int ret;
635 +
636 +       if (device == NULL || device->driver == NULL)
637 +               return false;
638 +
639 +       /* Check if /dev/$driver exists. */
640 +       asprintf(&devpath, "/dev/%s", device->driver);
641 +       if (devpath == NULL)
642 +               return false;
643 +
644 +       ret = stat(devpath, &st);
645 +       free(devpath);
646 +
647 +       if (ret == 0) {
648 +               strncpy(devname, device->driver, devname_len);
649 +               return true;
650 +       }
651 +
652 +       return false;
653 +}
654 +
655 +static char *
656 +sysctl_get_str(const char *sysctlname)
657 +{
658 +       char *dest = NULL;
659 +       size_t len;
660 +
661 +       if (sysctlname == NULL)
662 +               return NULL;
663 +
664 +       if (sysctlbyname(sysctlname, NULL, &len, NULL, 0) == 0) {
665 +               dest = malloc(len + 1);
666 +               if (dest) {
667 +                       if (sysctlbyname(sysctlname, dest, &len, NULL, 0) == 0)
668 +                               dest[len] = '\0';
669 +                       else {
670 +                               free(dest);
671 +                               dest = NULL;
672 +                       }
673 +               }
674 +       }
675 +
676 +       return dest;
677 +}
678 +
679 +static void
680 +device_added(const char *devname)
681 +{
682 +       char path[PATH_MAX];
683 +       char sysctlname[PATH_MAX];
684 +       char *vendor;
685 +       char *product = NULL;
686 +       char *config_info = NULL;
687 +       char *walk;
688 +       InputOption *options = NULL;
689 +       InputAttributes attrs = { };
690 +       DeviceIntPtr dev = NULL;
691 +       int i;
692 +       int fd;
693 +
694 +       for (i = 0; hw_types[i].driver != NULL; i++) {
695 +               size_t len;
696 +
697 +               len = strlen(hw_types[i].driver);
698 +               if (strcmp(devname, hw_types[i].driver) == 0 ||
699 +                       (strncmp(devname, hw_types[i].driver, len) == 0 &&
700 +                               isnumber(*(devname + len)))) {
701 +                       attrs.flags |= hw_types[i].flag;
702 +                       break;
703 +               }
704 +       }
705 +
706 +       if (hw_types[i].driver == NULL || hw_types[i].xdriver == NULL) {
707 +               LogMessage(X_INFO, "config/devd: ignoring device %s\n",
708 +                               devname);
709 +               return;
710 +       }
711 +
712 +       /* Skip keyboard devices if kbdmux is enabled */
713 +       if (is_kbdmux && is_console_kbd && hw_types[i].flag & ATTR_KEYBOARD) {
714 +               LogMessage(X_INFO, "config/devd: kbdmux is enabled, ignoring device %s\n",
715 +                               devname);
716 +               return;
717 +       }
718 +
719 +       snprintf(path, sizeof(path), "/dev/%s", devname);
720 +
721 +       options = input_option_new(NULL, "_source", "server/devd");
722 +       if (!options)
723 +               return;
724 +
725 +       snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%s.%%desc",
726 +           hw_types[i].driver, devname + strlen(hw_types[i].driver));
727 +       vendor = sysctl_get_str(sysctlname);
728 +       if (vendor == NULL) {
729 +               options = input_option_new(options, "name", devname);
730 +       }
731 +       else {
732 +               if ((walk = strchr(vendor, ' ')) != NULL) {
733 +                       walk[0] = '\0';
734 +                       walk++;
735 +                       product = walk;
736 +                       if ((walk = strchr(product, ',')) != NULL)
737 +                               walk[0] = '\0';
738 +               }
739 +
740 +               attrs.vendor = strdup(vendor);
741 +               if (product) {
742 +                       attrs.product = strdup(product);
743 +                       options = input_option_new(options, "name", product);
744 +               }
745 +               else
746 +                       options = input_option_new(options, "name", "(unnamed)");
747 +
748 +               free(vendor);
749 +       }
750 +
751 +       /* XXX implement usb_id */
752 +       attrs.usb_id = NULL;
753 +       attrs.device = strdup(path);
754 +       options = input_option_new(options, "driver", hw_types[i].xdriver);
755 +
756 +       fd = open(path, O_RDONLY);
757 +       if (fd > 0) {
758 +               close(fd);
759 +               options = input_option_new(options, "device", path);
760 +       }
761 +       else {
762 +               if (attrs.flags & ~ATTR_KEYBOARD) {
763 +                       LogMessage(X_INFO, "config/devd: device %s already opened\n",
764 +                                        path);
765 +
766 +                       /*
767 +                        * Fail if cannot open device, it breaks AllowMouseOpenFail,
768 +                        * but it should not matter when config/devd enabled
769 +                        */
770 +                       goto unwind;
771 +               }
772 +
773 +               if (is_console_kbd) {
774 +                       /*
775 +                        * There can be only one keyboard attached to console and
776 +                        * it is already added.
777 +                        */
778 +                       LogMessage(X_WARNING, "config/devd: console keyboard is "
779 +                                       "already added, ignoring %s (%s)\n",
780 +                                       attrs.product, path);
781 +                       goto unwind;
782 +               }
783 +               else
784 +                       /*
785 +                        * Don't pass "device" option if the keyboard is already
786 +                        * attached to the console (ie. open() fails).
787 +                        * This would activate a special logic in xf86-input-keyboard.
788 +                        * Prevent any other attached to console keyboards being
789 +                        * processed. There can be only one such device.
790 +                        */
791 +                       is_console_kbd = true;
792 +       }
793 +
794 +       if (asprintf(&config_info, "devd:%s", devname) == -1) {
795 +               config_info = NULL;
796 +               goto unwind;
797 +       }
798 +
799 +       if (device_is_duplicate(config_info)) {
800 +               LogMessage(X_WARNING, "config/devd: device %s (%s) already added. "
801 +                               "ignoring\n", attrs.product, path);
802 +               goto unwind;
803 +       }
804 +
805 +       options = input_option_new(options, "config_info", config_info);
806 +       LogMessage(X_INFO, "config/devd: adding input device %s (%s)\n",
807 +                       attrs.product, path);
808 +
809 +       NewInputDeviceRequest(options, &attrs, &dev);
810 +
811 +unwind:
812 +       free(config_info);
813 +       input_option_free_list(&options);
814 +       free(attrs.usb_id);
815 +       free(attrs.product);
816 +       free(attrs.device);
817 +       free(attrs.vendor);
818 +}
819 +
820 +static void
821 +device_removed(char *devname)
822 +{
823 +       char *config_info;
824 +
825 +       if (asprintf(&config_info, "devd:%s", devname) == -1)
826 +               return;
827 +
828 +       remove_devices("devd", config_info);
829 +
830 +       free(config_info);
831 +}
832 +
833 +static bool is_kbdmux_enabled(void)
834 +{
835 +       /* Xorg uses /dev/ttyv0 as a console device */
836 +       /* const char device[]="/dev/console"; */
837 +       const char device[]="/dev/ttyv0";
838 +       keyboard_info_t info;
839 +       int fd;
840 +
841 +       fd = open(device, O_RDONLY);
842 +
843 +       if (fd < 0)
844 +               return false;
845 +
846 +       if (ioctl(fd, KDGKBINFO, &info) == -1) {
847 +               close(fd);
848 +               return false;
849 +       }
850 +
851 +       close(fd);
852 +
853 +       if (!strncmp(info.kb_name, "kbdmux", 6))
854 +               return true;
855 +
856 +       return false;
857 +}
858 +
859 +static void
860 +disconnect_devd(int sock)
861 +{
862 +       if (sock >= 0) {
863 +               RemoveGeneralSocket(sock);
864 +               close(sock);
865 +       }
866 +}
867 +
868 +static int
869 +connect_devd(void)
870 +{
871 +       struct sockaddr_un devd;
872 +       int sock;
873 +
874 +       sock = socket(AF_UNIX, SOCK_STREAM, 0);
875 +       if (sock < 0) {
876 +               LogMessage(X_ERROR, "config/devd: fail opening stream socket\n");
877 +               return -1;
878 +       }
879 +
880 +       devd.sun_family = AF_UNIX;
881 +       strlcpy(devd.sun_path, DEVD_SOCK_PATH, sizeof(devd.sun_path));
882 +
883 +       if (connect(sock, (struct sockaddr *) &devd, sizeof(devd)) < 0) {
884 +               close(sock);
885 +               LogMessage(X_ERROR, "config/devd: fail to connect to devd\n");
886 +               return -1;
887 +       }
888 +
889 +       AddGeneralSocket(sock);
890 +
891 +       return  sock;
892 +}
893 +
894 +static CARD32
895 +reconnect_handler(OsTimerPtr timer, CARD32 time, void *arg)
896 +{
897 +       int newsock;
898 +
899 +       if ((newsock = connect_devd()) > 0) {
900 +               sock_devd = newsock;
901 +               TimerFree(rtimer);
902 +               rtimer = NULL;
903 +               LogMessage(X_INFO, "config/devd: reopening devd socket\n");
904 +               return 0;
905 +       }
906 +
907 +       /* Try again after RECONNECT_DELAY */
908 +       return RECONNECT_DELAY;
909 +}
910 +
911 +static ssize_t
912 +socket_getline(int fd, char **out)
913 +{
914 +       char *buf, *newbuf;
915 +       ssize_t ret, cap, sz = 0;
916 +       char c;
917 +
918 +       cap = 1024;
919 +       buf = malloc(cap * sizeof(char));
920 +       if (!buf)
921 +               return -1;
922 +
923 +       for (;;) {
924 +               ret = read(sock_devd, &c, 1);
925 +               if (ret < 0) {
926 +                       if (errno == EINTR)
927 +                               continue;
928 +                       free(buf);
929 +                       return -1;
930 +               /* EOF - devd socket is lost */
931 +               } else if (ret == 0) {
932 +                       disconnect_devd(sock_devd);
933 +                       rtimer = TimerSet(NULL, 0, 1, reconnect_handler, NULL);
934 +                       LogMessage(X_WARNING, "config/devd: devd socket is lost\n");
935 +                       free(buf);
936 +                       return -1;
937 +               }
938 +               if (c == '\n')
939 +                       break;
940 +
941 +               if (sz + 1 >= cap) {
942 +                       cap *= 2;
943 +                       newbuf = realloc(buf, cap * sizeof(char));
944 +                       if (!newbuf) {
945 +                               free(buf);
946 +                               return -1;
947 +                       }
948 +                       buf = newbuf;
949 +               }
950 +               buf[sz] = c;
951 +               sz++;
952 +       }
953 +
954 +       buf[sz] = '\0';
955 +       if (sz >= 0)
956 +               *out = buf;
957 +       else
958 +               free(buf);
959 +
960 +       /* Number of bytes in the line, not counting the line break */
961 +       return sz;
962 +}
963 +
964 +static void
965 +wakeup_handler(void *data, int err, void *read_mask)
966 +{
967 +       char *line = NULL;
968 +       char *walk;
969 +
970 +       if (err < 0)
971 +               return;
972 +
973 +       if (FD_ISSET(sock_devd, (fd_set *) read_mask)) {
974 +               if (socket_getline(sock_devd, &line) < 0)
975 +                       return;
976 +
977 +               walk = strchr(line + 1, ' ');
978 +               if (walk != NULL)
979 +                       walk[0] = '\0';
980 +
981 +               switch (*line) {
982 +               case DEVD_EVENT_ADD:
983 +                       device_added(line + 1);
984 +                       break;
985 +               case DEVD_EVENT_REMOVE:
986 +                       device_removed(line + 1);
987 +                       break;
988 +               default:
989 +                       break;
990 +               }
991 +               free(line);
992 +       }
993 +}
994 +
995 +static void
996 +block_handler(void *data, struct timeval **tv, void *read_mask)
997 +{
998 +}
999 +
1000 +int
1001 +config_devd_init(void)
1002 +{
1003 +       char devicename[1024];
1004 +       int i, j;
1005 +
1006 +       LogMessage(X_INFO, "config/devd: probing input devices...\n");
1007 +
1008 +       /*
1009 +        * Add fake keyboard and give up on keyboards management
1010 +        * if kbdmux is enabled
1011 +        */
1012 +       if ((is_kbdmux = is_kbdmux_enabled()) == true)
1013 +               device_added("kbdmux");
1014 +
1015 +       for (i = 0; hw_types[i].driver != NULL; i++) {
1016 +               /* First scan the sysctl to determine the hardware */
1017 +               for (j = 0; j < 16; j++) {
1018 +                       if (sysctl_exists(&hw_types[i], j,
1019 +                                       devicename, sizeof(devicename)) != 0)
1020 +                               device_added(devicename);
1021 +               }
1022 +
1023 +               if (devpath_exists(&hw_types[i], devicename, sizeof(devicename)) != 0)
1024 +                       device_added(devicename);
1025 +       }
1026 +
1027 +       if ((sock_devd = connect_devd()) < 0)
1028 +               return 0;
1029 +
1030 +       RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
1031 +
1032 +       return 1;
1033 +}
1034 +
1035 +void
1036 +config_devd_fini(void)
1037 +{
1038 +       LogMessage(X_INFO, "config/devd: terminating backend...\n");
1039 +
1040 +       if (rtimer) {
1041 +               TimerFree(rtimer);
1042 +               rtimer = NULL;
1043 +       }
1044 +
1045 +       disconnect_devd(sock_devd);
1046 +
1047 +       RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
1048 +
1049 +       is_console_kbd = false;
1050 +}
1051
1052
1053 [FILE:1081:patches/patch-configure]
1054 --- configure.orig      2020-03-29 20:21:27 UTC
1055 +++ configure
1056 @@ -12056,7 +12056,7 @@ echo 'failed to copy INSTALL from util-m
1057  
1058  
1059  case $host_os in
1060 -    solaris*)
1061 +    nothing*)
1062          # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
1063          # check for a man page file found in later versions that use
1064          # traditional section numbers instead
1065 @@ -21782,7 +21782,7 @@ if test `${RAWCPP} < conftest.$ac_ext |
1066         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1067  $as_echo "no" >&6; }
1068  else
1069 -       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1070 +       if true; then
1071                 TRADITIONALCPPFLAGS="-traditional"
1072                 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1073                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1074 @@ -23151,9 +23151,14 @@ $as_echo "#define USE_ALPHA_PIO 1" >>con
1075         esac
1076         GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee"
1077         ;;
1078 -  arm*)
1079 +  arm*|aarch64*)
1080         ARM_VIDEO=yes
1081         DEFAULT_INT10="stub"
1082 +       case $host_os in
1083 +               *freebsd*)
1084 +                       $as_echo "#define USE_DEV_IO 1" >>confdefs.h
1085 +                ;;
1086 +       esac
1087         ;;
1088    i*86)
1089         I386_VIDEO=yes
1090
1091
1092 [FILE:256:patches/patch-hw_kdrive_ephyr_hostx.c]
1093 --- hw/kdrive/ephyr/hostx.c.orig        2020-03-29 20:21:15 UTC
1094 +++ hw/kdrive/ephyr/hostx.c
1095 @@ -36,7 +36,6 @@
1096  #include <string.h>             /* for memset */
1097  #include <errno.h>
1098  #include <time.h>
1099 -#include <err.h>
1100  
1101  #include <sys/ipc.h>
1102  #include <sys/shm.h>
1103
1104
1105 [FILE:765:patches/patch-hw_xfree86_common_xf86AutoConfig.c]
1106 --- hw/xfree86/common/xf86AutoConfig.c.orig     2020-03-29 20:21:15 UTC
1107 +++ hw/xfree86/common/xf86AutoConfig.c
1108 @@ -294,7 +294,7 @@ listPossibleVideoDrivers(XF86MatchedDriv
1109      xf86PciMatchDriver(md);
1110  #endif
1111  
1112 -#if defined(__linux__)
1113 +#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
1114      xf86AddMatchedDriver(md, "modesetting");
1115  #endif
1116  
1117 @@ -302,8 +302,10 @@ listPossibleVideoDrivers(XF86MatchedDriv
1118      /* Fallback to platform default frame buffer driver */
1119  #if !defined(__linux__) && defined(__sparc__)
1120      xf86AddMatchedDriver(md, "wsfb");
1121 -#else
1122 +#elif defined(__linux__)
1123      xf86AddMatchedDriver(md, "fbdev");
1124 +#elif defined(__FreeBSD__)
1125 +    xf86AddMatchedDriver(md, "scfb");
1126  #endif
1127  #endif                          /* !__sun */
1128  
1129
1130
1131 [FILE:700:patches/patch-hw_xfree86_common_xf86Config.c]
1132 --- hw/xfree86/common/xf86Config.c.orig 2020-03-29 20:21:15 UTC
1133 +++ hw/xfree86/common/xf86Config.c
1134 @@ -1264,13 +1264,16 @@ checkCoreInputDevices(serverLayoutPtr se
1135      }
1136  
1137      if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) {
1138 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1139 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
1140 +               defined(CONFIG_DEVD)
1141          const char *config_backend;
1142  
1143  #if defined(CONFIG_HAL)
1144          config_backend = "HAL";
1145  #elif defined(CONFIG_UDEV)
1146          config_backend = "udev";
1147 +#elif defined(CONFIG_DEVD)
1148 +        config_backend = "devd";
1149  #else
1150          config_backend = "wscons";
1151  #endif
1152
1153
1154 [FILE:510:patches/patch-hw_xfree86_common_xf86Globals.c]
1155 --- hw/xfree86/common/xf86Globals.c.orig        2020-03-29 20:21:15 UTC
1156 +++ hw/xfree86/common/xf86Globals.c
1157 @@ -119,7 +119,7 @@ xf86InfoRec xf86Info = {
1158      .miscModInDevEnabled = TRUE,
1159      .miscModInDevAllowNonLocal = FALSE,
1160      .pmFlag = TRUE,
1161 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
1162 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || defined(CONFIG_DEVD)
1163      .forceInputDevices = FALSE,
1164      .autoAddDevices = TRUE,
1165      .autoEnableDevices = TRUE,
1166
1167
1168 [FILE:690:patches/patch-hw_xfree86_common_xf86Xinput.c]
1169 --- hw/xfree86/common/xf86Xinput.c.orig 2020-03-29 20:21:15 UTC
1170 +++ hw/xfree86/common/xf86Xinput.c
1171 @@ -874,7 +874,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, D
1172  {
1173      InputDriverPtr drv = NULL;
1174      DeviceIntPtr dev = NULL;
1175 -    Bool paused;
1176 +    Bool paused = 0;
1177      int rval;
1178      char *path = NULL;
1179  
1180 @@ -1037,6 +1037,7 @@ NewInputDeviceRequest(InputOption *optio
1181          if (strcmp(key, "_source") == 0 &&
1182              (strcmp(value, "server/hal") == 0 ||
1183               strcmp(value, "server/udev") == 0 ||
1184 +             strcmp(value, "server/devd") == 0 ||
1185               strcmp(value, "server/wscons") == 0)) {
1186              is_auto = 1;
1187              if (!xf86Info.autoAddDevices) {
1188
1189
1190 [FILE:450:patches/patch-hw_xfree86_os-support_bsd_bsd__init.c]
1191 --- hw/xfree86/os-support/bsd/bsd_init.c.orig   2020-03-29 20:21:15 UTC
1192 +++ hw/xfree86/os-support/bsd/bsd_init.c
1193 @@ -230,6 +230,9 @@ xf86OpenConsole()
1194               * Add cases for other *BSD that behave the same.
1195               */
1196  #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
1197 +#if defined(__sparc64__)
1198 +           pci_system_init_dev_mem(fd);
1199 +#endif
1200              uname(&uts);
1201              i = atof(uts.release) * 100;
1202              if (i >= 310)
1203
1204
1205 [FILE:315:patches/patch-hw_xfree86_os-support_bsd_i386__video.c]
1206 Index: programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c
1207 --- hw/xfree86/os-support/bsd/i386_video.c.orig 2020-03-29 20:21:15 UTC
1208 +++ hw/xfree86/os-support/bsd/i386_video.c
1209 @@ -32,6 +32,7 @@
1210  #include "xf86Priv.h"
1211  
1212  #include <errno.h>
1213 +#include <sys/types.h>
1214  #include <sys/mman.h>
1215  
1216  #include "xf86_OSlib.h"
1217
1218
1219 [FILE:380:patches/patch-hw_xfree86_os-support_bsd_ppc__video.c]
1220 --- hw/xfree86/os-support/bsd/ppc_video.c.orig  2020-03-29 20:21:15 UTC
1221 +++ hw/xfree86/os-support/bsd/ppc_video.c
1222 @@ -79,7 +79,11 @@ xf86DisableIO()
1223  {
1224  
1225      if (ioBase != MAP_FAILED) {
1226 +#if defined(__FreeBSD__)
1227 +        munmap(__DEVOLATILE(unsigned char *, ioBase), 0x10000);
1228 +#else
1229          munmap(__UNVOLATILE(ioBase), 0x10000);
1230 +#endif
1231          ioBase = MAP_FAILED;
1232      }
1233  }
1234
1235
1236 [FILE:714:patches/patch-hw_xfree86_os-support_solaris_sun__init.c]
1237 --- hw/xfree86/os-support/solaris/sun_init.c.orig       2020-03-29 20:21:15 UTC
1238 +++ hw/xfree86/os-support/solaris/sun_init.c
1239 @@ -54,6 +54,22 @@ static int xf86StartVT = -1;
1240  static int vtEnabled = 0;
1241  #endif
1242  
1243 +#ifdef __sun__
1244 +#define VTIOC          ('V'<<8)
1245 +#define VT_OPENQRY     (VTIOC|1)
1246 +#define VT_SETMODE     (VTIOC|2)
1247 +#define VT_GETMODE     (VTIOC|3)
1248 +#define VT_ACTIVATE    (VTIOC|5)
1249 +#define VT_WAITACTIVE  (VTIOC|6)
1250 +#define VT_GETSTATE    (VTIOC|100)
1251 +#define VT_ENABLED     (VTIOC|101)
1252 +#define VT_SETDISPINFO (VTIOC|103)
1253 +#define VT_GET_CONSUSER        (VTIOC|108)
1254 +#define VT_SET_CONSUSER        (VTIOC|109)
1255 +
1256 +enum { VT_AUTO = 0, VT_PROCESS };
1257 +#endif
1258 +
1259  /* Device to open as xf86Info.consoleFd */
1260  static char consoleDev[PATH_MAX] = "/dev/fb";
1261  
1262
1263
1264 [FILE:193:patches/patch-os_backtrace.c]
1265 --- os/backtrace.c.orig 2020-03-29 20:21:15 UTC
1266 +++ os/backtrace.c
1267 @@ -29,6 +29,7 @@
1268  #include "misc.h"
1269  #include <errno.h>
1270  #include <string.h>
1271 +#include <unistd.h>
1272  
1273  #ifdef HAVE_LIBUNWIND
1274  
1275
1276
1277 [FILE:1021:patches/patch-test_simple-xinit.c]
1278 --- test/simple-xinit.c.orig    2020-03-29 20:21:15 UTC
1279 +++ test/simple-xinit.c
1280 @@ -34,6 +34,47 @@
1281  #include <sys/wait.h>
1282  #include <unistd.h>
1283  
1284 +#ifdef __sun__
1285 +#include <sys/varargs.h>
1286 +static int
1287 +vasprintf(char **strp, const char *fmt, va_list args)
1288 +{
1289 +    va_list args_copy;
1290 +    int status, needed;
1291 +
1292 +    va_copy(args_copy, args);
1293 +    needed = vsnprintf(NULL, 0, fmt, args_copy);
1294 +    va_end(args_copy);
1295 +    if (needed < 0) {
1296 +        *strp = NULL;
1297 +        return needed;
1298 +    }
1299 +    *strp = malloc(needed + 1);
1300 +    if (*strp == NULL)
1301 +        return -1;
1302 +    status = vsnprintf(*strp, needed + 1, fmt, args);
1303 +    if (status >= 0)
1304 +        return status;
1305 +    else {
1306 +        free(*strp);
1307 +        *strp = NULL;
1308 +        return status;
1309 +    }
1310 +}
1311 +
1312 +static int
1313 +asprintf(char **strp, const char *fmt, ...)
1314 +{
1315 +    va_list args;
1316 +    int status;
1317 +
1318 +    va_start(args, fmt);
1319 +    status = vasprintf(strp, fmt, args);
1320 +    va_end(args);
1321 +    return status;
1322 +}
1323 +#endif
1324 +
1325  static void
1326  kill_server(int server_pid)
1327  {
1328
1329
1330 [FILE:215:patches/patch-xkb_Makefile.in]
1331 --- xkb/Makefile.in.orig        2020-03-29 20:21:33 UTC
1332 +++ xkb/Makefile.in
1333 @@ -936,7 +936,7 @@ info: info-am
1334  
1335  info-am:
1336  
1337 -install-data-am: install-dist_xkbcompiledDATA
1338 +install-data-am:
1339  
1340  install-dvi: install-dvi-am
1341  
1342
1343
1344 [FILE:135:files/pkg-deinstall-single.in]
1345 #!/bin/sh
1346
1347 PREFIX="${PKG_PREFIX-/raven}"
1348
1349 case $2 in
1350 DEINSTALL)
1351         /bin/rm -rf ${PREFIX}/lib/xorg/modules/extensions/libglx.so*
1352         ;;
1353 esac
1354
1355
1356 [FILE:531:files/pkg-install-single.in]
1357 #!/bin/sh
1358
1359 PREFIX="${PKG_PREFIX-/raven}"
1360
1361 case $2 in
1362 POST-INSTALL)
1363         if [ -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 ]; then
1364           /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1365                 ${PREFIX}/lib/xorg/modules/extensions/libglx.so
1366           /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
1367                 ${PREFIX}/lib/xorg/modules/extensions/libglx.so.1
1368         else
1369           /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.xorg/libglx.so \
1370                 ${PREFIX}/lib/xorg/modules/extensions/libglx.so
1371         fi
1372         ;;
1373 esac
1374