# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" WANT_AUTOCONF="2.1" inherit eutils toolchain-funcs mozconfig-3 autotools flag-o-matic fdo-mime multilib mozextension java-pkg-opt-2 DESCRIPTION="A web authoring system combining web file management and WYSIWYG editing" HOMEPAGE="http://kompozer.net/" LANGS="ca cs da de en-US eo es-ES fi fr hsb hu it ja nl pl pt-PT ru sl zh-CN zh-TW" NOSHORTLANGS="es-ES pt-PT xh-CN zh-TW" MY_P="${P/_beta3/b3}" # Recommended using ${PN}?? SRC_URI="http://downloads.sourceforge.net/kompozer/${MY_P}-src.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~ia64 ~mips ~ppc ~sparc ~x86" IUSE="gnome java ldap" RDEPEND="java? ( virtual/jre ) >=sys-devel/binutils-2.16.1 >=dev-libs/nss-3.12.2 >=dev-libs/nspr-4.8 >=app-text/hunspell-1.2 >=x11-libs/gtk+-2.10.0 >=x11-libs/cairo-1.8.8[X] >=x11-libs/pango-1.14.0[X]" DEPEND="${RDEPEND} dev-util/pkgconfig sys-apps/gawk dev-lang/perl app-doc/doxygen app-arch/unzip x11-misc/makedepend >=media-libs/freetype-2.1.9-r1 java? ( >=virtual/jdk-1.4 )" S=${WORKDIR}/mozilla src_unpack() { unpack ${A} } pkg_setup() { export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 java-pkg-opt-2_pkg_setup } src_prepare() { java-pkg-opt-2_src_prepare eautoreconf } src_configure() { declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" MEXTENSIONS="" #################################### # # mozconfig, CFLAGS and CXXFLAGS setup # #################################### mozconfig_init mozconfig_config # It doesn't compile on alpha without this LDFLAGS use alpha && append-ldflags "-Wl,--no-relax" if ! use gnome ; then MEXTENSIONS="${MEXTENSIONS},-gnomevfs" fi mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" mozconfig_annotate '' --enable-application=composer mozconfig_annotate '' --enable-default-toolkit=gtk2 mozconfig_annotate '' --enable-system-myspell mozconfig_annotate '' --enable-jsd mozconfig_annotate '' --enable-image-encoder=all mozconfig_annotate '' --enable-canvas mozconfig_annotate '' --with-system-nspr mozconfig_annotate '' --with-system-nss mozconfig_annotate '' --enable-oji --enable-mathml mozconfig_annotate 'places' --enable-storage --enable-places mozconfig_annotate '' --disable-installer mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} # Enable/Disable based on USE flags mozconfig_use_enable java javaxpcom mozconfig_use_enable ldap mozconfig_use_enable ldap ldap-experimental # Finalize and report settings mozconfig_final if [[ $(gcc-major-version) -lt 4 ]]; then append-cxxflags -fno-stack-protector fi #################################### # # Configure and build # #################################### # Work around breakage in makeopts with --no-print-directory MAKEOPTS="${MAKEOPTS/--no-print-directory/}" CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf } src_compile() { # Should the build use multiprocessing? Not enabled by default, as it tends to break. [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1" emake ${jobs} || die } src_install() { declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" declare emid #Dirty Bugfix by unregistr3d (ignore nsModules.o): cd xpfe/components/ cp Makefile.in Makefile.in_backup cat Makefile.in_backup | grep -v build2 > Makefile.in cd ../.. emake DESTDIR="${D}" install || die "emake install failed" # Install icon and .desktop for menu entry newicon "${S}"/composer/app/mozicon256.png kompozer.png domenu "${FILESDIR}"/kompozer.desktop } pkg_postinst() { declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" # Update mimedb for the new .desktop file fdo-mime_desktop_database_update elog "This package has a very dirty bugfix!!! If you want to fill" elog "a Bugreport to the mainstream developers, at least be sure" elog "to refer to http://bugs.gentoo.org/show_bug.cgi?id=146761#c39 " elog "Thanks" }