recipe 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # Build recipe for fontconfig.
  2. #
  3. # Copyright (c) 2017 Mateus P. Rodrigues, <mprodrigues@dragora.org>.
  4. # Copyright (c) 2017-2018 Matias Fonzo, <selk@dragora.org>.
  5. # Copyright (c) 2022 Matias Fonzo, <selk@dragora.org>.
  6. #
  7. # Licensed under the Apache License, Version 2.0 (the "License");
  8. # you may not use this file except in compliance with the License.
  9. # You may obtain a copy of the License at
  10. #
  11. # http://www.apache.org/licenses/LICENSE-2.0
  12. #
  13. # Unless required by applicable law or agreed to in writing, software
  14. # distributed under the License is distributed on an "AS IS" BASIS,
  15. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. # See the License for the specific language governing permissions and
  17. # limitations under the License.
  18. # Exit immediately on any error
  19. set -e
  20. program=fontconfig
  21. version=2.14.1
  22. release=1
  23. # Define a category for the output of the package name
  24. pkgcategory=x-libs
  25. # The installation of this package replaces to
  26. replace=fontconfig-pass1
  27. description="
  28. Library for font configuration.
  29. The fontconfig package is a library for configuring and customizing
  30. font access.
  31. "
  32. homepage=https://www.freedesktop.org/wiki/Software/fontconfig/
  33. license=Custom
  34. tarname=${program}-${version}.tar.gz
  35. # Remote source(s)
  36. fetch=https://www.freedesktop.org/software/fontconfig/release/$tarname
  37. # Source documentation
  38. docs="AUTHORS COPYING ChangeLog NEWS README"
  39. docsdir="${docdir}/${program}-${version}"
  40. build() {
  41. unpack "${tardir}/$tarname"
  42. cd "$srcdir"
  43. # Set sane permissions
  44. chmod -R u+w,go-w,a+rX-s .
  45. # Make sure the system regenerates src/fcobjshash.h (Thanks to BLFS!)
  46. rm -f src/fcobjshash.h
  47. ./configure CPPFLAGS="$QICPPFLAGS" \
  48. CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  49. $configure_args \
  50. --libdir=/usr/lib${libSuffix} \
  51. --mandir=$mandir \
  52. --with-docdir=$docsdir \
  53. --disable-static \
  54. --enable-shared \
  55. --disable-gtk-doc \
  56. --build="$(gcc -dumpmachine)"
  57. make -j${jobs} V=1
  58. make -j${jobs} DESTDIR="$destdir" install-strip
  59. # Compress manual pages
  60. if [ -d "${destdir}/$mandir" ] ; then
  61. (
  62. cd "${destdir}/$mandir"
  63. find . -type f -exec lzip -9 {} +
  64. find . -type l | while read -r file
  65. do
  66. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  67. rm -- "$file"
  68. done
  69. )
  70. fi
  71. # Copy documentation
  72. mkdir -p "${destdir}/$docsdir"
  73. cp -p $docs "${destdir}/$docsdir"
  74. }