recipes: x-libs/gtk3: upgraded to version 3.24.5
[dragora.git] / recipes / x-libs / gtk3 / recipe
bloba00dc089876bfa867467c2e1604881d5bfe80539
1 # Build recipe for GTK+3.
3 # Copyright (C) 2018, MMPG <mmpg@vp.pl>
4 # Copyright (C) 2018-2019, Matias Fonzo <selk@dragora.org>.
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
10 #    http://www.apache.org/licenses/LICENSE-2.0
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.
18 program=gtk+
19 version=3.24.5
20 release=1
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/x-libs"
25 tarname=${program}-${version}.tar.xz
27 # Remote source(s)
28 fetch=http://ftp.gnome.org/pub/gnome/sources/gtk+/3.24/$tarname
30 description="
31 The version 3 of the GTK+ toolkit.
33 The GTK+3 package contains libraries used for creating graphical user
34 interfaces for applications.
37 homepage=http://www.gtk.org
38 license=GPLv2+
40 # Copy documentation
41 docs="AUTHORS COPYING NEWS README* HACKING"
42 docsdir="${docdir}/${program}-${version}"
44 build()
46     set -e
47     unpack "${tardir}/$tarname"
49     cd "$srcdir"
51     # Set sane permissions
52     chmod -R u+w,go-w,a+rX-s .
54     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
55      $configure_args \
56      --libdir=/usr/lib${libSuffix} \
57      --mandir=$mandir \
58      --enable-static=no \
59      --enable-shared=yes \
60      --enable-introspection=yes \
61      --enable-xkb=yes \
62      --enable-xinerama=yes \
63      --enable-xrandr=yes \
64      --enable-xfixes=yes \
65      --enable-xcomposite=yes \
66      --enable-xdamage=yes \
67      --enable-explicit-deps=yes \
68      --enable-broadway-backend \
69      --enable-x11-backend \
70      --disable-schemas-compile \
71      --disable-glibtest \
72      --build="$(cc -dumpmachine)"
74     make -j${jobs} V=1 \
75      RUN_QUERY_IMMODULES_TEST=false RUN_QUERY_LOADER_TEST=false
77     make -j${jobs} \
78      RUN_QUERY_IMMODULES_TEST=false RUN_QUERY_LOADER_TEST=false \
79      DESTDIR="$destdir" install-strip
81     # Add a basic configuration
82 cat << EOF > "${destdir}/etc/gtk-3.0/gtkrc"
83 gtk-theme-name = "Adwaita"
85 EOF
87     # Manage dot new file(s) via graft(8)
88     touch "${destdir}/etc/gtk-3.0/.graft-config"
90     # Compress and link man pages (if needed)
91     if test -d "${destdir}/$mandir"
92     then
93         (
94             cd "${destdir}/$mandir"
95             find . -type f -exec lzip -9 '{}' +
96             find . -type l | while read -r file
97             do
98                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
99                 rm -- "$file"
100             done
101         )
102     fi
104     # Copy documentation
105     mkdir -p "${destdir}${docsdir}"
106     cp -p $docs "${destdir}${docsdir}"