app-misc/editor-wrapper: Sync with gentoo

It's from gentoo commit 38b155fa1bf907617067c98eb4ba3a5d0790eb1a.
This commit is contained in:
Krzesimir Nowak 2021-11-05 20:58:27 +01:00
parent f262badfb9
commit 88393b0193
4 changed files with 44 additions and 27 deletions

View File

@ -0,0 +1,31 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="Wrapper scripts that will execute EDITOR or PAGER"
# There is no upstream, everything is in FILESDIR.
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
S="${WORKDIR}"
src_prepare() {
sed -e 's/@VAR@/EDITOR/g' "${FILESDIR}/${P}.sh" >editor || die
sed -e 's/@VAR@/PAGER/g' "${FILESDIR}/${P}.sh" >pager || die
if use prefix ; then
sed -i \
-e "s:#!/bin/sh:#!/usr/bin/env sh:" \
-e "s: /etc/profile: \"${EPREFIX}/etc/profile\":" \
editor pager || die
fi
eapply_user
}
src_install() {
exeinto /usr/libexec
doexe editor pager
}

View File

@ -1,26 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-misc/editor-wrapper/editor-wrapper-4.ebuild,v 1.7 2011/12/29 21:37:29 ulm Exp $
EAPI=4
DESCRIPTION="Wrapper scripts that will execute EDITOR or PAGER"
HOMEPAGE="http://www.gentoo.org/"
SRC_URI=""
LICENSE="MIT"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
IUSE=""
S="${WORKDIR}"
src_prepare() {
sed -e 's/@VAR@/EDITOR/g' "${FILESDIR}/${P}.sh" >editor || die
sed -e 's/@VAR@/PAGER/g' "${FILESDIR}/${P}.sh" >pager || die
}
src_install() {
exeinto /usr/libexec
doexe editor pager
}

View File

@ -1,5 +1,5 @@
#!/bin/sh
# Copyright 2009-2011 Gentoo Foundation
# Copyright 2009-2011 Gentoo Authors
# Distributed under the terms of the MIT/X11 license
# Wrapper script, executes ${@VAR@} with arguments $@

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
<maintainer type="project">
<email>emacs@gentoo.org</email>
<name>Gentoo Emacs project</name>
</maintainer>
</pkgmetadata>