123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- # Build recipe for GTK+3.
- #
- # Copyright (C) 2018, MMPG <mmpg@vp.pl>
- # Copyright (C) 2018-2019, 2021-2022 Matias Fonzo, <selk@dragora.org>.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- # Exit immediately on any error
- set -e
- program=gtk+
- version=3.24.31
- release=1
- # Define a category for the output of the package name
- pkgcategory=x-libs
- # Difference package name with other series
- pkgname=gtk3
- tarname=${program}-${version}.tar.xz
- # Remote source(s)
- fetch="
- https://ftp.gnome.org/pub/gnome/sources/gtk+/${version%.*}/$tarname
- ftp://ftp.acc.umu.se/pub/gnome/sources/gtk+/${version%.*}/$tarname
- "
- description="
- The version 3 of the GTK+ toolkit.
- The GTK+3 package contains libraries used for creating graphical user
- interfaces for applications.
- "
- homepage=https://www.gtk.org
- license=GPLv2+
- # Copy documentation
- docs="AUTHORS COPYING NEWS README* HACKING"
- docsdir="${docdir}/${pkgname}-${version}"
- build()
- {
- unpack "${tardir}/$tarname"
- cd "$srcdir"
- # Set sane permissions
- chmod -R u+w,go-w,a+rX-s .
- rm -rf BUILD
- mkdir BUILD
- cd BUILD
- # TODO: cups: -Dprint_backends="file,lpr,cups"
- CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
- meson setup $configure_args \
- --libdir=lib${libSuffix} \
- --mandir=$mandir \
- --buildtype=release \
- --strip \
- -Dcolord=no \
- -Dgtk_doc=false \
- -Dman=true \
- -Dx11_backend=true \
- -Dbroadway_backend=true \
- -Dwayland_backend=false \
- -Dxinerama=yes \
- ..
- ninja -j${jobs}
- DESTDIR="$destdir" ninja -j${jobs} install
- cd ..
- # Add a basic configuration
- cat << EOF > "${destdir}/etc/gtk-3.0/gtkrc"
- gtk-theme-name = "gnome"
- EOF
- # Manage dot new file(s) via graft(8)
- touch "${destdir}/etc/gtk-3.0/.graft-config"
- # Compress and link man pages (if needed)
- if test -d "${destdir}/$mandir"
- then
- (
- cd "${destdir}/$mandir"
- find . -type f -exec lzip -9 {} +
- find . -type l | while read -r file
- do
- ln -sf "$(readlink -- "$file").lz" "${file}.lz"
- rm -- "$file"
- done
- )
- fi
- # Copy documentation
- mkdir -p "${destdir}/$docsdir"
- cp -p $docs "${destdir}/$docsdir"
- }
|