From 1dd43e64bcd93654b58674e3ca4d8eee03230f9d Mon Sep 17 00:00:00 2001 From: Alfred Wingate Date: Fri, 27 Oct 2023 05:23:39 +0300 Subject: [PATCH] sys-apps/chimerautils: revamp * Add missing flags and dependencies * Cleanup all around Signed-off-by: Alfred Wingate --- .../chimerautils-13.2.8-r1.ebuild | 78 +++++++++++++++++++ sys-apps/chimerautils/metadata.xml | 9 +++ 2 files changed, 87 insertions(+) create mode 100644 sys-apps/chimerautils/chimerautils-13.2.8-r1.ebuild diff --git a/sys-apps/chimerautils/chimerautils-13.2.8-r1.ebuild b/sys-apps/chimerautils/chimerautils-13.2.8-r1.ebuild new file mode 100644 index 0000000..48634dd --- /dev/null +++ b/sys-apps/chimerautils/chimerautils-13.2.8-r1.ebuild @@ -0,0 +1,78 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson + +DESCRIPTION="Chimera's core userland, based on FreeBSD" +HOMEPAGE="https://chimera-linux.org" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/chimera-linux/chimerautils.git" +else + SRC_URI="https://github.com/chimera-linux/chimerautils/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="BSD" +SLOT="0" + +IUSE="+bzip2 +libedit +lzma +openssl +terminfo tiny +zlib" + +# No tests +RESTRICT="test" + +RDEPEND=" + sys-apps/acl + sys-libs/libxo + bzip2? ( app-arch/bzip2 ) + libedit? ( dev-libs/libedit ) + lzma? ( app-arch/xz-utils ) + openssl? ( dev-libs/openssl:= ) + terminfo? ( sys-libs/ncurses:= ) + zlib? ( sys-libs/zlib ) +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + app-alternatives/lex + app-alternatives/yacc + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/chimerautils-13.2.8-find-POSIXLY_CORRECT.patch" +) +src_prepare() { + eapply_user + + export BSD_PREFIX="${EPREFIX}/opt/bsd" + + # Make bc use prefix path + sed -i \ + -e "s|/usr/bin/dc|${BSD_PREFIX}/bin/dc|" \ + -e "s|/usr/share/misc/bc.library|${BSD_PREFIX}/share/misc/bc.library|" \ + src.freebsd/bc/bc/pathnames.h || die +} + +src_configure() { + local emesonargs=( + $(meson_feature bzip2) + $(meson_feature libedit) + $(meson_feature lzma) + $(meson_feature openssl) + $(meson_feature tiny) + $(meson_feature zlib) + $(meson_use terminfo color_ls) + --prefix=${BSD_PREFIX} + ) + + meson_src_configure +} + +pkg_postinst() { + elog "Add \"${BSD_PREFIX}/bin\" to \$PATH and add \"${BSD_PREFIX}/share/man\" to \$MANPATH" +} diff --git a/sys-apps/chimerautils/metadata.xml b/sys-apps/chimerautils/metadata.xml index d3ecf23..43a040d 100644 --- a/sys-apps/chimerautils/metadata.xml +++ b/sys-apps/chimerautils/metadata.xml @@ -4,4 +4,13 @@ chimera-linux/chimerautils + + Use bzip2 for gzip(1) + Use libedit (needed by bc(1)) + Use liblzma for gzip(1) + Use OpenSSL (required by some tools, optional elsewhere) + Use terminfo color output for ls(1) + Also build tiny versions of some of the tools + Use zlib for gzip(1) +