2021-06-14 01:27:10 -04:00
|
|
|
# Copyright 1999-2021 Gentoo Authors
|
2021-01-29 20:22:30 -05:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=7
|
|
|
|
|
|
|
|
if [[ ${PV} != *9999* ]]; then
|
2021-06-14 01:27:10 -04:00
|
|
|
SRC_URI="https://gitlab.com/jobol/mustach/-/archive/${PV}/${P}.tar.gz"
|
2021-01-29 20:22:30 -05:00
|
|
|
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"
|
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"
|
|
|
|
SOVEREV=".1.1"
|
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
|
|
|
}
|