From a9d6ec349f88386769aef7d7153f246ffa101356 Mon Sep 17 00:00:00 2001 From: Tim Biermann Date: Sat, 8 Jul 2023 22:53:09 +0200 Subject: [PATCH] libdbusmenu-glib: updated source, added patches --- libdbusmenu-glib/.footprint | 3 + libdbusmenu-glib/.signature | 10 +- .../0002_fix-ftbfs-gtk-doc-1-32.patch | 29 ++++++ ...003_port-tools-dbusmenu-bench-to-py3.patch | 92 +++++++++++++++++++ .../0004_prevent-test-json-from-failing.patch | 14 +++ libdbusmenu-glib/Pkgfile | 20 ++-- libdbusmenu-glib/pre-install | 6 +- 7 files changed, 163 insertions(+), 11 deletions(-) create mode 100644 libdbusmenu-glib/0002_fix-ftbfs-gtk-doc-1-32.patch create mode 100644 libdbusmenu-glib/0003_port-tools-dbusmenu-bench-to-py3.patch create mode 100644 libdbusmenu-glib/0004_prevent-test-json-from-failing.patch diff --git a/libdbusmenu-glib/.footprint b/libdbusmenu-glib/.footprint index 2445897d6..9fd93a618 100644 --- a/libdbusmenu-glib/.footprint +++ b/libdbusmenu-glib/.footprint @@ -17,3 +17,6 @@ lrwxrwxrwx root/root usr/lib/libdbusmenu-glib.so.4 -> libdbusmenu-glib.so.4.0.12 -rwxr-xr-x root/root usr/lib/libdbusmenu-glib.so.4.0.12 drwxr-xr-x root/root usr/lib/pkgconfig/ -rw-r--r-- root/root usr/lib/pkgconfig/dbusmenu-glib-0.4.pc +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/glib-2.0/ +drwxr-xr-x root/root usr/share/glib-2.0/gettext/ diff --git a/libdbusmenu-glib/.signature b/libdbusmenu-glib/.signature index eba1bd47d..59d7df450 100644 --- a/libdbusmenu-glib/.signature +++ b/libdbusmenu-glib/.signature @@ -1,6 +1,8 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF323akRSDMBTM/JMytvt7J1MDuKvqOC47vKC6ZmUua+HEOSOQFV6eM8y28MLkwoPv0nlZe/SK6iyLcDL2trqr7AE= -SHA256 (Pkgfile) = 003b55672b5cf786c3e8f7f230da0ba45836b65b16372fa1e61e24fcc4c63648 -SHA256 (.footprint) = 38dd875914f1a696ba5b9e1f62598a572177281117c51ad5b4e38b5975ddb052 -SHA256 (libdbusmenu_18.10.20180917~bzr490+repack1.orig.tar.xz) = f670bc86ea5ae1488b2405f371ceb870ce353127578f9b0aed2862cbbc42053b +RWSagIOpLGJF37ZbJM5RFlEVj93xX/WR/FR+j23R2ELqj9YKiWzgOF+JSH+uhOWrxOMLhgKoyRMUA0jE+dHUM+TwglxJm/HnqAQ= +SHA256 (Pkgfile) = b5adab240436372c2acc5fa395d4fb5f119cbcb3c19a9acbb5cbe0d4419487ce +SHA256 (.footprint) = ae803c4a902892610f944d61377d96a5067e72ac0cabc73d580d13facd60b053 +SHA256 (libdbusmenu_18.10.20180917~bzr492+repack1.orig.tar.xz) = 41298b926573419f21864205317461750b833c596af6ab0bd206e13336f8cee3 SHA256 (0001_no-deprecated-gnome-common-macros.patch) = a65626ad3dd26a81037332d881736587929c7f8935cd34d2fc3e7f4a988d5a72 +SHA256 (0003_port-tools-dbusmenu-bench-to-py3.patch) = 5596fa1d311e80e780af9d2453e1b81f2b9604bb9894333c51a1361f41778919 +SHA256 (0004_prevent-test-json-from-failing.patch) = 42f61f6b2a9c3e355a21f3fc8f9583963704e8c299b0f12c07499e41ce99c992 diff --git a/libdbusmenu-glib/0002_fix-ftbfs-gtk-doc-1-32.patch b/libdbusmenu-glib/0002_fix-ftbfs-gtk-doc-1-32.patch new file mode 100644 index 000000000..4fce41bd7 --- /dev/null +++ b/libdbusmenu-glib/0002_fix-ftbfs-gtk-doc-1-32.patch @@ -0,0 +1,29 @@ +Description: Fix empty tree_index files not being built anymore. +Author: Mike Gabriel + +--- a/docs/libdbusmenu-glib/reference/libdbusmenu-glib-docs.sgml ++++ b/docs/libdbusmenu-glib/reference/libdbusmenu-glib-docs.sgml +@@ -18,10 +18,6 @@ + + + +- +- Object Hierarchy +- +- + + API Index + +--- a/docs/libdbusmenu-gtk/reference/libdbusmenu-gtk-docs.sgml ++++ b/docs/libdbusmenu-gtk/reference/libdbusmenu-gtk-docs.sgml +@@ -17,10 +17,6 @@ + + + +- +- Object Hierarchy +- +- + + API Index + diff --git a/libdbusmenu-glib/0003_port-tools-dbusmenu-bench-to-py3.patch b/libdbusmenu-glib/0003_port-tools-dbusmenu-bench-to-py3.patch new file mode 100644 index 000000000..5a43a696b --- /dev/null +++ b/libdbusmenu-glib/0003_port-tools-dbusmenu-bench-to-py3.patch @@ -0,0 +1,92 @@ +Description: Port tools/dbusmenu-bench from Py2 to Py3. +Author: Mike Gabriel + +--- a/tools/dbusmenu-bench ++++ b/tools/dbusmenu-bench +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # encoding: utf-8 + """ + A library to communicate a menu object set accross DBus and +@@ -60,8 +60,8 @@ + + + def dump_properties(properties, prepend=""): +- for key, value in properties.items(): +- print "%s- %s: %s" % (prepend, key, value) ++ for key, value in list(properties.items()): ++ print("%s- %s: %s" % (prepend, key, value)) + + + def run_test_sequence(menu, dump=False): +@@ -74,9 +74,9 @@ + revision, layout = menu.GetLayout(dbus.Int32(0)) + times["GetLayout"] = chrono.elapsed() + if dump: +- print "revision:", revision +- print "layout:" +- print layout ++ print("revision:", revision) ++ print("layout:") ++ print(layout) + + # Get ids + tree = ET.fromstring(layout) +@@ -89,27 +89,27 @@ + children = menu.GetChildren(dbus.Int32(root_id), property_names) + times["GetChildren"] = chrono.elapsed() + if dump: +- print "children:" ++ print("children:") + for child in children: + id, properties = child +- print "- %d:" % id ++ print("- %d:" % id) + dump_properties(properties, prepend=" ") + + chrono.restart() + properties = menu.GetProperties(dbus.Int32(child_id), property_names) + times["GetProperties"] = chrono.elapsed() + if dump: +- print "properties:" ++ print("properties:") + dump_properties(properties) + + return times + + def create_timing_dict(): +- return dict(zip(PROBES, itertools.repeat(0))) ++ return dict(list(zip(PROBES, itertools.repeat(0)))) + + def print_probe(prefix, name, value, timestamp): + value = int(value * 1000000) +- print "%(prefix)s.%(name)s:%(value)d@%(timestamp)d" % locals() ++ print("%(prefix)s.%(name)s:%(value)d@%(timestamp)d" % locals()) + + def main(): + parser = OptionParser(usage = "%prog [options]") +@@ -134,7 +134,7 @@ + max_timings = create_timing_dict() + for x in range(options.count): + timings = run_test_sequence(menu) +- for name, timing in timings.items(): ++ for name, timing in list(timings.items()): + cumulated_timings[name] += timing + if min_timings[name] == 0 or min_timings[name] > timing: + min_timings[name] = timing +@@ -142,11 +142,11 @@ + max_timings[name] = timing + + timestamp = int(time.time()) +- for name, timing in cumulated_timings.items(): ++ for name, timing in list(cumulated_timings.items()): + print_probe("average", name, timing / options.count, timestamp) +- for name, timing in min_timings.items(): ++ for name, timing in list(min_timings.items()): + print_probe("min", name, timing, timestamp) +- for name, timing in max_timings.items(): ++ for name, timing in list(max_timings.items()): + print_probe("max", name, timing, timestamp) + + return 0 diff --git a/libdbusmenu-glib/0004_prevent-test-json-from-failing.patch b/libdbusmenu-glib/0004_prevent-test-json-from-failing.patch new file mode 100644 index 000000000..e44af0d35 --- /dev/null +++ b/libdbusmenu-glib/0004_prevent-test-json-from-failing.patch @@ -0,0 +1,14 @@ +Origin: https://bazaar.launchpad.net/~dbusmenu-team/libdbusmenu/trunk.16.10/revision/497/tests/Makefile.am#tests/Makefile.am + +=== modified file 'tests/Makefile.am' +--- a/tests/Makefile.am 2019-09-13 16:53:05 +0000 ++++ b/tests/Makefile.am 2022-09-28 21:56:18 +0000 +@@ -219,6 +219,7 @@ + @echo export G_MESSAGES_DEBUG=all >> $@ + @echo $(XVFB_RUN) >> $@ + @echo $(DBUS_RUNNER) --task ./test-json-client --wait-for org.dbusmenu.test --task-name Client --parameter $(top_builddir)/tools/dbusmenu-dumper --parameter test-json-01.output.json --task ./test-json-server --task-name Server --parameter $(srcdir)/test-json-01.json >> $@ ++ @echo sed -i \"/Using cross-namespace EXTERNAL authentication \(this will deadlock if server is GDBus \< 2.73.3\)/d\" test-json-01.output.json >> $@ + @echo diff $(srcdir)/test-json-01.json test-json-01.output.json \> /dev/null >> $@ + @chmod +x $@ + + diff --git a/libdbusmenu-glib/Pkgfile b/libdbusmenu-glib/Pkgfile index 50ab8f201..5e1f6c165 100644 --- a/libdbusmenu-glib/Pkgfile +++ b/libdbusmenu-glib/Pkgfile @@ -1,22 +1,27 @@ # Description: Library for passing menus over DBus - Glib part # URL: https://launchpad.net/libdbusmenu # Maintainer: Tim Biermann, tbier at posteo dot de -# Depends on: glib gnome-common gtk-doc intltool +# Depends on: gnome-common gtk-doc intltool # Optional: gobject-introspection vala name=libdbusmenu-glib version=18.10 -release=1 -source=(http://cdn-fastly.deb.debian.org/debian/pool/main/libd/libdbusmenu/libdbusmenu_18.10.20180917~bzr490+repack1.orig.tar.xz -0001_no-deprecated-gnome-common-macros.patch) +release=2 +source=(http://cdn-fastly.deb.debian.org/debian/pool/main/libd/libdbusmenu/libdbusmenu_18.10.20180917~bzr492+repack1.orig.tar.xz + 0001_no-deprecated-gnome-common-macros.patch + 0003_port-tools-dbusmenu-bench-to-py3.patch + 0004_prevent-test-json-from-failing.patch) build() { - cd libdbusmenu-18.10.20180917~bzr490 + cd libdbusmenu-18.10.20180917~bzr492 export HAVE_VALGRIND_TRUE='#' export HAVE_VALGRIND_FALSE='' patch -Np1 -i $SRC/0001_no-deprecated-gnome-common-macros.patch + patch -Np1 -i $SRC/0003_port-tools-dbusmenu-bench-to-py3.patch + patch -Np1 -i $SRC/0004_prevent-test-json-from-failing.patch + sed -e 's/-Werror -Wno-error=deprecated-declarations//g' -i libdbusmenu-{glib,gtk}/Makefile.am sed -e 's/gtkdocize || exit 1//g' -i autogen.sh sed -e 's/--enable-gtk-doc//g' -i autogen.sh @@ -33,5 +38,8 @@ build() { make DESTDIR=$PKG -C libdbusmenu-glib -j1 install find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + + # add file to footprint + mkdir -p $PKG/usr/share/glib-2.0/gettext } diff --git a/libdbusmenu-glib/pre-install b/libdbusmenu-glib/pre-install index 88d22da84..432089105 100755 --- a/libdbusmenu-glib/pre-install +++ b/libdbusmenu-glib/pre-install @@ -1,2 +1,6 @@ #!/bin/bash -mkdir -p /usr/share/glib-2.0/gettext + +# if this directory is not present it fails the build +if [ ! -d "/usr/share/glib-2.0/gettext" ]; then + mkdir -p "/usr/share/glib-2.0/gettext" +fi