# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit libtool eutils wxwidgets flag-o-matic autotools multilib DESCRIPTION="The W3C Web-Editor/Browser" SRC_URI="http://wam.inrialpes.fr/software/amaya/${PN}-fullsrc-${PV/_/-}.tgz" HOMEPAGE="http://www.w3.org/Amaya/" KEYWORDS="~x86 ~amd64" LICENSE="GPL-2" SLOT="9" IUSE="opengl debug webdav unicode wxwindows raptor gtk libwww mesa" RDEPEND="virtual/opengl >=x11-libs/gtk+-2.0 media-libs/imlib2 >=net-libs/libwww-5.4.0-r8 >=media-libs/freetype-2 x11-libs/wxGTK dev-libs/redland dev-libs/expat opengl? ( virtual/opengl )" DEPEND="dev-lang/perl dev-libs/openssl ${RDEPEND}" WX_GTK_VER="2.8" S=${WORKDIR}/Amaya pkg_setup() { if ! built_with_use net-libs/libwww webdav; then msg="You must build libwww with USE=webdav." eerror ${msg} die ${msg} fi if use debug; then strip-flags append-flags -g fi } src_unpack() { unpack ${A} for i in libwww freetype Mesa redland wxWidgets; do rm -fr $i done echo "ABOUT TO PATCH FROM `pwd`\!" epatch "${FILESDIR}"/amaya-10.1_pre5-autoconf-gentoo.patch mkdir ${S}/obj cd ${S}/obj ln -sf ../configure . cd .. eautoreconf || die "autoreconf failed" } src_compile() { cd ${S}/obj ln -sf ../configure . need-wxwidgets unicode use opengl && check_wxuse opengl export HOME=$(pwd) local myconf myconf="${myconf} \ --datadir=/usr/share \ --disable-option-checking \ $(use_enable webdav dav) \ $(use_enable unicode) \ $(use_enable wxwindows system-wx) \ $(use_enable raptor system-raptor) \ $(use_enable gtk gtk2) \ $(use_with gtk) \ $(use_with libwww system-libwww) \ $(use_with libwww) \ $(use_with opengl gl) \ $(use_with mesa) \ $(use_with debug)" econf ${myconf} || die "econf failed" emake || die "emake failed" } src_install () { cd ${S} dodir /usr/share pushd obj && \ make install DESTDIR=${D} prefix=/usr/share bindir=/usr/bin || die ${S}/obj/script_install_gnomekde ${S}/obj/bin ${D}/usr/share /usr/share popd dodoc README README.wx amaya/COPYRIGHT #dodir /usr/share/Amaya-${PV}/doc [[ -d doc/images ]] && \ cp -R ${S}/doc/images ${D}/usr/share/doc/${PF}/ [[ -d doc/WX ]] && \ cp -R ${S}/doc/WX ${D}/usr/share/doc/${PF}/ #ugly but effective hack to fix the startup script per bug #237322 comment #10 sed -i 's#^PREFIX=.*$#PREFIX=/usr/share#' ${D}/usr/bin/amaya #make_desktop_entry ${PN} "Amaya W3C Editor" ${S}/amaya/amaya.png }