1 # Build recipe for GTK+2.
3 # Copyright (C) 2018, MMPG <mmpg@vp.pl>
4 # Copyright (C) 2018-2019, 2021 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
34 fetch="https://download.gnome.org/sources/gtk+/${version%.*}/$tarname"
37 A multi-platform toolkit for creating graphical user interfaces.
39 Offering a complete set of widgets, GTK+ is suitable for projects
40 ranging from small one-off projects to complete application suites.
43 homepage=https://www.gtk.org
47 docs="AUTHORS COPYING NEWS README* HACKING"
48 docsdir="${docdir}/${pkgname}-${version}"
52 unpack "${tardir}/$tarname"
56 # Set sane permissions
57 chmod -R u+w,go-w,a+rX-s .
59 ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
61 --libdir=/usr/lib${libSuffix} \
66 --enable-introspection=yes \
70 --build="$(gcc -dumpmachine)"
73 RUN_QUERY_IMMODULES_TEST=false RUN_QUERY_LOADER_TEST=false
76 RUN_QUERY_IMMODULES_TEST=false RUN_QUERY_LOADER_TEST=false \
77 DESTDIR="$destdir" install-strip
79 # Add a basic configuration
80 cat << EOF > "${destdir}/etc/gtk-2.0/gtkrc"
81 gtk-icon-theme-name = "hicolor"
85 # Manage dot new file(s) via graft(8)
86 touch "${destdir}/etc/gtk-2.0/.graft-config"
88 # Compress and link man pages (if needed)
89 if test -d "${destdir}/$mandir"
92 cd "${destdir}/$mandir"
93 find . -type f -exec lzip -9 {} +
94 find . -type l | while read -r file
96 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
103 mkdir -p "${destdir}/$docsdir"
104 cp -p $docs "${destdir}/$docsdir"