--- /usr/portage/sci-mathematics/singular/singular-3.0.3.ebuild 2007-08-08 16:06:40.000000000 +0200 +++ singular-3.0.3.ebuild 2007-09-22 15:47:38.000000000 +0200 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sci-mathematics/singular/singular-3.0.3.ebuild,v 1.2 2007/08/08 13:50:04 markusle Exp $ -inherit eutils flag-o-matic autotools multilib +inherit eutils elisp-common flag-o-matic autotools multilib PV_MAJOR=${PV%.*} MY_PV=${PV//./-} @@ -21,11 +21,11 @@ DEPEND=">=dev-lang/perl-5.6 >=dev-libs/gmp-4.1-r1 - emacs? ( || ( virtual/xemacs - virtual/emacs ) ) + emacs? ( virtual/emacs ) boost? ( dev-libs/boost )" S="${WORKDIR}"/${MY_PN}-${MY_PV} +SITEFILE=60${PN}-gentoo.el src_unpack () { unpack ${A} @@ -54,6 +54,11 @@ econf $(use_enable emacs) \ ${myconf} || die "econf failed" emake -j1 || die "make failed" + + if use emacs; then + cd "${WORKDIR}"/${MY_PN}/${MY_PV}/emacs/ + elisp-compile *.el || die "elisp-compile failed" + fi } src_install () { @@ -76,10 +81,6 @@ dobin ${MY_PN}* gen_test change_cost solve_IP \ toric_ideal LLL || die "failed to install binaries" - if use emacs; then - dobin E${MY_PN} || die "failed to install ESingular" - fi - # install libraries insinto /usr/$(get_libdir)/${PN} doins *.so || die "failed to install libraries" @@ -102,15 +103,21 @@ die "failed to install info files" fi - # install emacs specific stuff + # install emacs specific stuff here, as we did a directory change + # some lines above! if use emacs; then - insinto /usr/share/${PN}/emacs - doins emacs/* && doins emacs/.emacs* || \ - die "failed to set up emacs files" + elisp-install ${PN} emacs/*.el emacs/*.elc emacs/.emacs* || \ + die "elisp-install failed" + elisp-site-file-install "${FILESDIR}/${SITEFILE}" fi } pkg_postinst() { einfo "The authors ask you to register as a SINGULAR user." einfo "Please check the license file for details." + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen }