* [gentoo-commits] repo/gentoo:master commit in: dev-libs/dbus-c++/, dev-libs/dbus-c++/files/
@ 2022-06-10 11:02 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-06-10 11:02 UTC (permalink / raw
To: gentoo-commits
commit: 346dc81bceb275d2d95ba47e86ce5b7db49486e0
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 10 10:39:15 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 10 11:01:57 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=346dc81b
dev-libs/dbus-c++: fix installed headers w/ gcc 12, fix build with clang
Bug: https://bugs.gentoo.org/840731
Closes: https://bugs.gentoo.org/737120
Closes: https://bugs.gentoo.org/740068
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/dbus-c++/dbus-c++-0.9.0-r5.ebuild | 64 ++++++++++++++++
dev-libs/dbus-c++/files/dbus-c++-0.9.0-gcc12.patch | 89 ++++++++++++++++++++++
2 files changed, 153 insertions(+)
diff --git a/dev-libs/dbus-c++/dbus-c++-0.9.0-r5.ebuild b/dev-libs/dbus-c++/dbus-c++-0.9.0-r5.ebuild
new file mode 100644
index 000000000000..bd749ca5481f
--- /dev/null
+++ b/dev-libs/dbus-c++/dbus-c++-0.9.0-r5.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib-minimal
+
+DESCRIPTION="Provides a C++ API for D-BUS"
+HOMEPAGE="https://sourceforge.net/projects/dbus-cplusplus/"
+SRC_URI="mirror://sourceforge/dbus-cplusplus/lib${P}.tar.gz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="doc ecore glib test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/expat
+ sys-apps/dbus[${MULTILIB_USEDEP}]
+ ecore? ( dev-libs/efl )
+ glib? ( dev-libs/glib:2[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ dev-util/cppunit[${MULTILIB_USEDEP}]"
+BDEPEND="
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+S="${WORKDIR}/lib${P}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc-4.7.patch #424707
+ "${FILESDIR}"/${PN}-gcc7.patch #622790
+ "${FILESDIR}"/${P}-gcc12.patch
+)
+
+multilib_src_configure() {
+ # TODO : add ecore multilib support if/when it is multilibified
+ ECONF_SOURCE="${S}" econf \
+ --disable-examples \
+ --disable-static \
+ $(multilib_native_use_enable doc doxygen-docs) \
+ $(multilib_native_use_enable ecore) \
+ $(use_enable glib) \
+ $(use_enable test tests) \
+ PTHREAD_LIBS=-lpthread
+ # ACX_PTHREAD sets PTHREAD_CFLAGS but not PTHREAD_LIBS for some reason...
+
+ if multilib_is_native_abi; then
+ # docs don't like out-of-source builds
+ local d
+ for d in img html; do
+ ln -s "${S}"/doc/${d} "${BUILD_DIR}"/doc/${d} || die
+ done
+ fi
+}
+
+multilib_src_install_all() {
+ use doc && HTML_DOCS=( doc/html/. )
+ einstalldocs
+
+ # no static archives
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/dev-libs/dbus-c++/files/dbus-c++-0.9.0-gcc12.patch b/dev-libs/dbus-c++/files/dbus-c++-0.9.0-gcc12.patch
new file mode 100644
index 000000000000..9c2b52453df9
--- /dev/null
+++ b/dev-libs/dbus-c++/files/dbus-c++-0.9.0-gcc12.patch
@@ -0,0 +1,89 @@
+https://src.fedoraproject.org/rpms/dbus-c++/blob/rawhide/f/dbus-c++-template-operators.patch
+https://bugs.gentoo.org/737120
+https://bugs.gentoo.org/740068
+
+commit a0b9ef3b469ca23c6a3229d8abb967cbbddcee38
+Author: Peter Williams <peter@newton.cx>
+Date: Sat Dec 19 21:12:46 2015 -0500
+
+ Fix some weird template/operator issues on OS X.
+
+ I frankly don't understand at all what's going on here. These fixes
+ derive from:
+
+ https://chromium.googlesource.com/chromiumos/third_party/dbus-cplusplus/+/c3f69f6be02e31521474dce7eadf6ba4f4a7ce94
+ https://chromium.googlesource.com/chromiumos/third_party/dbus-cplusplus/+/7104857773f790a549d399715482fa23d9b736cd
+
+ Except I've dropped some changes that break the OS X build for me. Frankly, if
+ it compiles, that's good enough for me.
+
+--- a/include/dbus-c++/types.h
++++ b/include/dbus-c++/types.h
+@@ -89,13 +89,7 @@ public:
+ }
+
+ template <typename T>
+- operator T() const
+- {
+- T cast;
+- MessageIter ri = _msg.reader();
+- ri >> cast;
+- return cast;
+- }
++ operator T() const;
+
+ private:
+
+@@ -316,7 +310,7 @@ struct type< Struct<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
+ }
+ };
+
+-} /* namespace DBus */
++extern DXXAPI DBus::MessageIter &operator << (DBus::MessageIter &iter, const DBus::Variant &val);
+
+ inline DBus::MessageIter &operator << (DBus::MessageIter &iter, const DBus::Invalid &)
+ {
+@@ -551,6 +545,8 @@ inline DBus::MessageIter &operator >> (DBus::MessageIter &iter, DBus::Signature
+ return ++iter;
+ }
+
++extern DXXAPI DBus::MessageIter &operator >> (DBus::MessageIter &iter, DBus::Variant &val);
++
+ template<typename E>
+ inline DBus::MessageIter &operator >> (DBus::MessageIter &iter, std::vector<E>& val)
+ {
+@@ -644,7 +640,16 @@ inline DBus::MessageIter &operator >> (DBus::MessageIter &iter, DBus::Struct<T1,
+ return ++iter;
+ }
+
+-extern DXXAPI DBus::MessageIter &operator >> (DBus::MessageIter &iter, DBus::Variant &val);
++template <typename T>
++inline DBus::Variant::operator T() const
++{
++ T cast;
++ DBus::MessageIter ri = _msg.reader();
++ ri >> cast;
++ return cast;
++}
++
++} /* namespace DBus */
+
+ #endif//__DBUSXX_TYPES_H
+
+--- a/src/types.cpp
++++ b/src/types.cpp
+@@ -34,7 +34,7 @@
+ #include "message_p.h"
+ #include "internalerror.h"
+
+-using namespace DBus;
++namespace DBus {
+
+ Variant::Variant()
+ : _msg(CallMessage()) // dummy message used as temporary storage for variant data
+@@ -104,3 +104,4 @@ MessageIter &operator >> (MessageIter &iter, Variant &val)
+ return ++iter;
+ }
+
++} /* namespace DBus */
+
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/dbus-c++/, dev-libs/dbus-c++/files/
@ 2022-10-30 9:35 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-10-30 9:35 UTC (permalink / raw
To: gentoo-commits
commit: e62ae148d712c4ce23398991048959d054b589bc
Author: Matoro Mahri <matoro <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Fri Oct 7 20:10:49 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Oct 30 09:33:27 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e62ae148
dev-libs/dbus-c++: add tests
Current tests are a no-op due to not including them in TESTS for
whatever unknown reason. Same on Debian. Tests pass on alpha but need
virtx.
Bug: https://bugs.gentoo.org/873487
Signed-off-by: Matoro Mahri <matoro <AT> users.noreply.github.com>
Closes: https://github.com/gentoo/gentoo/pull/27679
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/dbus-c++/dbus-c++-0.9.0-r5.ebuild | 15 +++++++++++++--
.../files/dbus-c++-0.9.0-enable-tests.patch | 22 ++++++++++++++++++++++
2 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/dev-libs/dbus-c++/dbus-c++-0.9.0-r5.ebuild b/dev-libs/dbus-c++/dbus-c++-0.9.0-r5.ebuild
index bd749ca5481f..a2a4913da27c 100644
--- a/dev-libs/dbus-c++/dbus-c++-0.9.0-r5.ebuild
+++ b/dev-libs/dbus-c++/dbus-c++-0.9.0-r5.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit multilib-minimal
+inherit multilib-minimal autotools virtualx
DESCRIPTION="Provides a C++ API for D-BUS"
HOMEPAGE="https://sourceforge.net/projects/dbus-cplusplus/"
@@ -24,7 +24,8 @@ DEPEND="${RDEPEND}
dev-util/cppunit[${MULTILIB_USEDEP}]"
BDEPEND="
virtual/pkgconfig
- doc? ( app-doc/doxygen )"
+ doc? ( app-doc/doxygen )
+ test? ( sys-apps/dbus[X,${MULTILIB_USEDEP}] )"
S="${WORKDIR}/lib${P}"
@@ -32,8 +33,14 @@ PATCHES=(
"${FILESDIR}"/${P}-gcc-4.7.patch #424707
"${FILESDIR}"/${PN}-gcc7.patch #622790
"${FILESDIR}"/${P}-gcc12.patch
+ "${FILESDIR}"/${PN}-0.9.0-enable-tests.patch #873487
)
+src_prepare() {
+ default
+ eautoreconf
+}
+
multilib_src_configure() {
# TODO : add ecore multilib support if/when it is multilibified
ECONF_SOURCE="${S}" econf \
@@ -55,6 +62,10 @@ multilib_src_configure() {
fi
}
+src_test() {
+ virtx multilib-minimal_src_test
+}
+
multilib_src_install_all() {
use doc && HTML_DOCS=( doc/html/. )
einstalldocs
diff --git a/dev-libs/dbus-c++/files/dbus-c++-0.9.0-enable-tests.patch b/dev-libs/dbus-c++/files/dbus-c++-0.9.0-enable-tests.patch
new file mode 100644
index 000000000000..827332c9f679
--- /dev/null
+++ b/dev-libs/dbus-c++/files/dbus-c++-0.9.0-enable-tests.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/873487
+https://github.com/gentoo/gentoo/pull/27679
+
+diff --git a/test/functional/Test1/Makefile.am b/test/functional/Test1/Makefile.am
+index 3269751..50dd2a9 100644
+--- a/test/functional/Test1/Makefile.am
++++ b/test/functional/Test1/Makefile.am
+@@ -40,3 +40,4 @@ AM_CPPFLAGS =
+
+ ## File created by the gnome-build tools
+
++TESTS = $(noinst_PROGRAMS)
+diff --git a/test/generator/Makefile.am b/test/generator/Makefile.am
+index 6c2403d..c6781aa 100644
+--- a/test/generator/Makefile.am
++++ b/test/generator/Makefile.am
+@@ -38,3 +38,5 @@ dist-hook:
+
+ MAINTAINERCLEANFILES = \
+ Makefile.in
++
++TESTS = $(noinst_PROGRAMS)
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-30 9:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-10 11:02 [gentoo-commits] repo/gentoo:master commit in: dev-libs/dbus-c++/, dev-libs/dbus-c++/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2022-10-30 9:35 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox