Gentoo Archives: gentoo-commits

From: Ian Whyman <thev00d00@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libupnp/files/, net-libs/libupnp/
Date: Wed, 29 Jan 2020 17:48:01
Message-Id: 1580319933.dc3f7541667cf0ab1cd1b2f445042d4268f4d08d.thev00d00@gentoo
1 commit: dc3f7541667cf0ab1cd1b2f445042d4268f4d08d
2 Author: Ian Whyman <thev00d00 <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 29 17:45:01 2020 +0000
4 Commit: Ian Whyman <thev00d00 <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 29 17:45:33 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc3f7541
7
8 net-libs/libupnp: 1.12.0: Fix C++ compat
9
10 Package-Manager: Portage-2.3.85, Repoman-2.3.20
11 Signed-off-by: Ian Whyman <thev00d00 <AT> gentoo.org>
12
13 .../libupnp/files/libupnp-1.12.0-cxx-compat.patch | 33 ++++++++++++++++++++++
14 ...upnp-1.12.0.ebuild => libupnp-1.12.0-r1.ebuild} | 1 +
15 2 files changed, 34 insertions(+)
16
17 diff --git a/net-libs/libupnp/files/libupnp-1.12.0-cxx-compat.patch b/net-libs/libupnp/files/libupnp-1.12.0-cxx-compat.patch
18 new file mode 100644
19 index 00000000000..cbb844952be
20 --- /dev/null
21 +++ b/net-libs/libupnp/files/libupnp-1.12.0-cxx-compat.patch
22 @@ -0,0 +1,33 @@
23 +From 5a8e93f1a57cce5cead5c8c566a75f7c7c294c97 Mon Sep 17 00:00:00 2001
24 +From: Ian Whyman <v00d00@××××××.net>
25 +Date: Mon, 27 Jan 2020 21:46:47 +0000
26 +Subject: [PATCH] List: Add extern C for C++ users
27 +
28 +---
29 + upnp/inc/list.h | 8 ++++++++
30 + 1 file changed, 8 insertions(+)
31 +
32 +diff --git a/upnp/inc/list.h b/upnp/inc/list.h
33 +index 214a53e5..0fbe7efc 100644
34 +--- a/upnp/inc/list.h
35 ++++ b/upnp/inc/list.h
36 +@@ -40,6 +40,10 @@
37 +
38 + #include "UpnpGlobal.h"
39 +
40 ++#ifdef __cplusplus
41 ++extern "C" {
42 ++#endif /* __cplusplus */
43 ++
44 + /** List anchor structure. This should be the *first* entry in list
45 + * member objects, except if you want to do member offset arithmetic
46 + * instead of simple casts (look up "containerof"). The list code itself
47 +@@ -71,4 +75,8 @@ EXPORT_SPEC UpnpListIter UpnpListInsert(UpnpListHead *list, UpnpListIter pos,
48 + /** Erase element at pos, return next one, or end()*/
49 + EXPORT_SPEC UpnpListIter UpnpListErase(UpnpListHead *list, UpnpListIter pos);
50 +
51 ++#ifdef __cplusplus
52 ++}
53 ++#endif /* __cplusplus */
54 ++
55 + #endif /* _UPNPLISTH_ */
56
57 diff --git a/net-libs/libupnp/libupnp-1.12.0.ebuild b/net-libs/libupnp/libupnp-1.12.0-r1.ebuild
58 similarity index 96%
59 rename from net-libs/libupnp/libupnp-1.12.0.ebuild
60 rename to net-libs/libupnp/libupnp-1.12.0-r1.ebuild
61 index 14fc805526f..70a82fc72df 100644
62 --- a/net-libs/libupnp/libupnp-1.12.0.ebuild
63 +++ b/net-libs/libupnp/libupnp-1.12.0-r1.ebuild
64 @@ -18,6 +18,7 @@ DOCS="ChangeLog"
65
66 PATCHES=(
67 "${FILESDIR}"/${PN}-1.6.21-cflags.patch
68 + "${FILESDIR}"/${P}-cxx-compat.patch
69 )
70
71 src_prepare() {