recipe 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # Build recipe for xorgproto.
  2. #
  3. # Copyright (c) 2018-2019 Matias Fonzo, <selk@dragora.org>.
  4. # Copyright (c) 2021 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=xorgproto
  20. version=2021.5
  21. release=2
  22. # Define a category for the output of the package name
  23. pkgcategory=xorg_proto
  24. tarname=${program}-${version}.tar.bz2
  25. # Remote source(s)
  26. fetch=https://www.x.org/releases/individual/proto/$tarname
  27. description="
  28. X Window System Unified Protocol.
  29. This package provides the headers and specification documents defining
  30. the core protocol and (many) extensions for the X Window System. The
  31. extensions are those common among servers descended from X.Org 6.7. It
  32. also includes a number of headers that aren't purely protocol related,
  33. but are depended upon by many other X Window System packages to provide
  34. common definitions and porting layer.
  35. "
  36. homepage=https://www.x.org
  37. license="MIT X Consortium"
  38. # Source documentation
  39. docs="AUTHORS COPYING* README.md"
  40. docsdir="${docdir}/${program}-${version}"
  41. build()
  42. {
  43. unpack "${tardir}/$tarname"
  44. cd "$srcdir"
  45. # Set sane permissions
  46. chmod -R u+w,go-w,a+rX-s .
  47. rm -rf BUILD
  48. mkdir BUILD
  49. cd BUILD
  50. meson setup $configure_args -Dlegacy=true ..
  51. ninja -j${jobs}
  52. DESTDIR="$destdir" ninja -j${jobs} install
  53. cd ..
  54. # This is provided by 'xorg/lib/libXvMC' currently
  55. rm "${destdir}/usr/include/X11/extensions/vldXvMC.h"
  56. # Compress and link man pages (if needed)
  57. if test -d "${destdir}/$mandir"
  58. then
  59. (
  60. cd "${destdir}/$mandir"
  61. find . -type f -exec lzip -9 {} +
  62. find . -type l | while read -r file
  63. do
  64. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  65. rm -- "$file"
  66. done
  67. )
  68. fi
  69. # Copy documentation
  70. mkdir -p "${destdir}/$docsdir"
  71. cp -p $docs "${destdir}/$docsdir"
  72. }