diff options
author | 2014-06-05 18:59:34 +0200 | |
---|---|---|
committer | 2014-06-05 18:59:34 +0200 | |
commit | 36a7bc3ebe65a379d41da0cb5ea6d48f5ff62c3b (patch) | |
tree | 5d3c3525b486df0432a8683a87f4d90ba26ad653 /app-admin/emacs-updater/emacs-updater-9999.ebuild | |
parent | Ebuild for BBDB version 3, bug 511572. Work in progress. (diff) | |
download | emacs-36a7bc3ebe65a379d41da0cb5ea6d48f5ff62c3b.tar.gz emacs-36a7bc3ebe65a379d41da0cb5ea6d48f5ff62c3b.tar.bz2 emacs-36a7bc3ebe65a379d41da0cb5ea6d48f5ff62c3b.zip |
Add missing dependency on app-misc/getopt for BSD. Update GETOPT variable in script if necessary.
Package-Manager: portage-2.2.10
Diffstat (limited to 'app-admin/emacs-updater/emacs-updater-9999.ebuild')
-rw-r--r-- | app-admin/emacs-updater/emacs-updater-9999.ebuild | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/app-admin/emacs-updater/emacs-updater-9999.ebuild b/app-admin/emacs-updater/emacs-updater-9999.ebuild index 9b96598..b24787e 100644 --- a/app-admin/emacs-updater/emacs-updater-9999.ebuild +++ b/app-admin/emacs-updater/emacs-updater-9999.ebuild @@ -16,15 +16,22 @@ HOMEPAGE="http://wiki.gentoo.org/wiki/Project:Emacs" LICENSE="GPL-2+" SLOT="0" -RDEPEND=">=app-portage/portage-utils-0.3 +DEPEND="|| ( sys-apps/util-linux app-misc/getopt )" +RDEPEND="${DEPEND} + >=app-portage/portage-utils-0.3 virtual/emacs" S="${WORKDIR}/${PN}" src_prepare() { + if ! has_version sys-apps/util-linux; then + # BSD ships a dumb getopt(1), so use getopt-long instead + sed -i -e '/^GETOPT=/s/getopt/&-long/' emacs-updater || die + fi + if [[ -n ${EPREFIX} ]]; then sed -i -e "1s:/:${EPREFIX%/}/:" \ - -e "s:^\(EMACS\|SITELISP\)=:&${EPREFIX%/}:" \ + -e "s:^\([[:upper:]]*=\)/:\1${EPREFIX%/}/:" \ emacs-updater || die fi } |