gentoo ebuild

feed
Avril 4 years ago
parent 5f2e3a5b5b
commit 460d2b0081
Signed by: flanchan
GPG Key ID: 966FE03CC0E0B199

@ -190,14 +190,28 @@ DESCRIPTION="Generate string of text from Markov chain fed by stdin"
# Double check the homepage as the cargo_metadata crate
# does not provide this value so instead repository is used
HOMEPAGE="https://flanchan.moe/markov/"
SRC_URI="$(cargo_crate_uris ${CRATES}) https://git.flanchan.moe/attachments/c868a695-4aa2-4a9b-a538-a20833263fad -> markov-0.7.0.crate"
SRC_URI="$(cargo_crate_uris ${CRATES}) https://git.flanchan.moe/attachments/cf0b9095-2403-465b-b3aa-61b121134c84 -> markov-0.7.1.crate"
RESTRICT="mirror"
# License set may be more restrictive as OR is not respected
# use cargo-license for a more accurate license picture
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
IUSE="+compress-chain +split-newlines +api split-sentance always-aggregate hog-buffer"
DEPEND=""
DEPEND="compress-chain? ( app-arch/bzip2 )"
RDEPEND=""
src_configure() {
local myfeatures=(
$(usev compress-chain)
$(usev split-newlines)
$(usev api)
$(usev split-sentance)
$(usev always-aggregate)
$(usev hog-buffer)
)
#TODO: This hack slows compilation down I think, but without it ld fails so... We should add cargo buildscript to do this instead
use compress-chain && export RUSTFLAGS="${RUSTFLAGS} -ldylib=bz2"
cargo_src_configure --no-default-features
}

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>flanchan@cumallover.me</email>
</maintainer>
<use>
<flag name="compress-chain">Compress chain when saving/loading</flag>
<flag name="split-newlines">Treat each new line as a new set to feed</flag>
<flag name="api">Enable /api route</flag>
<flag name="split-sentance">Use sentance split by default (not recommended)</flag>
<flag name="always-aggregate">Always operate on aggregated request body (can speed up writes at the cost of memory)</flag>
<flag name="hog-buffer">Acquire chain mutex write lock while streaming body (can speed up writes, but can also allow for DoS)</flag></use>
</pkgmetadata>
Loading…
Cancel
Save