recipe 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # Build recipe for GTK+3.
  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=gtk+
  18. version=3.24.12
  19. release=1
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/x-libs"
  22. # Difference package name with other series
  23. pkgname=gtk3
  24. tarname=${program}-${version}.tar.xz
  25. # Remote source(s)
  26. fetch="http://ftp.gnome.org/pub/gnome/sources/gtk+/${version%.*}/$tarname"
  27. description="
  28. The version 3 of the GTK+ toolkit.
  29. The GTK+3 package contains libraries used for creating graphical user
  30. interfaces for applications.
  31. "
  32. homepage=http://www.gtk.org
  33. license=GPLv2+
  34. # Copy documentation
  35. docs="AUTHORS COPYING NEWS README* HACKING"
  36. docsdir="${docdir}/${pkgname}-${version}"
  37. build()
  38. {
  39. set -e
  40. unpack "${tardir}/$tarname"
  41. cd "$srcdir"
  42. # Set sane permissions
  43. chmod -R u+w,go-w,a+rX-s .
  44. mkdir -p build
  45. cd build
  46. # TODO: cups: -Dprint_backends="file,lpr,cups"
  47. CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  48. meson setup $configure_args \
  49. --libdir=lib${libSuffix} \
  50. --mandir=$mandir \
  51. --buildtype=release \
  52. --strip \
  53. -Dcolord=no \
  54. -Dgtk_doc=false \
  55. -Dman=true \
  56. -Dbroadway_backend=true \
  57. -Dwayland_backend=false \
  58. ..
  59. ninja
  60. DESTDIR="$destdir" ninja install
  61. cd ..
  62. # Add a basic configuration
  63. cat << EOF > "${destdir}/etc/gtk-3.0/gtkrc"
  64. gtk-theme-name = "gnome"
  65. EOF
  66. # Manage dot new file(s) via graft(8)
  67. touch "${destdir}/etc/gtk-3.0/.graft-config"
  68. # Compress and link man pages (if needed)
  69. if test -d "${destdir}/$mandir"
  70. then
  71. (
  72. cd "${destdir}/$mandir"
  73. find . -type f -exec lzip -9 '{}' +
  74. find . -type l | while read -r file
  75. do
  76. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  77. rm -- "$file"
  78. done
  79. )
  80. fi
  81. # Copy documentation
  82. mkdir -p "${destdir}${docsdir}"
  83. cp -p $docs "${destdir}${docsdir}"
  84. }