recipe 2.7 KB

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