commit: f87ba8e8f6692952d0aad511aaa389737d5d2092 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Sat Jun 25 09:33:34 2016 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Sat Jun 25 09:55:37 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f87ba8e8
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 app-doc/kicad-doc/kicad-doc-4.0.1.ebuild | 40 ++++++++++++++++++++------------ 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 4f755f3..172bbb2 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 4f755f3..172bbb2 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}" )
