commit:     7bd84e098a747208514b888ac6963693edd38d0b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  3 05:27:48 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr  3 05:28:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7bd84e09

app-misc/tmate: add msgpack subslot dep, fix build w/ msgpack-6

While at it, cleanup obsolete --disable-static (EAPI 8 does it for us).

Closes: https://bugs.gentoo.org/903657
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-misc/tmate/files/tmate-2.4.0-msgpack-6.patch   | 30 ++++++++++++++++++++++
 ...tmate-2.4.0-r1.ebuild => tmate-2.4.0-r2.ebuild} | 16 +++++++-----
 2 files changed, 39 insertions(+), 7 deletions(-)

diff --git a/app-misc/tmate/files/tmate-2.4.0-msgpack-6.patch 
b/app-misc/tmate/files/tmate-2.4.0-msgpack-6.patch
new file mode 100644
index 000000000000..85252867a692
--- /dev/null
+++ b/app-misc/tmate/files/tmate-2.4.0-msgpack-6.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/903657
+https://github.com/tmate-io/tmate/pull/281
+
+From a5c6e80d3c54cd7faed52de5283b4f96bea86c13 Mon Sep 17 00:00:00 2001
+From: Carlo Cabrera <[email protected]>
+Date: Sun, 5 Mar 2023 20:58:13 +0800
+Subject: [PATCH] Fix finding msgpack 6+
+
+`msgpack.pc` was renamed to `msgpack-c.pc` upstream in msgpack/msgpack-c#1053.
+--- a/configure.ac
++++ b/configure.ac
+@@ -209,6 +209,17 @@ PKG_CHECK_MODULES(
+   ],
+   found_msgpack=no
+ )
++# msgpack.pc was renamed to msgpack-c.pc in 6.0.0.
++PKG_CHECK_MODULES(
++  MSGPACKC,
++  msgpack-c >= 1.1.0,
++  [
++    CPPFLAGS="$MSGPACKC_CFLAGS $CPPFLAGS"
++    LIBS="$MSGPACKC_LIBS $LIBS"
++    found_msgpack=yes
++  ],
++  found_msgpack=no
++)
+ if test "x$found_msgpack" = xno; then
+   AC_MSG_ERROR("msgpack >= 1.1.0 not found")
+ fi
+

diff --git a/app-misc/tmate/tmate-2.4.0-r1.ebuild 
b/app-misc/tmate/tmate-2.4.0-r2.ebuild
similarity index 86%
rename from app-misc/tmate/tmate-2.4.0-r1.ebuild
rename to app-misc/tmate/tmate-2.4.0-r2.ebuild
index 920c528ee69e..a59788a5ce64 100644
--- a/app-misc/tmate/tmate-2.4.0-r1.ebuild
+++ b/app-misc/tmate/tmate-2.4.0-r2.ebuild
@@ -7,25 +7,28 @@ inherit autotools
 
 DESCRIPTION="Instant terminal sharing"
 HOMEPAGE="https://tmate.io/";
+SRC_URI="https://github.com/tmate-io/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
 
 LICENSE="ISC"
 SLOT="0"
 KEYWORDS="amd64 ~riscv ~x86"
 IUSE="debug"
 
-SRC_URI="https://github.com/tmate-io/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
 RDEPEND="
-       sys-libs/zlib
-       sys-libs/libutempter
        dev-libs/libevent
-       dev-libs/msgpack
+       dev-libs/msgpack:=
+       dev-libs/openssl:=
        >=net-libs/libssh-0.6.0
-       dev-libs/openssl:0=
+       sys-libs/zlib
+       sys-libs/libutempter
 "
 DEPEND="${RDEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.4.0-msgpack-6.patch
+)
+
 src_prepare() {
        default
        eautoreconf
@@ -34,7 +37,6 @@ src_prepare() {
 src_configure() {
        local myeconfargs=(
                $(use_enable debug)
-               --disable-static
        )
        econf "${myeconfargs[@]}"
 }

Reply via email to