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