You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.4 KiB
68 lines
1.4 KiB
2 years ago
|
# Copyright 1999-2022 Gentoo Authors
|
||
3 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
2 years ago
|
EAPI=8
|
||
3 years ago
|
|
||
2 years ago
|
# Please bump with app-office/gnucash
|
||
|
|
||
|
CMAKE_MAKEFILE_GENERATOR=emake
|
||
|
inherit cmake optfeature
|
||
3 years ago
|
|
||
|
DESCRIPTION="Documentation package for GnuCash"
|
||
|
HOMEPAGE="https://www.gnucash.org/"
|
||
|
SRC_URI="https://github.com/Gnucash/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||
|
|
||
|
LICENSE="GPL-2 FDL-1.1"
|
||
2 years ago
|
SLOT="0"
|
||
|
KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~riscv ~x86"
|
||
3 years ago
|
LOCALES=( de it ja pt )
|
||
|
IUSE="${LOCALES[*]/#/l10n_}"
|
||
|
|
||
2 years ago
|
BDEPEND="
|
||
3 years ago
|
app-text/docbook-xml-dtd:4.5
|
||
|
app-text/docbook-xsl-stylesheets
|
||
|
dev-libs/libxml2
|
||
|
dev-libs/libxslt
|
||
|
"
|
||
|
|
||
|
src_compile() {
|
||
2 years ago
|
cmake_src_compile -j1
|
||
3 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
|
local doc_type my_lang
|
||
|
|
||
2 years ago
|
for doc_type in manual guide; do
|
||
3 years ago
|
for my_lang in C ${L10N}; do
|
||
2 years ago
|
[[ -z ${my_lang} ]] && continue
|
||
|
|
||
|
case "${my_lang}" in
|
||
3 years ago
|
# Both help and guides translated
|
||
|
C|de|it|pt) ;;
|
||
2 years ago
|
ja|ru) # Only guides translated
|
||
|
if [[ "${doc_type}" == "manual" ]] ; then
|
||
|
elog "Help documentation hasn't been translated for ${my_lang}"
|
||
3 years ago
|
elog "Will do English instead."
|
||
|
continue
|
||
|
fi
|
||
|
;;
|
||
|
*)
|
||
2 years ago
|
die "Invalid locale: ${my_lang}"
|
||
3 years ago
|
;;
|
||
|
esac
|
||
|
|
||
2 years ago
|
emake \
|
||
|
-C "${BUILD_DIR}/${doc_type}/${my_lang}" \
|
||
|
DESTDIR="${D}" \
|
||
|
install
|
||
3 years ago
|
done
|
||
|
done
|
||
|
|
||
|
einstalldocs
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
optfeature "generating PDF files" dev-java/fop
|
||
|
optfeature "viewing the docs" gnome-extra/yelp
|
||
|
}
|