recipe 2.0 KB

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