2023-03-27 00:14:41 -04:00
|
|
|
# Copyright 1999-2023 Gentoo Authors
|
2021-01-29 20:22:30 -05:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2023-03-27 00:14:41 -04:00
|
|
|
EAPI=8
|
2021-01-29 20:22:30 -05:00
|
|
|
|
2023-03-27 00:14:41 -04:00
|
|
|
if [[ ${PV} == 9999 ]]; then
|
2021-01-29 20:22:30 -05:00
|
|
|
inherit git-r3
|
|
|
|
EGIT_REPO_URI="https://gitlab.com/jobol/mustach.git"
|
2023-03-27 00:14:41 -04:00
|
|
|
else
|
|
|
|
SRC_URI="https://gitlab.com/jobol/mustach/-/archive/${PV}/${P}.tar.gz"
|
|
|
|
KEYWORDS="~amd64"
|
2021-01-29 20:22:30 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
DESCRIPTION="C implementation of mustache templating"
|
|
|
|
HOMEPAGE="https://gitlab.com/jobol/mustach"
|
|
|
|
LICENSE="ISC"
|
|
|
|
SLOT="0"
|
2021-06-14 01:27:10 -04:00
|
|
|
IUSE="tool json-c jansson"
|
|
|
|
REQUIRED_USE="tool? ( || ( json-c jansson ) )"
|
2021-01-29 20:22:30 -05:00
|
|
|
|
|
|
|
DEPEND="
|
2021-06-14 01:27:10 -04:00
|
|
|
json-c? ( dev-libs/json-c )
|
|
|
|
jansson? ( dev-libs/jansson )
|
2021-01-29 20:22:30 -05:00
|
|
|
"
|
|
|
|
RDEPEND="${DEPEND}"
|
2021-06-14 01:27:10 -04:00
|
|
|
BDEPEND="virtual/pkgconfig"
|
|
|
|
|
|
|
|
SOVER=".1"
|
2021-08-24 16:02:56 -04:00
|
|
|
SOVEREV=".1.2"
|
2021-01-29 20:22:30 -05:00
|
|
|
|
|
|
|
src_compile() {
|
2021-06-14 01:27:10 -04:00
|
|
|
emake jsonc=$(usex json-c) cjson=no jansson=$(usex jansson) libs=all
|
2021-01-29 20:22:30 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2021-06-14 01:27:10 -04:00
|
|
|
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}"
|
2021-01-29 20:22:30 -05:00
|
|
|
}
|