1 # Build recipe for GTK+3.
3 # Copyright (C) 2018, MMPG <mmpg@vp.pl>
4 # Copyright (C) 2018-2019, 2021-2022 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 # Exit immediately on any error
25 # Define a category for the output of the package name
28 # Difference package name with other series
31 tarname=${program}-${version}.tar.xz
35 https://ftp.gnome.org/pub/gnome/sources/gtk+/${version%.*}/$tarname
36 ftp://ftp.acc.umu.se/pub/gnome/sources/gtk+/${version%.*}/$tarname
40 The version 3 of the GTK+ toolkit.
42 The GTK+3 package contains libraries used for creating graphical user
43 interfaces for applications.
46 homepage=https://www.gtk.org
50 docs="AUTHORS COPYING NEWS README* HACKING"
51 docsdir="${docdir}/${pkgname}-${version}"
55 unpack "${tardir}/$tarname"
59 # Set sane permissions
60 chmod -R u+w,go-w,a+rX-s .
66 # TODO: cups: -Dprint_backends="file,lpr,cups"
68 CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
69 meson setup $configure_args \
70 --libdir=lib${libSuffix} \
78 -Dbroadway_backend=true \
79 -Dwayland_backend=false \
84 DESTDIR="$destdir" ninja -j${jobs} install
88 # Add a basic configuration
89 cat << EOF > "${destdir}/etc/gtk-3.0/gtkrc"
90 gtk-theme-name = "gnome"
94 # Manage dot new file(s) via graft(8)
95 touch "${destdir}/etc/gtk-3.0/.graft-config"
97 # Compress and link man pages (if needed)
98 if test -d "${destdir}/$mandir"
101 cd "${destdir}/$mandir"
102 find . -type f -exec lzip -9 {} +
103 find . -type l | while read -r file
105 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
112 mkdir -p "${destdir}/$docsdir"
113 cp -p $docs "${destdir}/$docsdir"