recipe 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. #
  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=fontconfig
  20. version=2.13.1
  21. release=2
  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=fontconfig-pass1
  26. description="
  27. Library for font configuration.
  28. The fontconfig package is a library for configuring and customizing
  29. font access.
  30. "
  31. homepage=https://www.freedesktop.org/wiki/Software/fontconfig/
  32. license=Custom
  33. tarname=${program}-${version}.tar.bz2
  34. # Remote source(s)
  35. fetch=https://www.freedesktop.org/software/fontconfig/release/$tarname
  36. # Source documentation
  37. docs="AUTHORS COPYING ChangeLog NEWS README"
  38. docsdir="${docdir}/${program}-${version}"
  39. build() {
  40. unpack "${tardir}/$tarname"
  41. cd "$srcdir"
  42. # Set sane permissions
  43. chmod -R u+w,go-w,a+rX-s .
  44. # Make sure the system regenerates src/fcobjshash.h (Thanks to BLFS!)
  45. rm -f src/fcobjshash.h
  46. ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  47. $configure_args \
  48. --libdir=/usr/lib${libSuffix} \
  49. --mandir=$mandir \
  50. --with-docdir=$docsdir \
  51. --disable-static \
  52. --enable-shared \
  53. --disable-gtk-doc \
  54. --build="$(gcc -dumpmachine)"
  55. make -j${jobs} V=1
  56. make -j${jobs} DESTDIR="$destdir" install-strip
  57. # Compress manual pages
  58. if [ -d "${destdir}/$mandir" ] ; then
  59. (
  60. cd "${destdir}/$mandir"
  61. find . -type f -exec lzip -9 {} +
  62. find . -type l | while read -r file
  63. do
  64. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  65. rm -- "$file"
  66. done
  67. )
  68. fi
  69. # Copy documentation
  70. mkdir -p "${destdir}/$docsdir"
  71. cp -p $docs "${destdir}/$docsdir"
  72. }