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