recipe 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # Build recipe for HarfBuzz.
  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=harfbuzz
  18. version=1.9.0
  19. release=1
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/x-libs"
  22. tarname=${program}-${version}.tar.bz2
  23. # Remote source(s)
  24. fetch=http://www.freedesktop.org/software/harfbuzz/release/$tarname
  25. description="
  26. An OpenType text shaping engine.
  27. The harfbuzz package contains an OpenType text shaping engine.
  28. "
  29. homepage=https://www.freedesktop.org/wiki/Software/HarfBuzz/
  30. license=BSD
  31. docs="AUTHORS COPYING NEWS README THANKS TODO"
  32. docsdir="${docdir}/${program}-${version}"
  33. build()
  34. {
  35. set -e
  36. unpack "${tardir}/$tarname"
  37. cd "$srcdir"
  38. # Set sane permissions
  39. chmod -R u+w,go-w,a+rX-s .
  40. ./configure CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
  41. $configure_args \
  42. --libdir=/usr/lib${libSuffix} \
  43. --mandir=$mandir \
  44. --infodir=$infodir \
  45. --docdir=$docsdir \
  46. --with-glib=yes \
  47. --with-gobject=yes \
  48. --with-fontconfig=yes \
  49. --with-freetype=yes \
  50. --enable-introspection=yes \
  51. --build="$(cc -dumpmachine)"
  52. make -j${jobs} V=1
  53. make -j${jobs} V=1 DESTDIR="$destdir" install-strip
  54. # Compress info documents deleting index file for the package
  55. if test -d "${destdir}/$infodir"
  56. then
  57. rm -f "${destdir}/${infodir}/dir"
  58. lzip -9 "${destdir}/${infodir}"/*
  59. fi
  60. # Compress and link man pages (if needed)
  61. if test -d "${destdir}/$mandir"
  62. then
  63. (
  64. cd "${destdir}/$mandir"
  65. find . -type f -exec lzip -9 '{}' +
  66. find . -type l | while read -r file
  67. do
  68. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  69. rm -- "$file"
  70. done
  71. )
  72. fi
  73. # Copy documentation
  74. mkdir -p "${destdir}${docsdir}"
  75. cp -p $docs "${destdir}${docsdir}/"
  76. }