# Copyright 2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit wxwidgets DESCRIPTION="GUI for the creation & processing of panoramic images" HOMEPAGE="http://hugin.sf.net" MY_P="${PN}-${PV/_/-}" SRC_URI="mirror://sourceforge/hugin/hugin-0.5_rc1.tar.bz2" LICENSE="GPL-2 SIFT" KEYWORDS="~x86 ~amd64" IUSE="gtk2 unicode debug" DEPEND=">=media-libs/libpano12-2.7.0.8* >=dev-libs/boost-1.30.0 >=x11-libs/wxGTK-2.6.0 sys-libs/zlib media-libs/libpng media-libs/jpeg media-libs/tiff gtk2? ( >=x11-libs/gtk+-2.0.3 )" S=${WORKDIR}/hugin-0.5 src_unpack() { unpack ${A} sed -i 's/"autopanog.exe"/"autopanog"/' \ ${S}/src/include/hugin/config_defaults.h # make nona (not PTStitcher) the default stitcher sed -i 's/\(Read(wxT("Stitcher\/DefaultStitcher"),\)0l/\11l/' \ ${S}/src/hugin/PanoPanel.cpp } src_compile() { export WX_GTK_VER="2.6" if ! use gtk2; then need-wxwidgets gtk || die "Emerge wxGTK with -no_wxgtk1 in USE" elif use unicode; then need-wxwidgets unicode || die "Emerge wxGTK with unicode in USE" else need-wxwidgets gtk2 || die "Emerge wxGTK with gtk2 in USE" fi myconf="`use_with unicode` `use_enable debug`" econf --with-wx-config="${WX_CONFIG}" ${myconf} || die "configure failed" emake || die "compiling failed" } src_install() { emake install DESTDIR=${D} || die dodoc AUTHORS BUGS INSTALL LICENCE LICENCE_SIFT README TODO } pkg_postinst() { einfo "Please consider the helper apps autopano-sift and enblend." einfo "autopano-sift is used to automagically generate control" einfo "points and enblend is used to merge images smoothly." }