template 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Template file for 'openexr'
  2. pkgname=openexr
  3. version=2.4.1
  4. revision=2
  5. build_style=cmake
  6. build_helper="qemu"
  7. hostmakedepends="pkg-config"
  8. makedepends="ilmbase-devel zlib-devel"
  9. short_desc="High dynamic-range (HDR) image file format"
  10. maintainer="Orphaned <orphan@voidlinux.org>"
  11. license="BSD-3-Clause"
  12. homepage="https://www.openexr.com/"
  13. distfiles="https://github.com/openexr/openexr/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
  14. checksum=3ebbe9a8e67edb4a25890b98c598e9fe23b10f96d1416d6a3ff0732e99d001c1
  15. pre_patch() {
  16. # remove documentation with embedded non-free fonts
  17. find . -name *.pdf -exec rm -v '{}' \;
  18. }
  19. pre_configure() {
  20. if [ "$CROSS_BUILD" ]; then
  21. vsed -i IlmBase/Half/CMakeLists.txt \
  22. IlmBase/ImathTest/CMakeLists.txt \
  23. OpenEXR/IlmImf/CMakeLists.txt \
  24. -e "s; COMMAND ; COMMAND qemu-${XBPS_TARGET_QEMU_MACHINE}-static ;g"
  25. fi
  26. }
  27. post_install() {
  28. local d f
  29. vlicense LICENSE.md
  30. # Remove files which are already in ilmbase{,-devel}
  31. for pkg in ilmbase ilmbase-devel; do
  32. for f in $(xbps-query -Rf $pkg|awk '{print $1}'); do
  33. rm -f "${DESTDIR}/$f"
  34. done
  35. done
  36. }
  37. libopenexr_package() {
  38. short_desc+=" - runtime libraries"
  39. pkg_install() {
  40. vmove "usr/lib/*.so.*"
  41. }
  42. }
  43. libopenexr-devel_package() {
  44. short_desc+=" - development files"
  45. depends="${makedepends} libopenexr>=${version}_${revision}"
  46. pkg_install() {
  47. vmove usr/include
  48. vmove usr/lib/cmake
  49. vmove usr/lib/pkgconfig
  50. vmove "usr/lib/*.so"
  51. vmove usr/share
  52. }
  53. }