# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ # # Tavis Ormandy 2003 # DESCRIPTION="Linux port of the Famous Tru64 Debugger" HOMEPAGE="http://www.support.compaq.com/alpha-tools" #SRC_URI="ftp://ftp.compaq.com/pub/products/linuxdevtools/latest/ladebug-4.0.67-21.alpha.rpm" LICENSE="compaq-sdla" SLOT="0" # NOTE: ALPHA Only! KEYWORDS="-* ~alpha" IUSE="emacs" DEPEND="virtual/glibc app-arch/rpm2targz dev-libs/libots dev-libs/libcpml emacs? (app-editors/emacs)" S=${WORKDIR}/${P} RELEASE="4.0.67-21" src_unpack() { # convert rpm into tar archive ladebug_rpm="ladebug-${RELEASE}.alpha.rpm" if [ ! -f ${DISTDIR}/${ladebug_rpm} ]; then eerror "" eerror "Please download ${ladebug_rpm} from" eerror "${HOMEPAGE}, and place it in" eerror "${DISTDIR}" eerror "" eerror "Then resart this emerge." eerror "" die "Ladebug Distribution (${ladebug_rpm}) not found" else ebegin "Converting RPM Package to Tar Archive..." rpm2targz ${DISTDIR}/${ladebug_rpm} || { eend ${?} die "Failed to Convert ${ladebug_rpm}" } eend ${?} ebegin "Unpacking Ladebug Distribution..." tar -C ${WORKDIR} -zxf ${WORKDIR}/${ladebug_rpm%*.rpm}.tar.gz || { eend ${?} die "Failed to Extract ${ladebug_rpm%*.rpm}.tar.gz" } eend ${?} einfo "CCC Distribution Successfully Prepared for Portage." rm -f ${WORKDIR}/${ladebug_rpm%*.rpm}.tar.gz fi } src_compile() { # remove emacs lisp files if [ ! "`use emacs`" ]; then einfo "Removing emacs Ladebug integration (USE=\"-emacs\"?)..." rm -rf ${WORKDIR}/usr/lib/emacs ${WORKDIR}/usr/lib/compaq/ladebug-V67/ladebug.el else einfo "Preparing emacs Ladebug integration (USE=\"emacs\"?)..." rm -rf ${WORKDIR}/usr/lib/emacs mkdir -p ${WORKDIR}/usr/share/emacs/site-lisp mv ${WORKDIR}/usr/lib/compaq/ladebug-V67/ladebug.e ${WORKDIR}/usr/share/emacs/site-lisp fi # man pages are in the wrong place einfo "Reorganising man structure..." rm -rf ${WORKDIR}/usr/man mkdir -p ${WORKDIR}/usr/share/man/man1 mv ${WORKDIR}/usr/lib/compaq/ladebug-V67/ladebug.1.gz ${WORKDIR}/usr/share/man/man1 einfo "Reorganising Documentation structure..." mv ${WORKDIR}/usr/doc ${WORKDIR}/usr/share/ # *sigh* ln -s ${WORKDIR}/usr/share/locale/en_US ${WORKDIR}/usr/share/locale/C } src_install() { # move files over mv ${WORKDIR}/usr ${D} || die "Ladebug Installation Failed" # prep manpages prepman ${D}/usr/share/man/man1/ladebug.1.gz prepalldocs } pkg_postinst () { einfo einfo "Ladebug ${RELEASE} has been merged successfully" einfo }