recipe 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Build recipe for xf86-video-ati.
  2. #
  3. # Copyright (c) 2017 Mateus P. Rodrigues <mprodrigues@dragora.org>.
  4. # Copyright (c) 2017-2019, 2021-2022 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. # Exit immediately on any error
  18. set -e
  19. program=xf86-video-ati
  20. version=20211114_7a6a34af; # Taken from "https://cgit.freedesktop.org/xorg/driver/xf86-video-ati/"
  21. release=1
  22. # Define a category for the output of the package name
  23. pkgcategory=xorg_driver
  24. tarname=${program}-${version}.tar.lz
  25. # Remote source(s)
  26. #fetch=https://www.x.org/releases/individual/driver/$tarname
  27. fetch="
  28. https://dragora.mirror.garr.it/current/sources/$tarname
  29. rsync://rsync.dragora.org/current/sources/$tarname
  30. "
  31. description="
  32. ATI Radeon video driver for the Xorg X server.
  33. This package is part of X11.
  34. "
  35. homepage=https://cgit.freedesktop.org/xorg/driver/xf86-video-ati/
  36. license="MIT X Consortium"
  37. # Source documentation
  38. docs="COPYING README.md"
  39. docsdir="${docdir}/${program}-${version}"
  40. build()
  41. {
  42. unpack "${tardir}/$tarname"
  43. cd "$srcdir"
  44. # Set sane permissions
  45. chmod -R u+w,go-w,a+rX-s .
  46. sh ./autogen.sh \
  47. CPPFLAGS="$QICPPFLAGS" \
  48. CFLAGS="$QICFLAGS " LDFLAGS="$QILDFLAGS -Wl,-z,lazy" \
  49. $configure_args \
  50. --libdir=/usr/lib${libSuffix} \
  51. --mandir=$mandir \
  52. --docdir=$docsdir \
  53. --enable-glamor \
  54. --build="$(gcc -dumpmachine)"
  55. make -j${jobs} V=1
  56. make -j${jobs} DESTDIR="$destdir" install
  57. # Compress and link man pages (if needed)
  58. if test -d "${destdir}/$mandir"
  59. then
  60. (
  61. cd "${destdir}/$mandir"
  62. find . -type f -exec lzip -9 {} +
  63. find . -type l | while read -r file
  64. do
  65. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  66. rm -- "$file"
  67. done
  68. )
  69. fi
  70. # Copy documentation
  71. mkdir -p "${destdir}/$docsdir"
  72. cp -p $docs "${destdir}/$docsdir"
  73. }