# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="A tool for manipulating PDF documents" HOMEPAGE="http://www.pdfhacks.com/pdftk" SRC_URI="http://www.pdfhacks.com/pdftk/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" DEPEND=">=sys-devel/gcc-4.3.1" S="${WORKDIR}/${P}/${PN}" pkg_setup() { if [ -z "$(type -P gcj 2>/dev/null)" ]; then eerror 'It seems that gcj is not in ${PATH}.' eerror "Re-emerge sys-devel/gcc with \"gcj\" enabled." die "gcj not found." fi } src_unpack() { unpack ${A} epatch "${FILESDIR}"/${PN}-gcc-4.3.patch # force usage of custom CFLAGS. sed -iorig 's:-O2:\$(CFLAGS):g' "${S}"/Makefile.Generic } src_compile() { # java-config settings break compilation by gcj. unset CLASSPATH unset JAVA_HOME make -f Makefile.Generic || die "Compilation failed." } src_install() { dobin pdftk newman ../pdftk.1.txt pdftk.1 dohtml ../pdftk.1.html }