2014-10-27 11:56:00 +03:00
|
|
|
# Copyright 1999-2014 Gentoo Foundation
|
2012-02-06 16:39:49 +04:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2015-08-11 00:17:55 +03:00
|
|
|
# $Id$
|
2012-02-06 16:39:49 +04:00
|
|
|
|
2014-10-27 11:56:00 +03:00
|
|
|
EAPI=5
|
2012-02-06 16:39:49 +04:00
|
|
|
WANT_AUTOMAKE=none
|
|
|
|
|
|
|
|
inherit autotools eutils
|
|
|
|
|
|
|
|
DESCRIPTION="Converter for Microsoft Word, Excel, PowerPoint and RTF files to text"
|
|
|
|
HOMEPAGE="http://www.wagner.pp.ru/~vitus/software/catdoc/"
|
2014-10-27 11:56:00 +03:00
|
|
|
SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${P/-/_}.orig.tar.gz"
|
2012-02-06 16:39:49 +04:00
|
|
|
|
2014-10-27 11:56:00 +03:00
|
|
|
LICENSE="GPL-2"
|
2012-02-06 16:39:49 +04:00
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~ppc-macos ~x86-macos ~x64-solaris ~x86-solaris"
|
2014-10-27 11:56:00 +03:00
|
|
|
IUSE="tk"
|
2012-02-06 16:39:49 +04:00
|
|
|
|
|
|
|
DEPEND="tk? ( >=dev-lang/tk-8.1 )"
|
|
|
|
|
|
|
|
DOCS="CODING.STD CREDITS NEWS README TODO"
|
|
|
|
|
|
|
|
src_prepare() {
|
2014-10-27 11:56:00 +03:00
|
|
|
epatch "${FILESDIR}"/${PN}-0.94.2-flags.patch
|
|
|
|
epatch "${FILESDIR}"/${PN}-0.94.2+autoconf-2.63.patch
|
|
|
|
epatch "${FILESDIR}"/${P}-destdir.patch
|
|
|
|
epatch "${FILESDIR}"/${P}-desktop.patch
|
|
|
|
|
|
|
|
# only install wordview.desktop when tk is enabled (bug #522766)
|
|
|
|
if ! use tk ; then
|
|
|
|
sed -i 's/ desktop//' Makefile.in || die
|
|
|
|
fi
|
2012-02-06 16:39:49 +04:00
|
|
|
|
|
|
|
# Fix for case-insensitive filesystems
|
|
|
|
echo ".PHONY: all install clean distclean dist" >> Makefile.in
|
|
|
|
|
|
|
|
eautoconf
|
|
|
|
}
|
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
econf --with-install-root="${D}" \
|
|
|
|
$(use_with tk wish "${EPREFIX}"/usr/bin/wish) \
|
|
|
|
$(use_enable tk wordview)
|
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
2014-10-27 11:56:00 +03:00
|
|
|
emake LIB_DIR="${EPREFIX}"/usr/share/catdoc
|
2012-02-06 16:39:49 +04:00
|
|
|
}
|
|
|
|
|
2014-10-01 17:14:40 +04:00
|
|
|
src_install() {
|
2014-10-27 11:56:00 +03:00
|
|
|
emake -j1 mandir="${EPREFIX}"/usr/share/man/man1 install
|
2012-02-06 16:39:49 +04:00
|
|
|
|
2014-10-01 17:14:40 +04:00
|
|
|
if [[ -e ${ED}/usr/bin/xls2csv ]]; then
|
|
|
|
einfo "Renaming xls2csv to xls2csv-${PN} because of bug 314657."
|
|
|
|
mv -vf "${ED}"/usr/bin/xls2csv "${ED}"/usr/bin/xls2csv-${PN} || die
|
|
|
|
fi
|
2012-02-06 16:39:49 +04:00
|
|
|
|
2014-10-01 17:14:40 +04:00
|
|
|
dodoc ${DOCS}
|
|
|
|
}
|