2020-09-04 20:10:11 +00:00
|
|
|
# Forked from Alpine to apply Purism's patches for responsivness
|
|
|
|
pkgname=gtk+3.0
|
2021-07-07 19:17:50 +00:00
|
|
|
pkgver=9999_git20210602
|
2022-07-20 21:16:14 +00:00
|
|
|
pkgrel=4
|
2021-07-07 19:17:50 +00:00
|
|
|
# pureos/byzantium branch
|
|
|
|
_commit="f05e4021ed82bfbabf566398d0511b6745a5745e"
|
2020-09-04 20:10:11 +00:00
|
|
|
pkgdesc="The GTK+ Toolkit (v3)"
|
|
|
|
url="https://www.gtk.org/"
|
|
|
|
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.post-deinstall"
|
|
|
|
arch="all"
|
|
|
|
license="LGPL-2.1-or-later"
|
|
|
|
options="!check" # Most glade tests fail :c
|
|
|
|
subpackages="$pkgname-demo $pkgname-dev $pkgname-lang $pkgname-dbg"
|
|
|
|
depends="shared-mime-info gtk-update-icon-cache"
|
|
|
|
|
|
|
|
replaces="gtk+"
|
|
|
|
|
|
|
|
depends_dev="
|
2022-07-03 16:42:39 +00:00
|
|
|
at-spi2-core-dev
|
2020-09-04 20:10:11 +00:00
|
|
|
gdk-pixbuf-dev
|
|
|
|
glib-dev
|
|
|
|
libepoxy-dev
|
|
|
|
libxext-dev
|
|
|
|
libxi-dev
|
|
|
|
libxinerama-dev
|
|
|
|
wayland-protocols
|
|
|
|
wayland-libs-client
|
|
|
|
wayland-libs-cursor
|
|
|
|
libxkbcommon-dev
|
|
|
|
"
|
|
|
|
makedepends="
|
|
|
|
$depends_dev
|
|
|
|
cups-dev
|
|
|
|
expat-dev
|
|
|
|
gettext-dev
|
|
|
|
gnutls-dev
|
|
|
|
gobject-introspection-dev
|
|
|
|
libice-dev
|
|
|
|
tiff-dev
|
|
|
|
zlib-dev
|
|
|
|
cairo-dev
|
|
|
|
fontconfig-dev
|
|
|
|
pango-dev
|
|
|
|
wayland-dev
|
|
|
|
libx11-dev
|
|
|
|
libxcomposite-dev
|
|
|
|
libxcursor-dev
|
|
|
|
libxdamage-dev
|
|
|
|
libxfixes-dev
|
|
|
|
libxrandr-dev
|
|
|
|
meson
|
|
|
|
gtk-doc
|
|
|
|
iso-codes-dev
|
|
|
|
"
|
|
|
|
checkdepends="
|
|
|
|
xvfb-run
|
|
|
|
ibus
|
|
|
|
librsvg
|
|
|
|
gdk-pixbuf
|
|
|
|
"
|
|
|
|
source="https://source.puri.sm/Librem5/gtk/-/archive/$_commit/gtk-$_commit.tar.gz
|
2022-05-24 20:43:18 +00:00
|
|
|
0001-Avoid-diagnostics-for-gcc-11-false-positive-out-of-b.patch
|
2022-10-13 22:12:51 +00:00
|
|
|
0001-gtkimagedefinition-Check-array-bounds.patch
|
|
|
|
0002-gtkimagedefinition-Extend-commit-b38266c0.patch
|
2020-09-04 20:10:11 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
builddir="$srcdir/gtk-$_commit"
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
default_prepare
|
|
|
|
|
2021-01-26 22:29:46 +00:00
|
|
|
# Purism patches
|
|
|
|
grep "\.patch$" debian/patches/series \
|
|
|
|
| xargs -I {} -t -r -n1 patch -p1 -i debian/patches/{}
|
|
|
|
|
2020-10-27 14:50:41 +00:00
|
|
|
# Prevent unexpected downgrade: 3.90.99 is higher than Alpine's version
|
|
|
|
# (pma#694), but still passes the libportal check (pma#841)
|
2020-09-04 20:10:11 +00:00
|
|
|
for _ver in gtk_minor_version gtk_micro_version gtk_interface_age; do
|
2020-10-27 14:50:41 +00:00
|
|
|
sed -i "s/m4_define(\[$_ver\], \[.*\])/m4_define([$_ver], [90])/g" configure.ac
|
2020-09-04 20:10:11 +00:00
|
|
|
done
|
2020-10-27 14:50:41 +00:00
|
|
|
sed -i "s/ version: '.*',/ version: '3.90.99',/g" meson.build
|
|
|
|
sed -i "s/^gtk_interface_age = .*/gtk_interface_age = 90/g" meson.build
|
2020-09-04 20:10:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
# postmarketOS specific: disable stuff that takes forever to (cross)compile:
|
|
|
|
# man=false, gtk_doc=false, tests=false
|
|
|
|
meson \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--buildtype=plain \
|
|
|
|
-Dman=false \
|
|
|
|
-Dgtk_doc=false \
|
|
|
|
-Dtests=false \
|
|
|
|
-Dbroadway_backend=true \
|
|
|
|
output
|
|
|
|
ninja -C output
|
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
xvfb-run ninja -C output test
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
DESTDIR="$pkgdir" ninja -C output install
|
|
|
|
|
|
|
|
# use gtk-update-icon-cache from gtk+2.0 for now
|
|
|
|
rm -f "$pkgdir"/usr/bin/gtk-update-icon-cache
|
|
|
|
rm -f "$pkgdir"/usr/share/man/man1/gtk-update-icon-cache.1
|
|
|
|
}
|
|
|
|
|
|
|
|
demo() {
|
|
|
|
pkgdesc="$pkgdesc (demonstration application)"
|
|
|
|
install -Dm755 "$pkgdir"/usr/bin/gtk3-demo \
|
|
|
|
"$pkgdir"/usr/bin/gtk3-widget-factory \
|
|
|
|
"$pkgdir"/usr/bin/gtk3-demo-application \
|
|
|
|
-t "$subpkgdir"/usr/bin
|
|
|
|
install -Dm644 "$pkgdir"/usr/share/gtk-3.0/gtkbuilder.rng \
|
|
|
|
-t "$subpkgdir"/usr/share/gtk-3.0
|
|
|
|
install -Dm644 "$pkgdir"/usr/share/glib-2.0/schemas/org.gtk.Demo.gschema.xml \
|
|
|
|
-t "$subpkgdir"/usr/share/glib-2.0/schemas
|
|
|
|
install -Dm644 "$pkgdir"/usr/share/applications/gtk3-widget-factory.desktop \
|
|
|
|
"$pkgdir"/usr/share/applications/gtk3-demo.desktop \
|
|
|
|
-t "$subpkgdir"/usr/share/applications
|
|
|
|
mkdir -p "$subpkgdir"/usr/share
|
|
|
|
mv "$pkgdir"/usr/share/icons "$subpkgdir"/usr/share
|
|
|
|
}
|
|
|
|
|
|
|
|
dev() {
|
|
|
|
replaces="gtk+-dev"
|
|
|
|
default_dev
|
|
|
|
}
|
|
|
|
|
|
|
|
doc() {
|
|
|
|
replaces="gtk+-doc"
|
|
|
|
default_doc
|
|
|
|
}
|
|
|
|
|
2021-07-07 19:17:50 +00:00
|
|
|
sha512sums="
|
|
|
|
942d2e24bdb4e9fea7fc5bbd3d41ab203b69f6352566f43164e59842d49163e37d638858032cf2322b9b4c279c8c9a07a63d58fa7ec8554f3194c17ae3185fd7 gtk-f05e4021ed82bfbabf566398d0511b6745a5745e.tar.gz
|
2022-05-24 20:43:18 +00:00
|
|
|
346514bb7c1853afcbeff4a5a25a2b9800e135e44271e48cdf400dc607dadd41af57d89ee4f4e24aedc358292d9c45db931dbbd84dae6a10886d8ae633ca8434 0001-Avoid-diagnostics-for-gcc-11-false-positive-out-of-b.patch
|
2022-10-13 22:12:51 +00:00
|
|
|
8dc58f1b5d702e193018899350baadda54a9edf16a88f5afb1fa8bdff3f3e9e923b838a59bf17c672c768d8f67aceafcb41047547dbdc67d3f9b27829aa5e089 0001-gtkimagedefinition-Check-array-bounds.patch
|
|
|
|
25ef673787fd236199980e3eadc6731771d0486ef0ddced92ca654eabe0180a7b445b86354fe4198839b6729dd50bd0c528f38d5411802dd13af72e7843ea493 0002-gtkimagedefinition-Extend-commit-b38266c0.patch
|
2021-07-07 19:17:50 +00:00
|
|
|
"
|