Files
guru/dev-libs/cglm/cglm-0.8.2-r1.ebuild
Oliver Freyermuth 65ce8e0ffc dev-libs/cglm: Backport upstream fix to 0.8.2.
This fixes a typo in 0.8.2, causing a warning
and actual misbehaviour.

Closes: https://bugs.gentoo.org/787677
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
2021-05-02 15:06:33 +02:00

54 lines
1.1 KiB
Bash

# Copyright 2019-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit meson
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/recp/cglm.git"
else
SRC_URI="https://github.com/recp/cglm/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
fi
DESCRIPTION="OpenGL Mathematics (glm) for C"
HOMEPAGE="https://github.com/recp/cglm"
LICENSE="MIT"
SLOT="0"
IUSE="doc"
BDEPEND="dev-util/meson
doc? ( dev-python/sphinx )"
PATCHES=(
# Upstream patch: https://github.com/recp/cglm/commit/13269f4af8d3c95220f97746c968eac3ba122a32
"${FILESDIR}"/${PN}-0.8.2-fix-vec3-vec4.patch
)
src_configure() {
local emesonargs=(
"-Dwerror=false"
)
meson_src_configure
}
src_compile() {
default
meson_src_compile
if use doc; then
einfo "Building documentation ..."
local doc_dir="${S}/docs"
cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
sphinx-build -b html source build || die "Building documentation failed!"
fi
}
src_install() {
use doc && local HTML_DOCS=( "${S}/docs/build/." )
default
meson_src_install
}