# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils mozconfig flag-o-matic multilib SLOT="0" LICENSE="CePL" KEYWORDS="~amd64 ~x86" DESCRIPTION="An open source screenplay editor" SRC_URI="http://www.celtx.com/download/celtx-${PV}-src.tar.bz2" HOMEPAGE="http://www.celtx.com" IUSE="" DEPEND="" S=${WORKDIR}/${P}-src/mozilla src_unpack() { unpack ${A} cd ${S} # I had to manually edit the mozconfig.linux file as it # has some quirks... just copy the darn thing over :) - Chris # 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 #mkdir -p ${D}/opt/celtx #cp -R ${WORKDIR}/celtx ${D}/opt/ || die }