libdbusmenu-glib-32: updated source, added patches
This commit is contained in:
parent
25e5c29d93
commit
aca4b3699d
@ -1,6 +1,8 @@
|
||||
untrusted comment: verify with /etc/ports/compat-32.pub
|
||||
RWSwxGo/zH7eXSCmMoNtEiyFBSsNSf+5Y2Hfieqy+0wAJnCR7mcl1T5sQVfXg2Q+M1VLy2+9KkCrucRiDRUyLz04lItLWp53swM=
|
||||
SHA256 (Pkgfile) = 4fb8e2a135cc8b2a153605d12dafb30c9381279f7f127c434150b6bf4a723118
|
||||
RWSwxGo/zH7eXdHk3DRU2Kqnk1ZmOG+NEsU8Qt9z17eTdrQGJlF0r9yWihQtBLUdlnVXhFxizu8yuHsBXzHZiltq1xLEUPpnbA0=
|
||||
SHA256 (Pkgfile) = 064418d493f66083a6b77c005f70f801992d400cbc69a5dd5255236e159528e7
|
||||
SHA256 (.footprint) = 163ce6f24154c47e4477265fb08766e9ec8806f8bbd3dabea92f7e6393a3edeb
|
||||
SHA256 (libdbusmenu_18.10.20180917~bzr490+repack1.orig.tar.xz) = f670bc86ea5ae1488b2405f371ceb870ce353127578f9b0aed2862cbbc42053b
|
||||
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
|
||||
|
@ -0,0 +1,92 @@
|
||||
Description: Port tools/dbusmenu-bench from Py2 to Py3.
|
||||
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
||||
|
||||
--- 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
|
@ -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 $@
|
||||
|
||||
|
@ -5,22 +5,26 @@
|
||||
|
||||
name=libdbusmenu-glib-32
|
||||
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() {
|
||||
# export CC='gcc -m32'
|
||||
# export CXX='g++ -m32'
|
||||
# export PKG_CONFIG_PATH='/usr/lib32/pkgconfig:/usr/lib/pkgconfig'
|
||||
export HAVE_VALGRIND_TRUE='#'
|
||||
export HAVE_VALGRIND_FALSE=''
|
||||
|
||||
cd libdbusmenu-18.10.20180917~bzr490
|
||||
cd libdbusmenu-18.10.20180917~bzr492
|
||||
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
|
||||
|
||||
./autogen.sh --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--libdir=/usr/lib32 \
|
||||
@ -30,8 +34,8 @@ build() {
|
||||
make -j1
|
||||
make DESTDIR=$PKG -C libdbusmenu-glib -j1 install
|
||||
|
||||
# mv $PKG/usr/lib/girepository-1.0 $PKG/usr/lib32
|
||||
rm -fr $PKG/usr/{lib,include,share}
|
||||
|
||||
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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user