Skip to content

Commit

Permalink
Merge pull request #1 from parona-source/changes
Browse files Browse the repository at this point in the history
Revamp ebuilds
  • Loading branch information
Connor-GH authored Oct 28, 2023
2 parents 52c308d + 1dd43e6 commit 1887bf1
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 0 deletions.
78 changes: 78 additions & 0 deletions sys-apps/chimerautils/chimerautils-13.2.8-r1.ebuild
Original file line number Diff line number Diff line change
@@ -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"
}
16 changes: 16 additions & 0 deletions sys-apps/chimerautils/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<upstream>
<remote-id type="github">chimera-linux/chimerautils</remote-id>
</upstream>
<use>
<flag name="bzip2">Use bzip2 for gzip(1)</flag>
<flag name="libedit">Use libedit (needed by bc(1))</flag>
<flag name="lzma">Use liblzma for gzip(1)</flag>
<flag name="openssl">Use OpenSSL (required by some tools, optional elsewhere)</flag>
<flag name="terminfo">Use terminfo color output for ls(1)</flag>
<flag name="tiny">Also build tiny versions of some of the tools</flag>
<flag name="zlib">Use zlib for gzip(1)</flag>
</use>
</pkgmetadata>
39 changes: 39 additions & 0 deletions sys-libs/libxo/libxo-1.6.0-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools

DESCRIPTION="A Library for Generating Text, XML, JSON, and HTML Output"
HOMEPAGE="https://juniper.github.io/libxo/libxo-manual.html"

if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/Juniper/libxo.git"
else
SRC_URI="https://github.com/Juniper/libxo/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
fi

LICENSE="BSD-2"
SLOT="0"

BDEPEND="
virtual/pkgconfig
"

src_prepare() {
eapply_user

# sysctl.h isn't available anymore in glibc and the functionality was
# removed from the linux kernel
# https://sourceware.org/pipermail/glibc-cvs/2020q2/069366.html
sed -i -e 's|#include <sys/sysctl.h>||' libxo/xo_syslog.c || die

eautoreconf
}

src_test() {
emake test
}
7 changes: 7 additions & 0 deletions sys-libs/libxo/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<upstream>
<remote-id type="github">Juniper/libxo</remote-id>
</upstream>
</pkgmetadata>

0 comments on commit 1887bf1

Please sign in to comment.