sys-libs/libhx: fix bug 584724
authorAndrew Savchenko <bircoph@gentoo.org>
Thu, 2 Jun 2016 04:48:22 +0000 (07:48 +0300)
committerAndrew Savchenko <bircoph@gentoo.org>
Thu, 2 Jun 2016 04:51:08 +0000 (07:51 +0300)
1. Remove lyx autodetection and disable PDF documentation rebuild,
since source tarball already contains PDF docs and we don't need to
rebuild it.
2. Migrate to EAPI=6.
3. Add USE="doc".

Package-Manager: portage-2.3.0_rc1
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
sys-libs/libhx/files/libhx-3.22-no-lyx.patch [new file with mode: 0644]
sys-libs/libhx/libhx-3.22-r1.ebuild [new file with mode: 0644]

diff --git a/sys-libs/libhx/files/libhx-3.22-no-lyx.patch b/sys-libs/libhx/files/libhx-3.22-no-lyx.patch
new file mode 100644 (file)
index 0000000..1c63d25
--- /dev/null
@@ -0,0 +1,12 @@
+--- libHX-3.22/configure.ac.orig       2014-08-25 19:16:37.000000000 +0400
++++ libHX-3.22/configure.ac    2016-06-01 11:09:42.287438190 +0300
+@@ -107,8 +107,7 @@
+ AC_CHECK_FUNCS([getegid geteuid getpid getppid])
+ AM_CONDITIONAL([B_PROC], [test "$b_proc" = 1])
+-AC_CHECK_PROGS([LYX], [lyx])
+-AM_CONDITIONAL([BUILD_DOCS], [test -n "$LYX"])
++AM_CONDITIONAL([BUILD_DOCS], [false])
+ regular_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_REENTRANT"
+ regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \
diff --git a/sys-libs/libhx/libhx-3.22-r1.ebuild b/sys-libs/libhx/libhx-3.22-r1.ebuild
new file mode 100644 (file)
index 0000000..db64684
--- /dev/null
@@ -0,0 +1,41 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools eutils
+
+DESCRIPTION="Platform independent library providing basic system functions"
+HOMEPAGE="http://libhx.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/libHX-${PV}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc"
+
+DEPEND="app-arch/xz-utils"
+RDEPEND=""
+
+S="${WORKDIR}/libHX-${PV}"
+
+PATCHES=( "${FILESDIR}/${P}-no-lyx.patch" )
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_install() {
+       default
+
+       if use doc; then
+               dodoc doc/*.txt
+       else
+               dodoc doc/changelog.txt
+               rm "${D}/usr/share/doc/${PF}/"*.pdf || die
+       fi
+
+       prune_libtool_files --all
+}