--- /usr/portage/app-arch/p7zip/p7zip-4.58.ebuild 2008-11-12 23:05:22.000000000 +0100 +++ p7zip-4.61.ebuild 2008-12-04 11:33:01.000000000 +0100 @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/p7zip/p7zip-4.58.ebuild,v 1.6 2008/11/12 21:45:44 ranger Exp $ +# $Header: $ inherit eutils toolchain-funcs multilib @@ -11,9 +11,10 @@ LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~alpha ~amd64 hppa ~ia64 ppc ppc64 sparc ~x86 ~x86-fbsd" -IUSE="static doc" +IUSE="X static doc" -DEPEND="" +RDEPEND="x11-libs/wxGTK" +DEPEND="${RDEPEND}" S=${WORKDIR}/${PN}_${PV} @@ -28,6 +29,8 @@ -e '/Rar/d' \ makefile* || die "changing makefiles" + use X && epatch "${FILESDIR}"/${PV}-makefile.patch + if use amd64; then ewarn "Using suboptimal -fPIC upstream makefile due to amd64 being detected. See #126722" cp -f makefile.linux_amd64 makefile.machine @@ -47,6 +50,12 @@ src_compile() { emake all3 || die "compilation error" + use X && emake 7zG || die "error building GUI" +} + +src_test() { + emake test_7z test_7zr || die "test failed" + use X && emake test_7zG || die "GUI test failed" } src_install() { @@ -55,6 +64,17 @@ make_wrapper 7za "/usr/lib/${PN}/7za" make_wrapper 7z "/usr/lib/${PN}/7z" + if use X; then + make_wrapper 7zG "/usr/lib/${PN}/7zG" + + dobin GUI/p7zipForFilemanager + exeinto /usr/$(get_libdir)/${PN} + doexe bin/7zG + + insinto /usr/$(get_libdir)/${PN} + doins -r GUI/{Lang,help} + fi + dobin "${FILESDIR}/p7zip" || die # gzip introduced in 4.42, so beware :)