# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-editors/nvu/nvu-1.0-r4.ebuild,v 1.10 2007/03/02 09:22:52 armin76 Exp $ inherit eutils mozconfig flag-o-matic multilib DESCRIPTION="A WYSIWYG web editor for linux similiar to Dreamweaver" HOMEPAGE="http://kompozer.net/" SRC_URI="mirror://sourceforge/kompozer/${P}dfsg-src.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ppc sparc x86" IUSE="" DEPEND="x11-proto/printproto sys-apps/gawk dev-lang/perl >=media-libs/freetype-2.1.9-r1" S=${WORKDIR}/${P}/mozilla src_unpack() { unpack ${A} cd ${S} # copied from mozilla.eclass (modified slightly), # otherwise it defaults to -O which crashes on startup for me - basic # Set optimization level based on CFLAGS if is-flag -O0; then echo 'ac_add_options --enable-optimize=-O0' >> .mozconfig elif is-flag -O1; then echo 'ac_add_options --enable-optimize=-O1' >> .mozconfig else # mozilla fallback echo 'ac_add_options --enable-optimize=-O2' >> .mozconfig fi } src_compile() { # The build system is a weeee bit sensitive to naughty -O flags. # filter them out and let the build system figure out what # won't let it die :) - Chris filter-flags '-O*' make -f client.mk build_all || die "Make failed" } src_install() { make -f client.mk DESTDIR=${D} install || die #menu entry for gnome/kde insinto /usr/share/applications sed -e "s:/usr/lib/kompozer:/usr/$(get_libdir)/kompozer:" \ ${FILESDIR}/1.0/kompozer.desktop > ${T}/kompozer.desktop doins ${T}/kompozer.desktop }