aboutsummaryrefslogtreecommitdiffstats
path: root/main/dbus
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-09-29 12:01:54 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2015-09-29 12:03:07 +0200
commit8bf97dd2c4723f2b432055031fc7510d10a51b8d (patch)
tree7032dfffe424f744b3fd679c39dd298862b33f6f /main/dbus
parent208576adc46c327cacbeca57f32aeb6698b1df7d (diff)
downloadaports-8bf97dd2c4723f2b432055031fc7510d10a51b8d.tar.bz2
aports-8bf97dd2c4723f2b432055031fc7510d10a51b8d.tar.xz
main/dbus: fix the int64 print patch
the patch was not complete.
Diffstat (limited to 'main/dbus')
-rw-r--r--main/dbus/APKBUILD8
-rw-r--r--main/dbus/fix-int64-print.patch147
2 files changed, 151 insertions, 4 deletions
diff --git a/main/dbus/APKBUILD b/main/dbus/APKBUILD
index 9b7adf171a..90add8d982 100644
--- a/main/dbus/APKBUILD
+++ b/main/dbus/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dbus
pkgver=1.10.0
-pkgrel=0
+pkgrel=1
pkgdesc="Freedesktop.org message bus system"
url="http://www.freedesktop.org/Software/dbus"
pkggroups="messagebus"
@@ -61,11 +61,11 @@ x11() {
}
md5sums="5af6297348107a906c8449817a728b3b dbus-1.10.0.tar.gz
-2b6e9fa870408350ba0a35570540942b fix-int64-print.patch
+3e542be1998d3d0d9186ab4decdc035a fix-int64-print.patch
fc7a1faf3ce3cc311ddb4e6494a18cd1 dbus.initd"
sha256sums="1dfb9745fb992f1ccd43c920490de8caddf6726a6222e8b803be6098293f924b dbus-1.10.0.tar.gz
-b1ebb04883d37338d1d3aa5febdc1d05b41cbbbb013fead7ad8148c1beb1d263 fix-int64-print.patch
+ef3af1ee272b1e350ca35ca41d55adefc77a54249097156aaac51cba3ee4cb0b fix-int64-print.patch
30084902702e1de4ba7447e63c6b392f56bfbb87f846e5e9659c4e80e93121fe dbus.initd"
sha512sums="bc622cc322df031d18946dc3f340fe918f995caf4356078ecf41106d0e1ec62a3520f97c682937e529a8787608d754a699da7c051cc51d052a04fd63115a2f05 dbus-1.10.0.tar.gz
-e3cde4e0dff0e808dc96720ad548616e2441c65bd07a90f730a333eaa4aa034b7dbb1bad1ee4fba33a85874a3679c44f8a29a04d1cb9921d2f8715bbdb7a37ad fix-int64-print.patch
+5f07d8cb377ab80c927a77236c3f3437f08351161e594c62a1ad43f0324c2dba3cc98d50257ae27b9a4f5148571c5f26f35db8b40f13c72e92f267d5356c87f0 fix-int64-print.patch
df74e7d6a4f76f777d356e94bd23422b17656aa51a5b2d3c655fcabb32c84f2f06b9f5cd8827920d51842f89e8c0d968a6e723315e4bf216e55711fcda9b0ee9 dbus.initd"
diff --git a/main/dbus/fix-int64-print.patch b/main/dbus/fix-int64-print.patch
index 713739df99..2efaa8a006 100644
--- a/main/dbus/fix-int64-print.patch
+++ b/main/dbus/fix-int64-print.patch
@@ -1,3 +1,101 @@
+From 855409c57d160e03ccd9e6a663884362a777b076 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Fri, 18 Sep 2015 15:27:50 +0200
+Subject: [PATCH] Use C99 standard PRI*64 for printing 64 bit integers
+
+Use the standard C99 PRI*64 macros instead of checking for specific GNU
+libc version. We also specifically check for windows which does not have
+proper C99 support.
+
+This fixes printing of int64 on non-GNU 32 bit systems (like musl libc).
+
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92043
+---
+ configure.ac | 39 --------------------------------------
+ dbus/dbus-marshal-basic.c | 8 +++++---
+ dbus/dbus-marshal-recursive-util.c | 8 +++++---
+ tools/dbus-print-message.c | 21 ++++++++++----------
+ 4 files changed, 21 insertions(+), 55 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 529e960..4c1fe5b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -337,31 +337,6 @@ if test x$enable_compiler_coverage = xyes; then
+ AC_DEFINE_UNQUOTED(DBUS_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
+ fi
+
+-# glibc21.m4 serial 3
+-dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
+-dnl This file is free software; the Free Software Foundation
+-dnl gives unlimited permission to copy and/or distribute it,
+-dnl with or without modifications, as long as this notice is preserved.
+-
+-# Test for the GNU C Library, version 2.1 or newer.
+-# From Bruno Haible.
+-
+-AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+- ac_cv_gnu_library_2_1,
+- [AC_EGREP_CPP([Lucky GNU user],
+- [
+-#include <features.h>
+-#ifdef __GNU_LIBRARY__
+- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+- Lucky GNU user
+- #endif
+-#endif
+- ],
+- ac_cv_gnu_library_2_1=yes,
+- ac_cv_gnu_library_2_1=no)
+- ]
+-)
+-
+ #### Integer sizes
+
+ AC_CHECK_SIZEOF(char)
+@@ -380,32 +355,21 @@ $ac_cv_sizeof_int)
+ dbusint64=int
+ dbusint64_constant='(val)'
+ dbusuint64_constant='(val)'
+- dbusint64_printf_modifier='""'
+ ;;
+ $ac_cv_sizeof_long)
+ dbusint64=long
+ dbusint64_constant='(val##L)'
+ dbusuint64_constant='(val##UL)'
+- dbusint64_printf_modifier='"l"'
+ ;;
+ $ac_cv_sizeof_long_long)
+ dbusint64='long long'
+ dbusint64_constant='(val##LL)'
+ dbusuint64_constant='(val##ULL)'
+- # Ideally we discover what the format is, but this is
+- # only used in verbose mode, so eh...
+- if test x"$ac_cv_gnu_library_2_1" = xyes; then
+- dbusint64_printf_modifier='"ll"'
+- fi
+ ;;
+ $ac_cv_sizeof___int64)
+ dbusint64=__int64
+ dbusint64_constant='(val##i64)'
+ dbusuint64_constant='(val##ui64)'
+- # See above case
+- if test x"$ac_cv_gnu_library_2_1" = xyes; then
+- dbusint64_printf_modifier='"ll"'
+- fi
+ ;;
+ esac
+
+@@ -423,9 +387,6 @@ Please report a bug here with details of your platform and compiler:
+ DBUS_INT64_TYPE="$dbusint64"
+ DBUS_INT64_CONSTANT="$dbusint64_constant"
+ DBUS_UINT64_CONSTANT="$dbusuint64_constant"
+- if test x"$dbusint64_printf_modifier" != x; then
+- AC_DEFINE_UNQUOTED(DBUS_INT64_PRINTF_MODIFIER, [$dbusint64_printf_modifier], [Define to printf modifier for 64 bit integer type])
+- fi
+ AC_MSG_RESULT($DBUS_INT64_TYPE)
+ ])
+
diff --git a/dbus/dbus-marshal-basic.c b/dbus/dbus-marshal-basic.c
index 74fe3f9..9315b6e 100644
--- a/dbus/dbus-marshal-basic.c
@@ -54,3 +152,52 @@ index 3bc26a8..4d57f49 100644
_dbus_assert_not_reached ("test failed");
}
+diff --git a/tools/dbus-print-message.c b/tools/dbus-print-message.c
+index 80c9698..04b817e 100644
+--- a/tools/dbus-print-message.c
++++ b/tools/dbus-print-message.c
+@@ -39,6 +39,15 @@
+
+ #include "tool-common.h"
+
++#if defined(DBUS_WIN)
++#if !defined(PRId64)
++#define PRId64 "%I64d"
++#endif
++#if !defined(PRIu64)
++#define PRIu64 "%I64u"
++#endif
++#endif
++
+ static const char*
+ type_to_name (int message_type)
+ {
+@@ -384,11 +393,7 @@ print_iter (DBusMessageIter *iter, dbus_bool_t literal, int depth)
+ {
+ dbus_int64_t val;
+ dbus_message_iter_get_basic (iter, &val);
+-#ifdef DBUS_INT64_PRINTF_MODIFIER
+- printf ("int64 %" DBUS_INT64_PRINTF_MODIFIER "d\n", val);
+-#else
+- printf ("int64 (omitted)\n");
+-#endif
++ printf ("int64 %" PRId64 "\n", val);
+ break;
+ }
+
+@@ -396,11 +401,7 @@ print_iter (DBusMessageIter *iter, dbus_bool_t literal, int depth)
+ {
+ dbus_uint64_t val;
+ dbus_message_iter_get_basic (iter, &val);
+-#ifdef DBUS_INT64_PRINTF_MODIFIER
+- printf ("uint64 %" DBUS_INT64_PRINTF_MODIFIER "u\n", val);
+-#else
+- printf ("uint64 (omitted)\n");
+-#endif
++ printf ("uint64 %" PRIu64 "\n", val);
+ break;
+ }
+
+--
+2.5.3
+