1
0
flewkey-overlay/dev-libs/mustach/mustach-9999.ebuild
Ryan Fox cf99cae6c3
dev-libs/mustach: Bump to 1.2.0
Added a soname as well. Will send a patch upstream.

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Ryan Fox <flewkey@2a03.party>
2021-08-24 20:02:56 +00:00

53 lines
1.2 KiB
Bash

# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
if [[ ${PV} != *9999* ]]; then
SRC_URI="https://gitlab.com/jobol/mustach/-/archive/${PV}/${P}.tar.gz"
KEYWORDS="~amd64"
else
inherit git-r3
EGIT_REPO_URI="https://gitlab.com/jobol/mustach.git"
fi
DESCRIPTION="C implementation of mustache templating"
HOMEPAGE="https://gitlab.com/jobol/mustach"
LICENSE="ISC"
SLOT="0"
IUSE="tool json-c jansson"
REQUIRED_USE="tool? ( || ( json-c jansson ) )"
DEPEND="
json-c? ( dev-libs/json-c )
jansson? ( dev-libs/jansson )
"
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}/${PN}-1.2.0-soname.patch"
)
SOVER=".1"
SOVEREV=".1.2"
src_compile() {
emake jsonc=$(usex json-c) cjson=no jansson=$(usex jansson) libs=all
}
src_install() {
LIBDIR="/usr/$(get_libdir)"
dodir "${LIBDIR}/pkgconfig"
for dso in "${S}/"*".so${SOVEREV}"; do
dolib.so "${dso}"
dso=${dso##*/}
dosym "${dso}" "${LIBDIR}/${dso::-2}"
dosym "${dso}" "${LIBDIR}/${dso::-4}"
done
use tool && dobin "${S}/mustach"
cp "${S}/libmustach"*".pc" "${D}${LIBDIR}/pkgconfig"
gzip -d "${S}/mustach${SOVER}.gz"
doman "${S}/mustach${SOVER}"
}