net-misc/sacc: put sacc.1 in right place
[sgilles-overlay.git] / app-editors / mg / mg-20180409.ebuild
blob2292943b57bbcc0474bdb224b50e8eec8b16a522
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
5 EAPI=5
7 inherit eutils toolchain-funcs git-r3
9 DESCRIPTION="MicroGnuEmacs, a port from the BSDs"
10 HOMEPAGE="http://homepage.boetes.org/software/mg/"
11 EGIT_REPO_URI="https://github.com/hboetes/mg.git"
12 EGIT_BRANCH="display-wide-characters"
13 EGIT_COMMIT="505b4aafd1efcf29dd5e3528cf46d1dbd6b75c57"
15 LICENSE="public-domain"
16 SLOT="0"
17 KEYWORDS="alpha amd64 arm hppa ppc ~ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
18 IUSE="livecd"
20 RDEPEND="sys-libs/ncurses:0
21 !elibc_FreeBSD? ( >=dev-libs/libbsd-0.7.0 )"
22 DEPEND="${RDEPEND}
23 virtual/pkgconfig"
25 src_prepare() {
26 epatch_user
28 # fix path to tutorial in man page
29 sed -i -e "s:doc/mg/:doc/${PF}/:" mg.1 || die
31 #epatch "${FILESDIR}/${P}-missing-defines.patch"
34 src_compile() {
35 emake CC="$(tc-getCC)" \
36 CFLAGS="${CFLAGS}" \
37 CURSES_LIBS="$("$(tc-getPKG_CONFIG)" --libs ncurses)"
40 src_install() {
41 dobin mg
42 doman mg.1
43 dodoc README tutorial
44 # don't compress the tutorial, otherwise mg cannot open it
45 docompress -x /usr/share/doc/${PF}/tutorial
48 pkg_postinst() {
49 if use livecd; then
50 [[ -e ${EROOT}/usr/bin/emacs ]] || ln -s mg "${EROOT}"/usr/bin/emacs