# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # FIXME: Maybe support a USE flag for debug build # FIXME: Scan for error conditions and implement appropriate dies # FIXME: Install into a subdirectory of /usr/lib/chandler and support # SLOTS to allow multiple parallel installs # FIXME: Examine user,group,perms of resulting files inherit eutils subversion DESCRIPTION="Personal information manager (PIM) desktop application and framework" HOMEPAGE="http://www.osafoundation.org/" LICENSE="GPL-2" KEYWORDS="~x86" IUSE="" SLOT="0" # FIXME: Should probably have a -* keyword until package builds in # more standard way # FIXME: Maybe Perl, SDL, libpng. Probably significant amount of # other stuff. # FIXME: Install in a fresh Gentoo install to catch additional dependencies. # FIXME: Remove conflict with non-subversion chandler builds # # Really should depend on gcc with the gcj use flag set, but # apparently not possible to specify that condition here. RDEPEND=">=x11-libs/gtk+-2 !app-office/chandler !app-office/chandler-cvs" DEPEND="${RDEPEND} >=sys-devel/gcc-3.4.2" # FIXME: Work with upstream to have package untar into a subdirectory S=${WORKDIR} # We use the GCC/GCJ configuration in a detailed way, so load some # information first. Currently, this method only supports using # whatever the "current" GCC configuration is. The user is expected # to set that configuration to a compatible version (GCC >=3.4.2 + # GCJ) before running this ebuild. GCC_PROFILE= GCC_LIB=`gcc-config -L ${GCC_PROFILE}` GCC_BIN=`gcc-config -B ${GCC_PROFILE}` # FIXME: Somehow detect GCJ properly for slot builds; since # built_with_use uses best_version, it won't find GCJ in any # non-default slots. Using a blank profile just means "current", so it # picks up whatever is currently set. pkg_setup() { if [ ! -x "${GCC_BIN}/gcj" ] ; then eerror 'Chandler build requires that GCC be built with the "gcj" USE flag.' eerror 'If there is already a GCC slot build with GCJ, then you will need to' eerror 'use "gcc-config" to set that slot as the current GCC configuration.' die "exiting because of missing GCJ dependency" fi } src_unpack() { ESVN_STORE_DIR="${DISTDIR}/svn-src/chandler-all" MY_ESVN_REPO_ROOT="http://svn.osafoundation.org/chandler/trunk" # We can't just do the chandler root module since the svn eclass # doesn't interoperate with the lack of top-level private # directory and lack of SVN directories at that top level. It's # not 100% clear what extensions or adjustments would be needed # where, so the individual modules are checked out instead, one at # a time. Also, the unneeded "hardhat" module is skipped. ESVN_REPO_URI="${MY_ESVN_REPO_ROOT}/chandler" subversion_src_unpack ESVN_REPO_URI="${MY_ESVN_REPO_ROOT}/external" subversion_src_unpack ESVN_REPO_URI="${MY_ESVN_REPO_ROOT}/internal" subversion_src_unpack } src_compile() { # Need to create a fake GCJ_HOME pointing to Gentoo versions mkdir -p gcj-home/bin cd gcj-home ln -s ${GCC_LIB} lib cd bin for i in ${GCC_BIN}/*; do ln -s ${i} `basename ${i}` done # Chandler build assumes jar binary is named "jar" so make one available ln -s gcj-jar jar # Compile Chandler the way it wants to be built. Force # single-threaded make as package won't build in parallel (bug #1853). cd ${S}/external || die env GCJ_HOME=${S}/gcj-home BUILD_ROOT=${S}/external emake -j1 world || die } src_install() { # Remove extraneous SVN directories find ${S} -type d -name .svn | xargs -r rm -rf # FIXME: Maybe use /usr/share/chandler instead INST_ROOT=/usr/lib/${PN} dodir ${INST_ROOT} dodir /usr/bin # FIXME: Work with upstream to support a "make DESTDIR=${D} install" option cp -a ${S}/chandler/* ${D}${INST_ROOT} # Create a simple wrapper suitable for placement into /usr/bin # FIXME: Switch to installation of /usr/lib/chandler/chandler as # /usr/bin/chandler FIXME: Install with ebuild do* function # perhaps CBIN=${D}/usr/bin/chandler cat > ${CBIN} <