temp/gtk+3.0: upgrade to 9999_git20210108 (MR 1903)

Fix about dialogs not being adaptive and all other changes by Purism,
which are the reason why we use the fork in the first place. The patches
didn't get applied in the previous version we had packaged in
postmarketOS, because the patches are in debian/patches now.

Remove check-version.py, it's in the source tree now.
This commit is contained in:
Oliver Smith 2021-01-26 23:29:46 +01:00 committed by Bart Ribbers
parent 79532aac89
commit 1d67df18b2
No known key found for this signature in database
GPG key ID: 699D16185DAFAE61
2 changed files with 7 additions and 209 deletions

View file

@ -1,8 +1,8 @@
# Forked from Alpine to apply Purism's patches for responsivness
pkgname=gtk+3.0
pkgver=9999_git20201211
pkgver=9999_git20210108
pkgrel=0
_commit="dd1aa3de371d618707473d4ffb5986cc5896ed2f"
_commit="261616199e6229d51762007f3cf35575efe56856"
pkgdesc="The GTK+ Toolkit (v3)"
url="https://www.gtk.org/"
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.post-deinstall"
@ -59,7 +59,6 @@ checkdepends="
gdk-pixbuf
"
source="https://source.puri.sm/Librem5/gtk/-/archive/$_commit/gtk-$_commit.tar.gz
check-version.py
"
builddir="$srcdir/gtk-$_commit"
@ -67,6 +66,10 @@ builddir="$srcdir/gtk-$_commit"
prepare() {
default_prepare
# Purism patches
grep "\.patch$" debian/patches/series \
| xargs -I {} -t -r -n1 patch -p1 -i debian/patches/{}
# Prevent unexpected downgrade: 3.90.99 is higher than Alpine's version
# (pma#694), but still passes the libportal check (pma#841)
for _ver in gtk_minor_version gtk_micro_version gtk_interface_age; do
@ -74,10 +77,6 @@ prepare() {
done
sed -i "s/ version: '.*',/ version: '3.90.99',/g" meson.build
sed -i "s/^gtk_interface_age = .*/gtk_interface_age = 90/g" meson.build
# Upstream forgot to include this in the tarball
# https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1776
mv "$srcdir"/check-version.py .
}
build() {
@ -136,5 +135,4 @@ doc() {
default_doc
}
sha512sums="f795f2896ccdbc87291ecdc7b1884f046e1916445f1c98087f6a5fb43d848b20602d4594a9838c9fe3982a0da04c04da2136f9bd8b74d0f4a9c41581499c9a53 gtk-dd1aa3de371d618707473d4ffb5986cc5896ed2f.tar.gz
b97ccd8fb78d7c32fe91607befd6a7c0dd969fbfc9c242948fc88085133e3461583a0b18ade199b73f9659cae5f5525b940e66535a6ced4b916af9a88b3cc578 check-version.py"
sha512sums="8e1be00e12ba294e6f654d180db7dececd852490a9b50d82995cd7e855a407f371ece61b82c0cb79dc0e892dbed2a74898e7cea8f466e096c9276eeb98778801 gtk-261616199e6229d51762007f3cf35575efe56856.tar.gz"

View file

@ -1,200 +0,0 @@
#!/usr/bin/env python3
import re
import sys
try:
configure_ac = sys.argv[1]
except Exception:
configure_ac = 'configure.ac'
try:
meson_build = sys.argv[2]
except Exception:
meson_build = 'meson.build'
CONFIGURE_MAJOR_VERSION_RE = re.compile(
r'''
^
\s*
m4_define\(
\s*
\[gtk_major_version\]
\s*
,
\s*
\[
(?P<version>[0-9]+)
\]
\s*
\)
$
''',
re.UNICODE | re.VERBOSE
)
CONFIGURE_MINOR_VERSION_RE = re.compile(
r'''
^
\s*
m4_define\(
\s*
\[gtk_minor_version\]
\s*
,
\s*
\[
(?P<version>[0-9]+)
\]
\s*
\)
$
''',
re.UNICODE | re.VERBOSE
)
CONFIGURE_MICRO_VERSION_RE = re.compile(
r'''
^
\s*
m4_define\(
\s*
\[gtk_micro_version\]
\s*
,
\s*
\[
(?P<version>[0-9]+)
\]
\s*
\)
$
''',
re.UNICODE | re.VERBOSE
)
CONFIGURE_INTERFACE_AGE_RE = re.compile(
r'''
^
\s*
m4_define\(
\s*
\[gtk_interface_age\]
\s*
,
\s*
\[
(?P<age>[0-9]+)
\]
\s*
\)
$
''',
re.UNICODE | re.VERBOSE
)
MESON_VERSION_RE = re.compile(
r'''
^
\s*
version
\s*
:{1}
\s*
\'{1}
(?P<major>[0-9]+)
\.{1}
(?P<minor>[0-9]+)
\.{1}
(?P<micro>[0-9]+)
\'{1}
\s*
,?
$
''',
re.UNICODE | re.VERBOSE
)
MESON_INTERFACE_AGE_RE = re.compile(
r'''
^\s*gtk_interface_age\s*={1}\s*(?P<age>[0-9]+)\s*$
''',
re.UNICODE | re.VERBOSE
)
version = {}
with open(configure_ac, 'r') as f:
line = f.readline()
while line:
res = CONFIGURE_MAJOR_VERSION_RE.match(line)
if res:
if 'major' in version:
print(f'Redefinition of major version; version is already set to {version["major"]}')
sys.exit(1)
version['major'] = res.group('version')
line = f.readline()
continue
res = CONFIGURE_MINOR_VERSION_RE.match(line)
if res:
if 'minor' in version:
print(f'Redefinition of minor version; version is already set to {version["minor"]}')
sys.exit(1)
version['minor'] = res.group('version')
line = f.readline()
continue
res = CONFIGURE_MICRO_VERSION_RE.match(line)
if res:
if 'micro' in version:
print(f'Redefinition of micro version; version is already set to {version["micro"]}')
sys.exit(1)
version['micro'] = res.group('version')
line = f.readline()
continue
res = CONFIGURE_INTERFACE_AGE_RE.match(line)
if res:
if 'age' in version:
print(f'Redefinition of interface age; age is already set to {version["age"]}')
sys.exit(1)
version['age'] = res.group('age')
line = f.readline()
continue
if ('major', 'minor', 'micro', 'age') in version:
break
line = f.readline()
print(f'GTK version defined in {configure_ac}: {version["major"]}.{version["minor"]}.{version["micro"]} (age: {version["age"]})')
configure_version = version
version = {}
with open(meson_build, 'r') as f:
line = f.readline()
inside_project = False
while line:
if line.startswith('project('):
inside_project = True
if inside_project:
res = MESON_VERSION_RE.match(line)
if res:
version['major'] = res.group('major')
version['minor'] = res.group('minor')
version['micro'] = res.group('micro')
if inside_project and line.endswith(')'):
inside_project = False
res = MESON_INTERFACE_AGE_RE.match(line)
if res:
version['age'] = res.group('age')
if ('major', 'minor', 'micro', 'age') in version:
break
line = f.readline()
print(f'GTK version defined in {meson_build}: {version["major"]}.{version["minor"]}.{version["micro"]} (age: {version["age"]})')
meson_version = version
if configure_version != meson_version:
print('Version mismatch between Autotools and Meson builds')
sys.exit(1)
sys.exit(0)