recipe 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. # Build recipe for xorg-server.
  2. #
  3. # Copyright (c) 2017 Mateus P. Rodrigues <mprodrigues@dragora.org>.
  4. # Copyright (c) 2017-2019 Matias Fonzo, <selk@dragora.org>.
  5. #
  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
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  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.
  17. program=xorg-server
  18. version=1.20.5
  19. release=5
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/xorg/xserver"
  22. tarname=${program}-${version}.tar.bz2
  23. # Remote source(s)
  24. fetch=http://www.x.org/releases/individual/xserver/$tarname
  25. description="
  26. A portable, network-transparent Window System.
  27. The X Window System is a network transparent window system which
  28. runs on a wide range of computing and graphics machines.
  29. "
  30. homepage=http://www.x.org
  31. license="MIT X Consortium"
  32. # Source documentation
  33. docs="COPYING ChangeLog README.md"
  34. docsdir="${docdir}/${program}-${version}"
  35. build()
  36. {
  37. set -e
  38. unpack "${tardir}/$tarname"
  39. cd "$srcdir"
  40. # Set sane permissions
  41. chmod -R u+w,go-w,a+rX-s .
  42. # Fix compilation under ARM (Thanks to "Alpine Linux")
  43. patch -Np1 -i "${worktree}/patches/xserver/fix-musl-arm.patch"
  44. # Adjust headers
  45. sed -i '/^#include <asm\/page.h>/d' Xext/xf86bigfont.c
  46. sed -i 's#termio.h#termios.h#' hw/xfree86/os-support/xf86_OSlib.h
  47. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -Wl,-z,lazy" \
  48. $configure_args \
  49. --libdir=/usr/lib${libSuffix} \
  50. --mandir=$mandir \
  51. --docdir=$docsdir \
  52. --enable-xf86bigfont \
  53. --enable-xcsecurity \
  54. --enable-kdrive \
  55. --enable-config-udev \
  56. --enable-glamor \
  57. --enable-dri \
  58. --enable-dri2 \
  59. --enable-dri3 \
  60. --enable-ipv6 \
  61. --enable-suid-wrapper \
  62. --disable-systemd-logind \
  63. --with-pic \
  64. --with-int10=x86emu \
  65. --with-sha1=libgcrypt \
  66. --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" \
  67. --with-module-dir=/usr/lib${libSuffix}/xorg/modules \
  68. --with-xkb-path=/etc/X11/xkb \
  69. --with-xkb-output=/var/lib/xkb \
  70. --with-os-name="GNU/Linux-Libre" \
  71. --with-os-vendor="Dragora"
  72. make -j${jobs} V=1
  73. make -j${jobs} DESTDIR="$destdir" install-strip
  74. # Allow old behavior to terminate server keystroke
  75. cp -p "${worktree}/archive/xserver/00-keyboard.conf" \
  76. "${destdir}/usr/share/X11/xorg.conf.d"
  77. chmod 644 "${destdir}/usr/share/X11/xorg.conf.d/00-keyboard.conf"
  78. # Set the suid bit on the Xorg application.
  79. #
  80. # This will allow us to switch between tty1 and tty7 with the
  81. # Ctrl-Alt-F1 and Ctrl-Alt-F7 key combinations (see
  82. # recipes/xorg/app/xinit/recipe). Thanks to BLFS!
  83. chmod 4755 "${destdir}/usr/libexec/Xorg"
  84. # Compress and link man pages (if needed)
  85. if test -d "${destdir}/$mandir"
  86. then
  87. (
  88. cd "${destdir}/$mandir"
  89. find . -type f -exec lzip -9 '{}' +
  90. find . -type l | while read -r file
  91. do
  92. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  93. rm -- "$file"
  94. done
  95. )
  96. fi
  97. # Copy documentation
  98. mkdir -p "${destdir}${docsdir}"
  99. cp -p $docs "${destdir}${docsdir}"
  100. }