--- p7zip-4.58.ebuild 2009-01-07 01:54:21.000000000 +0300 +++ p7zip-4.61.ebuild 2009-01-07 01:55:27.000000000 +0300 @@ -1,6 +1,8 @@ # 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.8 2008/12/27 05:00:55 darkside Exp $ +# $Header: $ + +EAPI=2 inherit eutils toolchain-funcs multilib @@ -11,15 +13,14 @@ LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~alpha amd64 hppa ~ia64 ppc ppc64 sparc x86 ~x86-fbsd" -IUSE="static doc" +IUSE="static doc wxwindows" -DEPEND="" +RDEPEND="wxwindows? ( x11-libs/wxGTK[X] )" +DEPEND="${RDEPENDS}" S=${WORKDIR}/${PN}_${PV} -src_unpack() { - unpack ${A} - cd "${S}" +src_prepare() { sed -i \ -e "/^CXX=/s:g++:$(tc-getCXX):" \ -e "/^CC=/s:gcc:$(tc-getCC):" \ @@ -28,6 +29,8 @@ -e '/Rar/d' \ makefile* || die "changing makefiles" + use wxwindows && 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 wxwindows && emake 7zG || die "error building GUI" +} + +src_test() { + emake test_7z test_7zr || die "test failed" + use wxwindows && 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 wxwindows; 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 :)