From 243ee473e2e6153ba2d927c9e781150221d72d6e Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Sun, 7 May 2023 08:04:00 +0200 Subject: app-doc/gimp-help: Add IUSE="nls" and fix LINGUAS logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow standard gettext behavior: - USE="-nls": build only English documentation (and ignore LINGUAS) - USE="nls" and unset LINGUAS: build all available languages - USE="nls" and empty LINGUAS: build only English - USE="nls" and nonempty LINGUAS: build listed languages if supported See also the following mailing list posting for an explanation: https://archives.gentoo.org/gentoo-dev/message/38914ce4a7a228d2d29fb623346fba10#L29 Bug: https://bugs.gentoo.org/891709 Signed-off-by: Ulrich Müller --- app-doc/gimp-help/gimp-help-2.10.34-r1.ebuild | 65 ----------------------- app-doc/gimp-help/gimp-help-2.10.34-r2.ebuild | 75 +++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 65 deletions(-) delete mode 100644 app-doc/gimp-help/gimp-help-2.10.34-r1.ebuild create mode 100644 app-doc/gimp-help/gimp-help-2.10.34-r2.ebuild diff --git a/app-doc/gimp-help/gimp-help-2.10.34-r1.ebuild b/app-doc/gimp-help/gimp-help-2.10.34-r1.ebuild deleted file mode 100644 index 2837213514fe..000000000000 --- a/app-doc/gimp-help/gimp-help-2.10.34-r1.ebuild +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{9..11} ) -inherit python-any-r1 - -DESCRIPTION="GNU Image Manipulation Program help files" -HOMEPAGE="https://docs.gimp.org/" -SRC_URI="mirror://gimp/help/${P}.tar.bz2" - -LICENSE="FDL-1.2" -SLOT="2" -KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" -IUSE="" - -BDEPEND=" - ${PYTHON_DEPS} - $(python_gen_any_dep 'dev-libs/libxml2[python,${PYTHON_USEDEP}]') - app-text/docbook-xml-dtd - dev-lang/perl - dev-libs/libxslt - gnome-base/librsvg - sys-devel/gettext -" - -DOCS=( AUTHORS COPYING NEWS README ) - -python_check_deps() { - python_has_version "dev-libs/libxml2[python,${PYTHON_USEDEP}]" -} - -pkg_setup() { - # See bug: 891709 - if [[ -z "${LINGUAS}" ]] ; then - export LINGUAS="en" - - ewarn "The 'LINGUAS' environment variable isn't setup in '/etc/portage/make.conf'," - ewarn "therefore only the generic ('en') documentation will be built." - ewarn "To build ${PN} for other languages please setup 'LINGUAS' variable" - ewarn "or assign it to 'L10N' variable if available, i.e. LINGUAS=\"\${L10N}\"" - ewarn "The following languages are supported for ${PN}:" - ewarn "'ca cs da de el en en_GB es fa fi fr hr hu it ja ko lt nl nn pt pt_BR ro ru sl sv uk zh_CN'" - ewarn "For more details please read:" - ewarn "https://wiki.gentoo.org/wiki/Localization/Guide#LINGUAS" - fi -} - -src_configure() { - econf --without-gimp -} - -src_compile() { - # See bug: 833566 - python_export_utf8_locale - # Affected with bugs: 677198, 876205. Set "emake -j1" - emake -j1 -} - -src_install() { - # See bug: 905693 - emake -j1 DESTDIR="${D}" install - einstalldocs -} diff --git a/app-doc/gimp-help/gimp-help-2.10.34-r2.ebuild b/app-doc/gimp-help/gimp-help-2.10.34-r2.ebuild new file mode 100644 index 000000000000..9bb1d39037c8 --- /dev/null +++ b/app-doc/gimp-help/gimp-help-2.10.34-r2.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +inherit python-any-r1 + +DESCRIPTION="GNU Image Manipulation Program help files" +HOMEPAGE="https://docs.gimp.org/" +SRC_URI="mirror://gimp/help/${P}.tar.bz2" + +LICENSE="FDL-1.2" +SLOT="2" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="nls" + +BDEPEND=" + ${PYTHON_DEPS} + $(python_gen_any_dep 'dev-libs/libxml2[python,${PYTHON_USEDEP}]') + app-text/docbook-xml-dtd + dev-lang/perl + dev-libs/libxslt + gnome-base/librsvg + sys-devel/gettext +" + +DOCS=( AUTHORS COPYING NEWS README ) + +python_check_deps() { + python_has_version "dev-libs/libxml2[python,${PYTHON_USEDEP}]" +} + +pkg_setup() { + # The upstream build system isn't pure gettext and doesn't distinguish + # between empty and unset LINGUAS. Default to English only if either + # nls is unset or if LINGUAS exists but is empty. #891709 + if ! use nls || [[ -v LINGUAS && -z ${LINGUAS} ]]; then + export LINGUAS="en" + elif [[ ! -v LINGUAS ]]; then + local line + while read line; do ewarn "${line}"; done <<-EOF + The "LINGUAS" variable is unset in your configuration, + but the "nls" USE flag is set. Therefore, documentation for + *all* languages will be built, which may take quite some time. + If you want to install documentation for a defined list + of languages, please assign "LINGUAS" accordingly. + The following languages are supported for ${CATEGORY}/${PN}: + "ca cs da de el en en_GB es fa fi fr hr hu it ja ko lt nl nn + pt pt_BR ro ru sl sv uk zh_CN" + If you want to install only the English documentation, it is + recommended to unset the "nls" USE flag for ${CATEGORY}/${PN}. + + For more details please read: + https://wiki.gentoo.org/wiki/Localization/Guide#LINGUAS + EOF + fi +} + +src_configure() { + econf --without-gimp +} + +src_compile() { + # See bug: 833566 + python_export_utf8_locale + # Affected with bugs: 677198, 876205. Set "emake -j1" + emake -j1 +} + +src_install() { + # See bug: 905693 + emake -j1 DESTDIR="${D}" install + einstalldocs +} -- cgit v1.2.3-65-gdbad