recipe 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # Build recipe for GTK+3.
  2. #
  3. # Copyright (C) 2018, MMPG <mmpg@vp.pl>
  4. # Copyright (C) 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. program=gtk+
  18. version=3.24.1
  19. release=1
  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/gtk+/3.24/$tarname
  25. description="
  26. The version 3 of the GTK+ toolkit.
  27. The GTK+3 package contains libraries used for creating graphical user
  28. interfaces for applications.
  29. "
  30. homepage=http://www.gtk.org
  31. license=GPLv2+
  32. # Copy documentation
  33. docs="AUTHORS COPYING NEWS README* HACKING"
  34. docsdir="${docdir}/${program}-${version}"
  35. build()
  36. {
  37. set -e
  38. unpack "${tardir}/$tarname"
  39. cd "$srcdir"
  40. # Set sane permissions
  41. chmod -R u+w,go-w,a+rX-s .
  42. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  43. $configure_args \
  44. --libdir=/usr/lib${libSuffix} \
  45. --mandir=$mandir \
  46. --enable-static=no \
  47. --enable-shared=yes \
  48. --enable-introspection=yes \
  49. --enable-xkb=yes \
  50. --enable-xinerama=yes \
  51. --enable-xrandr=yes \
  52. --enable-xfixes=yes \
  53. --enable-xcomposite=yes \
  54. --enable-xdamage=yes \
  55. --enable-explicit-deps=yes \
  56. --enable-broadway-backend \
  57. --enable-x11-backend \
  58. --disable-schemas-compile \
  59. --disable-glibtest \
  60. --build="$(cc -dumpmachine)"
  61. make -j${jobs} V=1 \
  62. RUN_QUERY_IMMODULES_TEST=false RUN_QUERY_LOADER_TEST=false
  63. make -j${jobs} \
  64. RUN_QUERY_IMMODULES_TEST=false RUN_QUERY_LOADER_TEST=false \
  65. DESTDIR="$destdir" install-strip
  66. # Add a basic configuration
  67. cat << EOF > "${destdir}/etc/gtk-3.0/gtkrc"
  68. gtk-theme-name = "Adwaita"
  69. EOF
  70. # Manage dot new file(s) via graft(8)
  71. touch "${destdir}/etc/gtk-3.0/.graft-config"
  72. # Compress and link man pages (if needed)
  73. if test -d "${destdir}/$mandir"
  74. then
  75. (
  76. cd "${destdir}/$mandir"
  77. find . -type f -exec lzip -9 '{}' +
  78. find . -type l | while read -r file
  79. do
  80. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  81. rm -- "$file"
  82. done
  83. )
  84. fi
  85. # Copy documentation
  86. mkdir -p "${destdir}${docsdir}"
  87. cp -p $docs "${destdir}${docsdir}"
  88. }