# $Header: /magellan-cvs/smage/include/gnome2.sminc,v 1.23 2008/03/28 10:39:41 niro Exp $ : ${SRCFILE="${PNAME}-${PVER}.tar.bz2"} : ${SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"} INHERITS="${INHERITS} gnome2" # default SRC_URIs SRC_URI=( gnome://${PNAME}/${PVER%.*}/${SRCFILE} gnome://${PNAME}/${PVER%.*.*}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) # gnome default setup export SCROLLKEEPER_UPDATE=${SCROLLKEEPER_UPDATE:-0} export SCROLL_DEBUG=${SCROLL_DEBUG:-0} export GNOME_PREFIX="/usr" export PATH="${PATH}:${GNOME_PREFIX}/bin" export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${GNOME_PREFIX}/$(mlibdir)/pkgconfig" export GNOME_LIBCONFIG_PATH="/usr/$(mlibdir):${GNOME_PREFIX}/$(mlibdir)" # add scrollkeeper to dependencies if requested if [[ ${SCROLLKEEPER_UPDATE} = 1 ]] then DEPEND="${DEPEND} >= app-text/scrollkeeper-0.3.14" fi # function to clean gnome pakages # scrollkeeper and mimeinfo crap gn2_clean_gnome_pkg() { # litte check to show if you must run scrollkeeper in postinstall or not if [ -z "$(find ${BINDIR} -name '*.omf')" ] then echo echo "########################" echo "scrollkeeper isn't needed to run." echo "########################" echo if [ "${SCROLL_DEBUG}" = "1" ] then echo "Press [Enter] to continue ..." read else sleep 3 fi else echo echo "########################" echo "you need to run scrollkeeper in postinstall for ${PNAME}-${PVER}" echo "########################" echo if [ "${SCROLL_DEBUG}" = "1" ] then echo "Press [Enter] to continue ..." read else sleep 3 fi fi # remove scrollkeeper crap if [[ -d ${BINDIR}/var/lib/scrollkeeper ]] then rm -rf ${BINDIR}/var/lib/scrollkeeper || die fi # mime database will rebuilded later if [[ -e ${BINDIR}/usr/share/applications/mimeinfo.cache ]] then rm -rf ${BINDIR}/usr/share/applications/mimeinfo.cache || die fi # delete /var/tmp if exist if [[ -d ${BINDIR}/var/tmp ]] then rm -rf ${BINDIR}/var/tmp || die fi } gn2_configure() { local configure_opts="$@" # we run scrollkeeper manually within postinstall [[ ${SCROLLKEEPER_UPDATE} = 1 ]] && configure_opts="${configure_opts} --disable-scrollkeeper" ./configure \ --host=${CHOST} \ --build=${CHOST} \ --prefix=${GNOME_PREFIX} \ --sysconfdir=/etc \ --infodir=${GNOME_PREFIX}/share/info \ --mandir=${GNOME_PREFIX}/share/man \ --localstatedir=/var/lib \ --libdir=${GNOME_PREFIX}/$(mlibdir) \ --libexecdir=${GNOME_PREFIX}/$(mlibdir)/${PNAME} \ --enable-static=no \ --disable-gtk-doc \ ${configure_opts} \ || die } gn2_src_prepare() { munpack ${SRCFILE} || die } gn2_src_compile() { cd ${SRCDIR} gn2_configure || die mmake ${GN2_MAKE_OPTS} || die } gn2_src_install() { cd ${SRCDIR} # needed directories # scrollkeeper needs this install -d ${BINDIR}/var/lib/scrollkeeper || die # using make install instead of minstall make DESTDIR=${BINDIR} ${GN2_MAKE_OPTS} install || die local i for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ FAQ LICENSE NEWS README TODO do if [ -f ${SRCDIR}/${i} ] then minstalldocs ${i} || die fi done gn2_clean_gnome_pkg } gn2_fix_omf_makefiles() { # remove scrollkeeper update; we do it later # taken from gentoo local omf_makefiles local omf_base local omf omf_makefiles="$@" [ -f ${SRCDIR}/omf-install/Makefile.in ] \ && omf_makefiles="${omf_makefiles} ${SRCDIR}/omf-install/Makefile.in" [ -f ${SRCDIR}/omf.make ] \ && omf_makefiles="${omf_makefiles} ${SRCDIR}/omf.make" for omf in ${omf_makefiles}; do omfbase=$(basename ${omf}) echo "Fixing OMF Makefile: ${omf#${SRCDIR}/}" sed -i 's:-scrollkeeper-update.*::' ${omf} done } export_inherits gn2 src_prepare src_compile src_install