commit:     b41c4195d9ca0b708de3527b4537fdcb0d892a83
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 17 05:09:23 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar 17 05:39:59 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b41c4195

dev-games/libmaitretarot: install (patched) m4 macro for consumers

We need to install the M4 macro so that we can actually regenerate
(eautoreconf).

Right now, some consumers don't have bundled macros at all,
and others lack the needed libdir fixes.

Let's install fixed ones here (and in libmt_client) so that consumers
can just rely on those.

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

 .../files/libmaitretarot-0.1.98-libdir.patch           | 18 ++++++++++++++++++
 ....1.98-r1.ebuild => libmaitretarot-0.1.98-r2.ebuild} | 10 ++++++++++
 2 files changed, 28 insertions(+)

diff --git a/dev-games/libmaitretarot/files/libmaitretarot-0.1.98-libdir.patch 
b/dev-games/libmaitretarot/files/libmaitretarot-0.1.98-libdir.patch
new file mode 100644
index 00000000000..635ba1e437f
--- /dev/null
+++ b/dev-games/libmaitretarot/files/libmaitretarot-0.1.98-libdir.patch
@@ -0,0 +1,18 @@
+https://bugs.gentoo.org/729734
+
+--- a/libmaitretarot.m4
++++ b/libmaitretarot.m4
+@@ -9,10 +9,10 @@ AC_DEFUN([AM_LIB_MAITRETAROT],
+   --with-libmaitretarot   path to libmaitretarot libraries,
+       [ 
+               LIBMT_CFLAGS="-I${withval}/include"
+-              LIBMT_LIBS="-L${withval}/lib -lmaitretarot"
++              LIBMT_LIBS="-L${withval}/${libdir} -lmaitretarot"
+        ],[ 
+-              LIBMT_CFLAGS="-I/usr/local/include -I/usr/include"
+-              LIBMT_LIBS="-L/usr/local/lib -L/usr/lib -lmaitretarot"
++              LIBMT_CFLAGS="-I/usr/include"
++              LIBMT_LIBS="-L${libdir} -lmaitretarot"
+        ])
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  ac_save_CFLAGS="$CFLAGS"

diff --git a/dev-games/libmaitretarot/libmaitretarot-0.1.98-r1.ebuild 
b/dev-games/libmaitretarot/libmaitretarot-0.1.98-r2.ebuild
similarity index 76%
rename from dev-games/libmaitretarot/libmaitretarot-0.1.98-r1.ebuild
rename to dev-games/libmaitretarot/libmaitretarot-0.1.98-r2.ebuild
index 9a302de3e15..2004dba6135 100644
--- a/dev-games/libmaitretarot/libmaitretarot-0.1.98-r1.ebuild
+++ b/dev-games/libmaitretarot/libmaitretarot-0.1.98-r2.ebuild
@@ -16,11 +16,21 @@ RDEPEND="dev-libs/glib:2
        dev-libs/libxml2"
 DEPEND="${RDEPEND}"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.1.98-libdir.patch
+)
+
 src_configure() {
        econf --disable-static
 }
 
 src_install() {
        default
+
+       # Needed for consumers like dev-games/libmt_client
+       # bug #729734
+       insinto /usr/share/aclocal
+       doins libmaitretarot.m4
+
        find "${ED}" -name '*.la' -delete || die
 }

Reply via email to