You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.0 KiB
48 lines
1.0 KiB
3 years ago
|
# Copyright 1999-2022 Gentoo Authors
|
||
9 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
3 years ago
|
EAPI=8
|
||
9 years ago
|
|
||
|
inherit toolchain-funcs
|
||
|
|
||
|
DESCRIPTION="MicroGnuEmacs, a port from the BSDs"
|
||
2 years ago
|
HOMEPAGE="https://github.com/hboetes/mg"
|
||
7 years ago
|
SRC_URI="https://github.com/hboetes/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||
9 years ago
|
|
||
|
LICENSE="public-domain"
|
||
|
SLOT="0"
|
||
2 years ago
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||
9 years ago
|
IUSE="livecd"
|
||
|
|
||
3 years ago
|
RDEPEND="
|
||
|
sys-libs/ncurses:0=
|
||
|
>=dev-libs/libbsd-0.7.0"
|
||
3 years ago
|
DEPEND="${RDEPEND}"
|
||
|
BDEPEND="virtual/pkgconfig"
|
||
9 years ago
|
|
||
|
src_prepare() {
|
||
|
# fix path to tutorial in man page
|
||
|
sed -i -e "s:doc/mg/:doc/${PF}/:" mg.1 || die
|
||
|
eapply_user
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
emake CC="$(tc-getCC)" \
|
||
|
CFLAGS="${CFLAGS}" \
|
||
7 years ago
|
PKG_CONFIG="$(tc-getPKG_CONFIG)"
|
||
9 years ago
|
}
|
||
|
|
||
5 years ago
|
src_install() {
|
||
9 years ago
|
dobin mg
|
||
|
doman mg.1
|
||
|
dodoc README tutorial
|
||
|
# don't compress the tutorial, otherwise mg cannot open it
|
||
|
docompress -x /usr/share/doc/${PF}/tutorial
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
if use livecd; then
|
||
|
[[ -e ${EROOT}/usr/bin/emacs ]] || ln -s mg "${EROOT}"/usr/bin/emacs
|
||
|
fi
|
||
|
}
|