# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ KEYWORDS="-* ~x86 ~amd64" SLOT="0" LICENSE="MPL-1.1 NPL-1.1" IUSE="" inherit flag-o-matic toolchain-funcs eutils mozconfig-2 mozilla-launcher makeedit multilib fdo-mime mozextension autotools PVER="3" DESCRIPTION="The Mozilla Sunbird Calendar" SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/calendar/sunbird/releases/0.3a2/source/sunbird-0.3a2-source.tar.bz2" HOMEPAGE="http://www.mozilla.org/projects/calendar/sunbird.html" RESTRICT="nostrip" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86" IUSE="debug xinerama xprint ipv6 " SLOT="0" LICENSE="MPL-1.1 NPL-1.1" DEPEND="virtual/libc" RDEPEND="|| ( ( x11-libs/libXcursor x11-libs/libXrandr x11-libs/libXi x11-libs/libXinerama x11-libs/libXt ) virtual/x11 ) virtual/xft x86? ( >=sys-libs/lib-compat-1.0-r2 >=x11-libs/gtk+-2.2 ) amd64? ( >=app-emulation/emul-linux-x86-baselibs-1.0 >=app-emulation/emul-linux-x86-gtklibs-1.0 ) >=www-client/mozilla-launcher-1.44" S=${WORKDIR}/mozilla pkg_config() { # This is a binary x86 package => ABI=x86 # Please keep this in future versions # Danny van Dyk 2005/03/26 has_multilib_profile && ABI="x86" } # Needed by src_compile() and src_install(). # Would do in pkg_setup but that loses the export attribute, they # become pure shell variables. export MOZ_CO_PROJECT=calendar export BUILD_OFFICIAL=0.3 export MOZILLA_OFFICIAL=0.3 src_unpack() { declare x for x in ${A}; do [[ $x == *.tar.* ]] || continue unpack $x || die "unpack failed" done cd ${S} || die "cd failed" } src_compile() { declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN} #################################### # # mozconfig, CFLAGS and CXXFLAGS setup # #################################### #mozconfig_init #mozconfig_config #options Gentoo eclass didn't work. For the new version disable this ligne and enable comments cp calendar/sunbird/config/mozconfig .mozconfig \ || die "cp calendar/sunbird/config/mozconfig failed" echo "--with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}" >> ./mozconfig echo "ac_add_options --disable-debug # -debug" >> .mozconfig echo "ac_add_options --disable-tests # -debug" >> .mozconfig echo "export BUILD_OFFICIAL=1" >> .mozconfig echo "export MOZILLA_OFFICIAL=1" >> .mozconfig echo "mk_add_options BUILD_OFFICIAL=1" >> .mozconfig echo "mk_add_options MOZILLA_OFFICIAL=1" >> .mozconfig #mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} # Add build variables #mozconfig_build_opts # Finalize and report settings #mozconfig_final # -fstack-protector breaks us gcc-specs-ssp && append-flags -fno-stack-protector-all filter-flags -fstack-protector -fstack-protector-all #bug sur options ajoute par eclass voir version futur #desactive ces options sinon compilation impossible #mozconfig_annotate '' --without-system-zlib #mozconfig_annotate '' --disable-pango #mozconfig_annotate '' --disable-svg #mozconfig_annotate '' --disable-system-cair # Don't know a reason for that so commented out /peper #append-flags -freorder-blocks -fno-reorder-functions # Configure and build CPPFLAGS="${CPPFLAGS} -DGENTOO_NSPLUGINS_DIR=\\\"/usr/$(get_libdir)/nsplugins\\\"" CPPFLAGS="${CPPFLAGS} -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/$(get_libdir)/nsbrowser/plugins\\\"" export CPPFLAGS tc-export CC CXX LD econf || die # This removes extraneous CFLAGS from the Makefiles to reduce RAM # requirements while compiling edit_makefiles emake || die } pkg_preinst() { declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" einfo "Removing old install to eliminate any problems during install." rm -rf "${ROOT}"/"${MOZILLA_FIVE_HOME}" } src_install() { declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" # Most of the installation happens here dodir "${MOZILLA_FIVE_HOME}" cp -RL "${S}"/dist/bin/* "${D}"/"${MOZILLA_FIVE_HOME}"/ || die "cp failed" # Create /usr/bin/sunbird install_mozilla_launcher_stub sunbird ${MOZILLA_FIVE_HOME} # Install icon and .desktop for menu entry si besoin ajouter fichier dans files #doicon ${FILESDIR}/icon/mozillasunbird-icon.png #domenu ${FILESDIR}/icon/mozillasunbird.desktop } pkg_postinst() { declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" update_mozilla_launcher_symlinks elog "Please remember to rebuild any packages that you have built" elog "against sunbird packages might be broken by the upgrade" elog "please move or remove ~/.mozilla" elog "and test with a clean profile directory." } pkg_postrm() { declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" update_mozilla_launcher_symlinks }