recipe 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # Build recipe for librsvg.
  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=librsvg
  18. version=2.40.20
  19. release=2
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/libs"
  22. tarname=${program}-${version}.tar.xz
  23. # Remote source(s)
  24. fetch="http://ftp.gnome.org/pub/gnome/sources/librsvg/${version%.*}/$tarname"
  25. description="
  26. A high performance SVG rendering library.
  27. The librsvg package contains librsvg libraries and tools used to
  28. manipulate, convert and view Scalable Vector Graphic images.
  29. "
  30. homepage=http://wiki.gnome.org/Projects/LibRsvg
  31. license="GPLv2+, LGPLv2+"
  32. # Source documentation
  33. docs="AUTHORS COPYING* NEWS README"
  34. docsdir="${docdir}/${program}-${version}"
  35. build()
  36. {
  37. set -e
  38. unpack "${tardir}/$tarname"
  39. cd "$srcdir"
  40. # Apply patch from Debian
  41. patch -Np1 -i "${worktree}/patches/librsvg/10_rsvg-gz.patch"
  42. ./configure CFLAGS="$QICFLAGS" \
  43. LDFLAGS="$QILDFLAGS -Wl,--no-keep-memory,-z,defs -Wl,-O1 -Wl,--as-needed" \
  44. $configure_args \
  45. --mandir=$mandir \
  46. --libdir=/usr/lib${libSuffix} \
  47. --enable-static=no \
  48. --enable-shared=yes \
  49. --enable-pixbuf-loader \
  50. --enable-introspection \
  51. --enable-vala \
  52. --disable-rpath \
  53. --build="$(cc -dumpmachine)"
  54. make -j${jobs} V=1
  55. make -j${jobs} V=1 DESTDIR="$destdir" install-strip
  56. # Compress and link man pages (if needed)
  57. if test -d "${destdir}/$mandir"
  58. 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. }