recipe 2.7 KB

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