Xorg and its components have been updated
[dragora.git] / recipes / xorg / xserver / recipe
blobe2daed6d53e0053a21ae2d54fa5ad982293a002c
1 # Build recipe for xorg-server.
3 # Copyright (c) 2017 Mateus P. Rodrigues <mprodrigues@dragora.org>.
4 # Copyright (c) 2017-2019, 2021-2022 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
19 set -e
21 program=xorg-server
22 version=1.20.14
23 release=1
25 # Define a category for the output of the package name
26 pkgcategory=xorg_xserver
28 tarname=${program}-${version}.tar.gz
30 # Remote source(s)
31 fetch=https://www.x.org/releases/individual/xserver/$tarname
33 description="
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}"
47 build()
49     unpack "${tardir}/$tarname"
51     cd "$srcdir"
53     # Set sane permissions
54     chmod -R u+w,go-w,a+rX-s .
56     # Adjust headers
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
60     ./configure \
61     CPPFLAGS="$QICPPFLAGS -D_GNU_SOURCE -D__gid_t=gid_t -D__uid_t=uid_t" \
62     CFLAGS="$QICFLAGS " LDFLAGS="$QILDFLAGS -Wl,-z,lazy" \
63      $configure_args \
64      --libdir=/usr/lib${libSuffix} \
65      --mandir=$mandir \
66      --docdir=$docsdir \
67      --enable-xf86bigfont \
68      --enable-xcsecurity \
69      --enable-kdrive \
70      --enable-config-udev \
71      --enable-glamor \
72      --enable-dri \
73      --enable-dri2 \
74      --enable-dri3 \
75      --enable-ipv6 \
76      --enable-unix-transport \
77      --enable-local-transport \
78      --enable-tcp-transport \
79      --enable-suid-wrapper \
80      --disable-systemd-logind \
81      --with-pic \
82      --with-int10=x86emu \
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-vendor-name="Dragora GNU/Linux-Libre" \
89      --without-xmlto
91     make -j${jobs} V=1
92     make -j${jobs} DESTDIR="$destdir" install-strip
94     # Allow old behavior to terminate server keystroke
95     cp -p "${worktree}/archive/xserver/00-keyboard.conf" \
96           "${destdir}/usr/share/X11/xorg.conf.d"
97     chmod 644 "${destdir}/usr/share/X11/xorg.conf.d/00-keyboard.conf"
99     # Set the suid bit on the Xorg application.
100     #
101     # This will allow us to switch between tty1 and tty7 with the
102     # Ctrl-Alt-F1 and Ctrl-Alt-F7 key combinations (see
103     # recipes/xorg/app/xinit/recipe).  Thanks to BLFS!
104     chmod 4755 "${destdir}/usr/libexec/Xorg"
106     # Compress and link man pages (if needed)
107     if test -d "${destdir}/$mandir"
108     then
109         (
110             cd "${destdir}/$mandir"
111             find . -type f -exec lzip -9 {} +
112             find . -type l | while read -r file
113             do
114                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
115                 rm -- "$file"
116             done
117         )
118     fi
120     # Copy documentation
121     mkdir -p "${destdir}${docsdir}"
122     cp -p $docs "${destdir}${docsdir}"