recipe 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Build recipe for Cairo.
  2. #
  3. # Copyright (C) 2018, MMPG <mmpg@vp.pl>
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. program=cairo
  17. version=1.14.12
  18. release=1
  19. tarname=${program}-${version}.tar.xz
  20. # Remote source(s)
  21. fetch=http://www.cairographics.org/releases/$tarname
  22. description="
  23. A vector graphics library.
  24. Designed to provide high-quality display and print output.
  25. Cairo is designed to produce identical output on all output media
  26. while taking advantage of display hardware acceleration when available.
  27. "
  28. homepage=https://www.cairographics.org/
  29. license="LGPL | MPL"
  30. # Copy documentation
  31. docs="AUTHORS BIBLIOGRAPHY BUGS CODING_STYLE COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1 HACKING INSTALL NEWS README"
  32. docsdir="${docdir}/${program}-${version}"
  33. build()
  34. {
  35. set -e
  36. unpack "${tardir}/$tarname"
  37. cd "$srcdir"
  38. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  39. $configure_args \
  40. --mandir=$mandir \
  41. --infodir=$infodir \
  42. --disable-static \
  43. --enable-tee \
  44. --build="$(cc -dumpmachine)"
  45. make -j${jobs}
  46. make -j${jobs} DESTDIR="$destdir" install
  47. # Compress info documents deleting index file for the package
  48. if test -d "${destdir}/$infodir"
  49. then
  50. rm -f "${destdir}/${infodir}/dir"
  51. lzip -9 "${destdir}/${infodir}"/*
  52. fi
  53. # Compress and link man pages (if needed)
  54. if test -d "${destdir}/$mandir"
  55. then
  56. (
  57. cd "${destdir}/$mandir"
  58. find . -type f -exec lzip -9 '{}' +
  59. find . -type l | while read -r file
  60. do
  61. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  62. rm -- "$file"
  63. done
  64. )
  65. fi
  66. # Copy documentation
  67. mkdir -p "${destdir}${docsdir}"
  68. for file in $docs
  69. do
  70. cp -p $file "${destdir}${docsdir}"
  71. done
  72. }