# 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 cvs 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-CVS 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" DEPEND="${RDEPEND} >=sys-devel/gcc-3.4.2" # FIXME: Work with upstream to have package untar into a subdirectory S=${WORKDIR} # FIXME: Somehow detect GCJ properly; since built_with_use uses # best_version, it won't find GCJ in any non-default slots #pkg_setup() { # if [[ ! $(built_with_use gcc gcj) ]] ; then # eerror 'Chandler build requires that GCC be built with the "gcj" USE flag' # die "exiting because of GCJ dependency" # fi #} src_unpack() { MY_ECVS_TOP_DIR="${DISTDIR}/cvs-src/chandler-all" ECVS_SERVER="cvs.osafoundation.org:/usr/local/cvsrep" ECVS_BRANCH="HEAD" ECVS_AUTH="pserver" ECVS_USER="anonymous" ECVS_PASS="anonymous" # Can't just do the chandler-all module since the cvs eclass # doesn't interoperate with the lack of top-level private # directory and lack of CVS 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. ECVS_MODULE="external" ECVS_TOP_DIR="${MY_ECVS_TOP_DIR}/${ECVS_MODULE}" cvs_src_unpack ECVS_MODULE="internal" ECVS_TOP_DIR="${MY_ECVS_TOP_DIR}/${ECVS_MODULE}" cvs_src_unpack ECVS_MODULE="chandler" ECVS_TOP_DIR="${MY_ECVS_TOP_DIR}/${ECVS_MODULE}" cvs_src_unpack ECVS_MODULE="hardhat" ECVS_TOP_DIR="${MY_ECVS_TOP_DIR}/${ECVS_MODULE}" cvs_src_unpack } src_compile() { # FIXME: Hmmm, how to get the right profile or detect during build # time that we're running GCC+GCJ >= 3.4.2. How to automatically # use a slot with GCJ even if default is not gcj enabled? Using a # blank profile just means "current", so it picks up whatever is # currently set. GCC_PROFILE= GCC_LIB=`gcc-config -L ${GCC_PROFILE}` GCC_BIN=`gcc-config -B ${GCC_PROFILE}` # 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 } src_install() { # Remove extraneous CVS directories FIXME: Work with upstream to # have distro tarballs not have CVS artifacts in them find ${S} -type d -name CVS | xargs -r rm -rf find ${S} -type f -name .cvsignore | xargs -r rm # 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} <