recipe 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # Build recipe for Cairo (pass1).
  2. #
  3. # Copyright (C) 2018, Matias Fonzo, <selk@dragora.org>.
  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.16.0
  18. release=1
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/x-libs"
  21. pkgname=cairo_pass1
  22. tarname=${program}-${version}.tar.xz
  23. # Remote source(s)
  24. fetch=http://www.cairographics.org/releases/$tarname
  25. description="
  26. Temporary installation of cairo.
  27. This is a temporary installation that is replaced with additional
  28. support included in the final cairo package.
  29. "
  30. homepage=http://www.cairographics.org/
  31. license="LGPLv2.1 | MPLv1.1"
  32. # Copy documentation
  33. docsdir="${docdir}/${pkgname}-${version}"
  34. build()
  35. {
  36. set -e
  37. unpack "${tardir}/$tarname"
  38. cd "$srcdir"
  39. # Set sane permissions
  40. chmod -R u+w,go-w,a+rX-s .
  41. ./configure \
  42. CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
  43. $configure_args \
  44. --libdir=/usr/lib${libSuffix} \
  45. --infodir=$infodir \
  46. --mandir=$mandir \
  47. --enable-static=no \
  48. --enable-shared=yes \
  49. --enable-tee \
  50. --enable-xlib \
  51. --enable-xcb \
  52. --enable-ft \
  53. --disable-trace \
  54. --disable-trace \
  55. --disable-xcb-shm \
  56. --disable-xlib-xcb \
  57. --disable-gtk-doc \
  58. --build="$(cc -dumpmachine)"
  59. make -j${jobs} V=1
  60. make -j${jobs} DESTDIR="$destdir" install-strip
  61. # Compress info documents deleting index file for the package
  62. if test -d "${destdir}/$infodir"
  63. then
  64. rm -f "${destdir}/${infodir}/dir"
  65. lzip -9 "${destdir}/${infodir}"/*
  66. fi
  67. # Compress and link man pages (if needed)
  68. if test -d "${destdir}/$mandir"
  69. then
  70. (
  71. cd "${destdir}/$mandir"
  72. find . -type f -exec lzip -9 '{}' +
  73. find . -type l | while read -r file
  74. do
  75. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  76. rm -- "$file"
  77. done
  78. )
  79. fi
  80. }