commit: a43b30751149f38e6d2607b7fdde8a92e13208e1 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Fri Feb 27 07:25:27 2026 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Fri Feb 27 07:30:50 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a43b3075
app-editors/mg: add 20260227 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> app-editors/mg/Manifest | 1 + app-editors/mg/mg-20260227.ebuild | 47 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/app-editors/mg/Manifest b/app-editors/mg/Manifest index 25a067237d42..f873233060be 100644 --- a/app-editors/mg/Manifest +++ b/app-editors/mg/Manifest @@ -1,2 +1,3 @@ DIST mg-20230501.tar.gz 158315 BLAKE2B b8f68d4cd80a1735ce171bf653281104f7c8b5510a45088a136955d6649e969285914d27d2ee5bd4400643507943576e3c42959949aebb81bc1bb2f99a8e660e SHA512 db7b9815a01dc9fb1ff92741748d24d558c329135e591c24450d0a3bc10e38a992ef346dd744854864538f330a018415df539d06543570a3566dbabc6c88a8fd DIST mg-20240709.tar.gz 159302 BLAKE2B 82a0dae47f0e43751959ebac81af9e4bf60aaef728e9bc07dd1bed03bfd94aa69e0eabd693e5a9b6c8c59bba4956b6c78a2597b5679d82391621c23c08c18b03 SHA512 1715f3378059c995cffd9b7e6f8d237cdbae43e67516542c9ef3a5d30c7d0b78183bce1f21db6570877261c2804258f664199b4a46febbf2c10ec25e08833926 +DIST mg-20260227.tar.gz 159568 BLAKE2B 06b1bb643d2efa9ff95c2666bd889690ef7ba211a6ecd893e891ae9c83779f9f3c1478694183232a09a208bfbe405c8cc54d1132c640926270e4e5ccfdbc3cba SHA512 8d628d6615a110c4fe6f49f8b9cfbfc0ab955d4ab4a3a13c6d7a1b4d6101138c98e6b764986c662c701e3feef1510004ec21854f71fc6027cb372adde09b69ec diff --git a/app-editors/mg/mg-20260227.ebuild b/app-editors/mg/mg-20260227.ebuild new file mode 100644 index 000000000000..e32bd504e474 --- /dev/null +++ b/app-editors/mg/mg-20260227.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=9 + +inherit toolchain-funcs + +DESCRIPTION="MicroGnuEmacs, a port from the BSDs" +HOMEPAGE="https://github.com/hboetes/mg" +SRC_URI="https://github.com/hboetes/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="livecd" + +RDEPEND=" + sys-libs/ncurses:0= + >=dev-libs/libbsd-0.7.0" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + default + # fix path to tutorial in man page + sed -i -e "s:doc/mg/:doc/${PF}/:" mg.1 || die +} + +src_compile() { + emake CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS}" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" +} + +src_install() { + dobin mg + doman mg.1 + dodoc README README.md 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 +}
