recipe 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # Build recipe for Gdk Pixbuf.
  2. #
  3. # Copyright (C) 2018, MMPG <mmpg@vp.pl>
  4. # Copyright (C) 2018-2019 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=gdk-pixbuf
  18. version=2.39.2
  19. release=2
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/x-libs"
  22. tarname=${program}-${version}.tar.xz
  23. # Remote source(s)
  24. fetch="http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/${version%.*}/$tarname"
  25. description="
  26. An image loading library.
  27. The library provides image loading and saving facilities, fast scaling
  28. and compositing of pixbufs, simple animation loading (i.e.
  29. animated GIFs), and rendering the libart image buffer.
  30. "
  31. homepage=http://developer.gnome.org/gdk-pixbuf/stable/
  32. license=LGPLv2+
  33. # Source documentation
  34. docs="COPYING NEWS"
  35. docsdir="${docdir}/${program}-${version}"
  36. build()
  37. {
  38. set -e
  39. unpack "${tardir}/$tarname"
  40. cd "$srcdir"
  41. # Set sane permissions
  42. chmod -R u+w,go-w,a+rX-s .
  43. mkdir -p build
  44. cd build
  45. CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  46. meson setup $configure_args \
  47. --libdir=lib${libSuffix} \
  48. --mandir=$mandir \
  49. --buildtype=release \
  50. --strip \
  51. -Dman=true \
  52. -Djasper=true \
  53. -Dinstalled_tests=false \
  54. ..
  55. ninja
  56. DESTDIR="$destdir" ninja install
  57. cd ..
  58. # Compress and link man pages (if needed)
  59. if test -d "${destdir}/$mandir"
  60. 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. }