recipe 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Build recipe for liepoxy.
  2. #
  3. # Copyright (c) 2017 Mateus P. Rodrigues, <mprodrigues@dragora.org>.
  4. # Copyright (c) 2018, 2020-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=libepoxy
  20. version=1.5.10
  21. release=1
  22. # Define a category for the output of the package name
  23. pkgcategory=libs
  24. tarname=${program}-${version}.tar.xz
  25. # Remote source(s)
  26. fetch=https://download.gnome.org/sources/libepoxy/"${version%.*}"/$tarname
  27. description="
  28. A library for handling OpenGL function pointer management.
  29. It hides the complexity of dlopen(), dlsym(), glXGetProcAddress(),
  30. eglGetProcAddress(), etc. from the app developer, with very little
  31. knowledge needed on their part. They get to read GL specs and write
  32. code using undecorated function names like glCompileShader().
  33. "
  34. homepage=https://github.com/anholt/libepoxy
  35. license=MIT
  36. # Source documentation
  37. docs="COPYING README.md"
  38. docsdir="${docdir}/${program}-${version}"
  39. build()
  40. {
  41. unpack "${tardir}/$tarname"
  42. cd "$srcdir"
  43. # Set sane permissions
  44. chmod -R u+w,go-w,a+rX-s .
  45. rm -rf BUILD
  46. mkdir BUILD
  47. cd BUILD
  48. CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  49. meson setup $configure_args \
  50. --libdir /usr/lib${libSuffix} \
  51. --buildtype=release \
  52. --strip \
  53. -Dglx=yes \
  54. -Degl=yes \
  55. -Dx11=true \
  56. ..
  57. ninja -j${jobs}
  58. DESTDIR="$destdir" ninja -j${jobs} install
  59. cd ..
  60. # Copy documentation
  61. mkdir -p "${destdir}/$docsdir"
  62. cp -p $docs "${destdir}/$docsdir"
  63. }