calchan 14/05/07 20:01:21 Modified: ChangeLog tagainijisho-1.0.2.ebuild Log: Add LINGUAS support. (Portage version: 2.2.10/cvs/Linux x86_64, unsigned Manifest commit)
Revision Changes Path 1.3 app-i18n/tagainijisho/ChangeLog file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-i18n/tagainijisho/ChangeLog?rev=1.3&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-i18n/tagainijisho/ChangeLog?rev=1.3&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-i18n/tagainijisho/ChangeLog?r1=1.2&r2=1.3 Index: ChangeLog =================================================================== RCS file: /var/cvsroot/gentoo-x86/app-i18n/tagainijisho/ChangeLog,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ChangeLog 7 May 2014 14:24:23 -0000 1.2 +++ ChangeLog 7 May 2014 20:01:21 -0000 1.3 @@ -1,6 +1,9 @@ # ChangeLog for app-i18n/tagainijisho # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-i18n/tagainijisho/ChangeLog,v 1.2 2014/05/07 14:24:23 calchan Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-i18n/tagainijisho/ChangeLog,v 1.3 2014/05/07 20:01:21 calchan Exp $ + + 07 May 2014; Denis Dupeyron <[email protected]> tagainijisho-1.0.2.ebuild: + Add LINGUAS support. 07 May 2014; Denis Dupeyron <[email protected]> tagainijisho-1.0.2.ebuild: Tagaini Jinsho depends on sqlite3 but I can't seem to be able to completely 1.3 app-i18n/tagainijisho/tagainijisho-1.0.2.ebuild file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-i18n/tagainijisho/tagainijisho-1.0.2.ebuild?rev=1.3&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-i18n/tagainijisho/tagainijisho-1.0.2.ebuild?rev=1.3&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-i18n/tagainijisho/tagainijisho-1.0.2.ebuild?r1=1.2&r2=1.3 Index: tagainijisho-1.0.2.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/app-i18n/tagainijisho/tagainijisho-1.0.2.ebuild,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- tagainijisho-1.0.2.ebuild 7 May 2014 14:24:23 -0000 1.2 +++ tagainijisho-1.0.2.ebuild 7 May 2014 20:01:21 -0000 1.3 @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-i18n/tagainijisho/tagainijisho-1.0.2.ebuild,v 1.2 2014/05/07 14:24:23 calchan Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-i18n/tagainijisho/tagainijisho-1.0.2.ebuild,v 1.3 2014/05/07 20:01:21 calchan Exp $ EAPI=5 @@ -19,6 +19,33 @@ dev-db/sqlite:3" RDEPEND="${DEPEND}" +pkg_linguas=( ar cs de es fi_FI fr it nb nl pt ru sv th tr vi ) +IUSE+=" ${pkg_linguas[@]/#/linguas_}" + +src_configure() { + # GUI linguas + # en is not optional, and build fails if none other then en is set, so adding ja as non-optional too + # linguas undeclared in IUSE will trigger an error, which is a handy check + for lingua in $(ls -1 i18n/*.ts | sed -e 's/.*tagainijisho_\(.*\)\.ts/\1/' | grep -v en | grep -v ja); do + if ! use linguas_${lingua}; then + rm i18n/tagainijisho_${lingua}.ts || die + fi + done + + # Dictionary linguas + # en is not optional here either, but nothing special needs to be done + # here too, linguas undeclared in IUSE will trigger an error + local cmake_linguas + for lingua in $(sed -e 's/;/ /g' -ne '/set(DICT_LANG ".*")/s/.*"\(.*\)".*/\1/p' CMakeLists.txt); do + if use linguas_${lingua}; then + cmake_linguas+="${lingua};" + fi + done + mycmakeargs=( -DDICT_LANG=${cmake_linguas} ) + + cmake-utils_src_configure +} + pkg_preinst() { gnome2_icon_savelist }
