recipe 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. # Build recipe for mesa.
  2. #
  3. # Copyright (c) 2017 Mateus P. Rodrigues <mprodrigues@dragora.org>.
  4. # Copyright (c) 2017-2018 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=mesa
  18. version=18.2.4
  19. release=1
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/xorg/mesa"
  22. tarname=${program}-${version}.tar.gz
  23. # Remote source(s)
  24. fetch=http://mesa.freedesktop.org/archive/$tarname
  25. description="
  26. Mesa is an OpenGL compatible 3-D graphics library.
  27. The Mesa project began as an open-source implementation of the OpenGL
  28. specification - a system for rendering interactive 3D graphics.
  29. "
  30. homepage=http://www.mesa3d.org/
  31. license=MIT
  32. # Source documentation
  33. docs="VERSION"
  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. ./configure CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
  43. $configure_args \
  44. --libdir=/usr/lib${libSuffix} \
  45. --infodir=$infodir \
  46. --mandir=$mandir \
  47. --docdir=$docsdir \
  48. --disable-debug \
  49. --disable-llvm \
  50. --disable-gallium-llvm \
  51. --enable-texture-float \
  52. --enable-gles1 \
  53. --enable-gles2 \
  54. --enable-gbm \
  55. --enable-shared-glapi \
  56. --enable-glx="dri" \
  57. --enable-glx-tls \
  58. --enable-gallium-extra-hud \
  59. --enable-dri \
  60. --enable-dri3 \
  61. --enable-nine \
  62. --enable-gallium-osmesa \
  63. --enable-xa \
  64. --enable-xlib-lease \
  65. --enable-lmsensors \
  66. --with-gallium-drivers="i915,nouveau,r600,swrast" \
  67. --with-platforms="drm,x11" \
  68. --with-dri-driverdir=/usr/lib${libSuffix}/xorg/modules/dri \
  69. --build="$(cc -dumpmachine)"
  70. make -j${jobs} V=1
  71. make -j${jobs} DESTDIR="$destdir" install-strip
  72. # Handle .new file via graft(1)
  73. touch "${destdir}/etc/.graft-config"
  74. # Compress info documents deleting index file for the package
  75. if test -d "${destdir}/$infodir"
  76. then
  77. rm -f "${destdir}/${infodir}/dir"
  78. lzip -9 "${destdir}/${infodir}"/*
  79. fi
  80. # Compress and link man pages (if needed)
  81. if test -d "${destdir}/$mandir"
  82. then
  83. (
  84. cd "${destdir}/$mandir"
  85. find . -type f -exec lzip -9 '{}' +
  86. find . -type l | while read -r file
  87. do
  88. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  89. rm -- "$file"
  90. done
  91. )
  92. fi
  93. # Copy documentation
  94. mkdir -p "${destdir}${docsdir}"
  95. cp -p $docs "${destdir}${docsdir}"/
  96. }