mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-20 12:33:40 -04:00
dev-util/blueprint-compiler: Sync live ebuild
Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
This commit is contained in:
@@ -5,21 +5,15 @@ EAPI=8
|
|||||||
|
|
||||||
PYTHON_COMPAT=( python3_{9..10} )
|
PYTHON_COMPAT=( python3_{9..10} )
|
||||||
|
|
||||||
inherit meson python-r1
|
inherit meson python-single-r1
|
||||||
|
|
||||||
if [[ ${PV} == *9999 ]]; then
|
if [[ ${PV} == *9999 ]]; then
|
||||||
inherit git-r3
|
inherit git-r3
|
||||||
EGIT_REPO_URI="https://gitlab.gnome.org/jwestman/blueprint-compiler.git"
|
EGIT_REPO_URI="https://gitlab.gnome.org/jwestman/blueprint-compiler.git"
|
||||||
else
|
else
|
||||||
# Upstream has not started to tag releases yet, so each keyworded (normal)
|
SRC_URI="https://gitlab.gnome.org/jwestman/blueprint-compiler/-/archive/v${PV}/blueprint-compiler-v${PV}.tar.bz2"
|
||||||
# ebuild is to be based on a Git commit snapshot at this moment.
|
S="${WORKDIR}/${PN}-v${PV}"
|
||||||
# Live ebuild: Might be intentionally left blank
|
|
||||||
# Normal ebuild: Fill in commit SHA-1 object name to this variable's value
|
|
||||||
GIT_COMMIT=""
|
|
||||||
KEYWORDS="~amd64"
|
KEYWORDS="~amd64"
|
||||||
|
|
||||||
SRC_URI="https://gitlab.gnome.org/jwestman/blueprint-compiler/-/archive/${GIT_COMMIT}/blueprint-compiler-${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
|
|
||||||
S="${WORKDIR}/${PN}-${GIT_COMMIT}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DESCRIPTION="Compiler for Blueprint, a markup language for GTK user interfaces"
|
DESCRIPTION="Compiler for Blueprint, a markup language for GTK user interfaces"
|
||||||
@@ -35,8 +29,10 @@ RESTRICT="!test? ( test )"
|
|||||||
BDEPEND="
|
BDEPEND="
|
||||||
${PYTHON_DEPS}
|
${PYTHON_DEPS}
|
||||||
doc? (
|
doc? (
|
||||||
dev-python/sphinx[${PYTHON_USEDEP}]
|
$(python_gen_cond_dep '
|
||||||
dev-python/furo[${PYTHON_USEDEP}]
|
dev-python/sphinx[${PYTHON_USEDEP}]
|
||||||
|
dev-python/furo[${PYTHON_USEDEP}]
|
||||||
|
')
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
|
|
||||||
@@ -54,45 +50,12 @@ src_configure() {
|
|||||||
local emesonargs=(
|
local emesonargs=(
|
||||||
$(meson_use doc docs)
|
$(meson_use doc docs)
|
||||||
)
|
)
|
||||||
python_foreach_impl meson_src_configure
|
meson_src_configure
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
python_foreach_impl meson_src_compile
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
python_foreach_impl meson_src_test
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
my_src_install() {
|
use doc && HTML_DOCS=( "${BUILD_DIR}/docs"/* )
|
||||||
local exe="${ED}/usr/bin/${PN}"
|
meson_src_install
|
||||||
|
python_optimize "${D}/usr/share/${PN}"
|
||||||
# Meson installs a Python script at ${ED}/usr/bin/${PN}; on
|
python_fix_shebang "${D}/usr/bin/${PN}"
|
||||||
# Gentoo, the script should go into ${ED}/usr/lib/python-exec,
|
|
||||||
# and ${ED}/usr/bin/${PN} should be a symbolic link to
|
|
||||||
# ${ED}/usr/lib/python-exec/python-exec2.
|
|
||||||
#
|
|
||||||
# When multiple PYTHON_TARGETS are enabled, then after the
|
|
||||||
# package has been installed for one Python implementation,
|
|
||||||
# Meson will follow the ${ED}/usr/bin/${PN} symbolic link and
|
|
||||||
# install the script at ${ED}/usr/lib/python-exec/python-exec2
|
|
||||||
# for the remaining implementations, leading to file collision.
|
|
||||||
if [[ -L "${exe}" ]]; then
|
|
||||||
rm -v "${exe}" || die "Failed to remove symbolic link ${exe}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
meson_src_install
|
|
||||||
python_doscript "${exe}"
|
|
||||||
python_optimize
|
|
||||||
|
|
||||||
# Install Sphinx-generated documentation only once
|
|
||||||
# since the documentation is supposed to be identical
|
|
||||||
# between different Python implementations
|
|
||||||
use doc && HTML_DOCS=( "${BUILD_DIR}/docs"/* )
|
|
||||||
}
|
|
||||||
|
|
||||||
python_foreach_impl my_src_install
|
|
||||||
einstalldocs
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user