commit:     bce4e9e5b4aa14217370b2344157ab3cdc735f74
Author:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 23 13:49:59 2017 +0000
Commit:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Sun Jul 23 13:52:36 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bce4e9e5

x11-libs/libgxim: add test USE flag

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 x11-libs/libgxim/libgxim-0.5.0.ebuild | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/x11-libs/libgxim/libgxim-0.5.0.ebuild 
b/x11-libs/libgxim/libgxim-0.5.0.ebuild
index 26a9156725b..a9bd005eae5 100644
--- a/x11-libs/libgxim/libgxim-0.5.0.ebuild
+++ b/x11-libs/libgxim/libgxim-0.5.0.ebuild
@@ -3,7 +3,7 @@
 
 EAPI="6"
 
-inherit ltprune
+inherit autotools ltprune
 
 DESCRIPTION="GObject-based XIM protocol library"
 HOMEPAGE="https://tagoh.bitbucket.io/libgxim";
@@ -12,7 +12,7 @@ 
SRC_URI="https://bitbucket.org/tagoh/${PN}/downloads/${P}.tar.bz2";
 LICENSE="LGPL-2.1"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="static-libs"
+IUSE="static-libs test"
 
 RDEPEND="dev-libs/dbus-glib
        dev-libs/glib:2
@@ -20,11 +20,27 @@ RDEPEND="dev-libs/dbus-glib
        virtual/libintl
        x11-libs/gtk+:2"
 DEPEND="${RDEPEND}
-       dev-libs/check
        dev-lang/ruby
        dev-util/intltool
+       sys-devel/autoconf-archive
        sys-devel/gettext
-       virtual/pkgconfig"
+       virtual/pkgconfig
+       test? ( dev-libs/check )"
+
+AT_M4DIR="m4macros"
+
+src_prepare() {
+       sed -i \
+               -e "/PKG_CHECK_MODULES/s/\(check\)/$(usex test '\1' _)/" \
+               -e "/^GNOME_/d" \
+               -e "/^CFLAGS/s/\$WARN_CFLAGS/-Wall -Wmissing-prototypes/" \
+               configure.ac
+
+       sed -i "/^ACLOCAL_AMFLAGS/,/^$/d" Makefile.am
+
+       default
+       eautoreconf
+}
 
 src_configure() {
        econf $(use_enable static-libs static)

Reply via email to