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