mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-22 05:23:01 -04:00
net-libs/kcgi: fix ldflags and deps, bump eapi
Closes: https://bugs.gentoo.org/800917 Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
@@ -1,47 +1,57 @@
|
||||
# Copyright 2019-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EAPI=8
|
||||
|
||||
inherit multiprocessing toolchain-funcs
|
||||
|
||||
DESCRIPTION="minimal CGI library for web applications"
|
||||
DESCRIPTION="Minimal CGI library for web applications"
|
||||
HOMEPAGE="https://kristaps.bsd.lv/kcgi/"
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/kristapsdz/kcgi"
|
||||
EGIT_REPO_URI="https://github.com/kristapsdz/${PN}"
|
||||
else
|
||||
SRC_URI="https://kristaps.bsd.lv/kcgi/snapshots/${P}.tgz"
|
||||
SRC_URI="https://kristaps.bsd.lv/${PN}/snapshots/${P}.tgz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="ISC"
|
||||
SLOT="0"
|
||||
IUSE="test"
|
||||
IUSE="static-libs test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
BDEPEND="sys-devel/bmake"
|
||||
DEPEND="
|
||||
test? ( net-misc/curl[static-libs] )
|
||||
RDEPEND="
|
||||
app-crypt/libmd
|
||||
virtual/libcrypt
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( net-misc/curl[static-libs(-)] )
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${PN}-$(ver_cut 1-2)-ldflags.patch )
|
||||
|
||||
src_prepare() {
|
||||
export CC="$(tc-getCC)"
|
||||
export AR="$(tc-getAR)"
|
||||
default
|
||||
|
||||
# disable failing tests
|
||||
sed -e '/\s*regress\/test-debug-.*/d' -i Makefile || die
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
./configure PREFIX="${EPREFIX}/usr" \
|
||||
MANDIR="${EPREFIX}/usr/share/man" \
|
||||
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
|
||||
SBINDIR="${EPREFIX}/usr/bin" || die
|
||||
echo 'LDADD_LIB_SOCKET += ${LDFLAGS}' >> Makefile.configure || die
|
||||
tc-export CC AR
|
||||
|
||||
# note: not an autoconf configure script
|
||||
conf_args=(
|
||||
CPPFLAGS="${CPPFLAGS}"
|
||||
LDFLAGS="${LDFLAGS}"
|
||||
PREFIX="${EPREFIX}"/usr
|
||||
MANDIR="${EPREFIX}"/usr/share/man
|
||||
LIBDIR="${EPREFIX}"/usr/$(get_libdir)
|
||||
SBINDIR="${EPREFIX}"/usr/sbin
|
||||
)
|
||||
./configure "${conf_args[@]}" || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
@@ -49,13 +59,21 @@ src_compile() {
|
||||
}
|
||||
|
||||
src_test() {
|
||||
bmake -j$(makeopts_jobs) regress || die
|
||||
# TODO: add `afl` tests
|
||||
bmake -j$(makeopts_jobs) regress || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
bmake -j$(makeopts_jobs) \
|
||||
DESTDIR="${D}" \
|
||||
MANDIR=/usr/share/man \
|
||||
DATADIR="/usr/share/doc/${PF}/examples" \
|
||||
install || die
|
||||
find "${ED}/usr/$(get_libdir)" -name "*.a" -delete || die
|
||||
|
||||
# kcgi does not install shared libraries
|
||||
if ! use static-libs; then
|
||||
find "${ED}" -name '*.a' -delete || die
|
||||
find "${ED}" -name '*.pc' -delete || die
|
||||
fi
|
||||
|
||||
einstalldocs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user