1 # Build recipe for xorg-server.
3 # Copyright (c) 2017 Mateus P. Rodrigues <mprodrigues@dragora.org>.
4 # Copyright (c) 2017-2019, 2021 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # Exit immediately on any error
25 # Define a category for the output of the package name
26 pkgcategory=xorg_xserver
28 tarname=${program}-${version}.tar.bz2
31 fetch=https://www.x.org/releases/individual/xserver/$tarname
34 A portable, network-transparent Window System.
36 The X Window System is a network transparent window system which
37 runs on a wide range of computing and graphics machines.
40 homepage=https://www.x.org
41 license="MIT X Consortium"
43 # Source documentation
44 docs="COPYING ChangeLog README.md"
45 docsdir="${docdir}/${program}-${version}"
49 unpack "${tardir}/$tarname"
53 # Set sane permissions
54 chmod -R u+w,go-w,a+rX-s .
57 sed -i '/^#include <asm\/page.h>/d' Xext/xf86bigfont.c
58 sed -i 's#termio.h#termios.h#' hw/xfree86/os-support/xf86_OSlib.h
61 CPPFLAGS="$QICPPFLAGS -D_GNU_SOURCE -D__gid_t=gid_t -D__uid_t=uid_t" \
62 CFLAGS="$QICFLAGS -fplt" LDFLAGS="$QILDFLAGS -Wl,-z,lazy" \
64 --libdir=/usr/lib${libSuffix} \
67 --enable-xf86bigfont \
70 --enable-config-udev \
76 --enable-unix-transport \
77 --enable-local-transport \
78 --enable-tcp-transport \
79 --enable-suid-wrapper \
80 --disable-systemd-logind \
83 --with-sha1=libgcrypt \
84 --with-default-font-path="/usr/share/fonts/X11/misc,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi:unscaled,/usr/share/fonts/X11/75dpi:unscaled,/usr/share/fonts/X11/cyrillic,/usr/share/fonts/X11/TTF,/usr/share/fonts/X11/OTF" \
85 --with-module-dir=/usr/lib${libSuffix}/xorg/modules \
86 --with-xkb-path=/etc/X11/xkb \
87 --with-xkb-output=/var/lib/xkb \
88 --with-os-name="GNU/Linux-Libre" \
89 --with-os-vendor="Dragora" \
93 make -j${jobs} DESTDIR="$destdir" install-strip
95 # Allow old behavior to terminate server keystroke
96 cp -p "${worktree}/archive/xserver/00-keyboard.conf" \
97 "${destdir}/usr/share/X11/xorg.conf.d"
98 chmod 644 "${destdir}/usr/share/X11/xorg.conf.d/00-keyboard.conf"
100 # Set the suid bit on the Xorg application.
102 # This will allow us to switch between tty1 and tty7 with the
103 # Ctrl-Alt-F1 and Ctrl-Alt-F7 key combinations (see
104 # recipes/xorg/app/xinit/recipe). Thanks to BLFS!
105 chmod 4755 "${destdir}/usr/libexec/Xorg"
107 # Compress and link man pages (if needed)
108 if test -d "${destdir}/$mandir"
111 cd "${destdir}/$mandir"
112 find . -type f -exec lzip -9 {} +
113 find . -type l | while read -r file
115 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
122 mkdir -p "${destdir}${docsdir}"
123 cp -p $docs "${destdir}${docsdir}"