recipe 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # Build recipe for Cairo.
  2. #
  3. # Copyright (C) 2018, MMPG <mmpg@vp.pl>
  4. # Copyright (C) 2018, 2021 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=cairo
  20. version=1.17.4
  21. release=1
  22. # Define a category for the output of the package name
  23. pkgcategory=x-libs
  24. # The installation of this package replaces to
  25. replace=cairo-pass1
  26. tarname=${program}-${version}.tar.xz
  27. # Remote source(s)
  28. #fetch=https://www.cairographics.org/releases/$tarname
  29. fetch=https://cairographics.org/snapshots/$tarname
  30. description="
  31. A vector graphics library.
  32. Cairo is designed to produce identical output on all output media while
  33. taking advantage of display hardware acceleration when available.
  34. "
  35. homepage=https://www.cairographics.org/
  36. license="LGPLv2.1 | MPLv1.1"
  37. # Copy documentation
  38. docs="AUTHORS BIBLIOGRAPHY BUGS CODING_STYLE COPYING* HACKING NEWS README"
  39. docsdir="${docdir}/${program}-${version}"
  40. build()
  41. {
  42. unpack "${tardir}/$tarname"
  43. cd "$srcdir"
  44. # Set sane permissions
  45. chmod -R u+w,go-w,a+rX-s .
  46. ./configure \
  47. CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
  48. $configure_args \
  49. --libdir=/usr/lib${libSuffix} \
  50. --infodir=$infodir \
  51. --mandir=$mandir \
  52. --enable-static=no \
  53. --enable-shared=yes \
  54. --enable-tee \
  55. --enable-xlib \
  56. --enable-xcb \
  57. --enable-ft \
  58. --enable-svg \
  59. --enable-xml \
  60. --enable-gobject \
  61. --disable-trace \
  62. --disable-xcb-shm \
  63. --disable-xlib-xcb \
  64. --build="$(gcc -dumpmachine)"
  65. make -j${jobs} V=1
  66. make -j${jobs} DESTDIR="$destdir" install-strip
  67. # Compress info documents deleting index file for the package
  68. if test -d "${destdir}/$infodir"
  69. then
  70. rm -f "${destdir}/${infodir}/dir"
  71. lzip -9 "${destdir}/${infodir}"/*
  72. fi
  73. # Compress and link man pages (if needed)
  74. if test -d "${destdir}/$mandir"
  75. then
  76. (
  77. cd "${destdir}/$mandir"
  78. find . -type f -exec lzip -9 {} +
  79. find . -type l | while read -r file
  80. do
  81. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  82. rm -- "$file"
  83. done
  84. )
  85. fi
  86. # Copy documentation
  87. mkdir -p "${destdir}/$docsdir"
  88. cp -p $docs "${destdir}/$docsdir"
  89. }