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