diff options
author | Ulrich Müller <ulm@gentoo.org> | 2016-06-25 11:33:34 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2016-06-25 11:55:37 +0200 |
commit | f87ba8e8f6692952d0aad511aaa389737d5d2092 (patch) | |
tree | 8a39f23d4ad8f871933c8076cfe87b06bdc8cf18 /app-doc | |
parent | app-backup/tsm: Migrate from LINGUAS to L10N. (diff) | |
download | gentoo-f87ba8e8f6692952d0aad511aaa389737d5d2092.tar.gz gentoo-f87ba8e8f6692952d0aad511aaa389737d5d2092.tar.bz2 gentoo-f87ba8e8f6692952d0aad511aaa389737d5d2092.zip |
app-doc/kicad-doc: [QA] Various fixes to the ebuild.
vcs-snapshot.eclass is not needed.
Main license is || ( GPL-3+ CC-BY-3.0 ) and some files under GPL-2 only.
Don't change LINGUAS in global scope.
Declare local variables and fix bad assignment in src_configure.
Remove REQUIRED_USE; fall back to a default configuration instead.
Especially global USE_EXPAND variables like LINGUAS or L10N should not
require per-package micro-management of flags.
Package-Manager: portage-2.3.0
Diffstat (limited to 'app-doc')
-rw-r--r-- | app-doc/kicad-doc/kicad-doc-4.0.1.ebuild | 40 | ||||
-rw-r--r-- | app-doc/kicad-doc/kicad-doc-4.0.2.ebuild | 40 |
2 files changed, 50 insertions, 30 deletions
diff --git a/app-doc/kicad-doc/kicad-doc-4.0.1.ebuild b/app-doc/kicad-doc/kicad-doc-4.0.1.ebuild index 4f755f34733d..172bbb2206ed 100644 --- a/app-doc/kicad-doc/kicad-doc-4.0.1.ebuild +++ b/app-doc/kicad-doc/kicad-doc-4.0.1.ebuild @@ -1,27 +1,23 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ EAPI=5 -inherit cmake-utils vcs-snapshot +inherit cmake-utils DESCRIPTION="Electronic Schematic and PCB design tools manuals" -HOMEPAGE="http://www.kicad-pcb.org" +HOMEPAGE="http://www.kicad-pcb.org/" SRC_URI="https://github.com/KiCad/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" -LICENSE="GPL-2" +LICENSE="|| ( GPL-3+ CC-BY-3.0 ) GPL-2" SLOT="0" KEYWORDS="~amd64" -FUSE="html pdf" +IUSE="html pdf" LANGS="en fr it ja nl pl" -LINGUAS="" -for lang in ${LANGS} ; do - LINGUAS="${LINGUAS} linguas_${lang}" +for lang in ${LANGS}; do + IUSE+=" linguas_${lang}" done -IUSE="${FUSE} ${LINGUAS}" - -REQUIRED_USE="( || ( pdf html ) ) ( ^^ ( ${LINGUAS} ) )" DEPEND=">=app-text/asciidoc-8.6.9 app-text/dblatex @@ -40,20 +36,34 @@ src_prepare() { src_configure() { local formats="" local doclang="" + local format lang # construct format string - for format in ${FUSE}; do - use $format && formats+="${format};" + for format in html pdf; do + use ${format} && formats+="${format};" done + if [[ -z ${formats} ]]; then + formats="html;" + ewarn "Neither \"html\" nor \"pdf\" USE flag set, using html." + fi # find out which language is requested for lang in ${LANGS}; do if use linguas_${lang}; then - doclang=${lang} + if [[ -z ${doclang} ]]; then + doclang="${lang}" + else + ewarn "Only one single language can be enabled." \ + "Using \"${doclang}\", ignoring \"${lang}\"." + fi fi done + if [[ -z ${doclang} ]]; then + doclang="en" + ewarn "No language flag set, falling back to \"en\"." + fi - local mycmakeargs+=( + local mycmakeargs=( -DBUILD_FORMATS="${formats}" -DSINGLE_LANGUAGE="${doclang}" ) diff --git a/app-doc/kicad-doc/kicad-doc-4.0.2.ebuild b/app-doc/kicad-doc/kicad-doc-4.0.2.ebuild index 4f755f34733d..172bbb2206ed 100644 --- a/app-doc/kicad-doc/kicad-doc-4.0.2.ebuild +++ b/app-doc/kicad-doc/kicad-doc-4.0.2.ebuild @@ -1,27 +1,23 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ EAPI=5 -inherit cmake-utils vcs-snapshot +inherit cmake-utils DESCRIPTION="Electronic Schematic and PCB design tools manuals" -HOMEPAGE="http://www.kicad-pcb.org" +HOMEPAGE="http://www.kicad-pcb.org/" SRC_URI="https://github.com/KiCad/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" -LICENSE="GPL-2" +LICENSE="|| ( GPL-3+ CC-BY-3.0 ) GPL-2" SLOT="0" KEYWORDS="~amd64" -FUSE="html pdf" +IUSE="html pdf" LANGS="en fr it ja nl pl" -LINGUAS="" -for lang in ${LANGS} ; do - LINGUAS="${LINGUAS} linguas_${lang}" +for lang in ${LANGS}; do + IUSE+=" linguas_${lang}" done -IUSE="${FUSE} ${LINGUAS}" - -REQUIRED_USE="( || ( pdf html ) ) ( ^^ ( ${LINGUAS} ) )" DEPEND=">=app-text/asciidoc-8.6.9 app-text/dblatex @@ -40,20 +36,34 @@ src_prepare() { src_configure() { local formats="" local doclang="" + local format lang # construct format string - for format in ${FUSE}; do - use $format && formats+="${format};" + for format in html pdf; do + use ${format} && formats+="${format};" done + if [[ -z ${formats} ]]; then + formats="html;" + ewarn "Neither \"html\" nor \"pdf\" USE flag set, using html." + fi # find out which language is requested for lang in ${LANGS}; do if use linguas_${lang}; then - doclang=${lang} + if [[ -z ${doclang} ]]; then + doclang="${lang}" + else + ewarn "Only one single language can be enabled." \ + "Using \"${doclang}\", ignoring \"${lang}\"." + fi fi done + if [[ -z ${doclang} ]]; then + doclang="en" + ewarn "No language flag set, falling back to \"en\"." + fi - local mycmakeargs+=( + local mycmakeargs=( -DBUILD_FORMATS="${formats}" -DSINGLE_LANGUAGE="${doclang}" ) |