diff options
Diffstat (limited to 'app-doc/kicad-doc/kicad-doc-4.0.1.ebuild')
-rw-r--r-- | app-doc/kicad-doc/kicad-doc-4.0.1.ebuild | 40 |
1 files changed, 25 insertions, 15 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}" ) |