From: Elan Ruusamäe Date: Wed, 20 Oct 2010 10:12:49 +0000 (+0000) Subject: - Set LANGUAGES dynamically at build time, this allows easily add new languages just... X-Git-Tag: auto/th/clementine-0_5_3-3~3 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fclementine.git;a=commitdiff_plain;h=8119713e4814251f4a7940a24efd157b15612c50 - Set LANGUAGES dynamically at build time, this allows easily add new languages just by placing .po into src/translations dir Changed files: build-languages-dynamic.patch -> 1.1 --- diff --git a/build-languages-dynamic.patch b/build-languages-dynamic.patch new file mode 100644 index 0000000..2a6841e --- /dev/null +++ b/build-languages-dynamic.patch @@ -0,0 +1,54 @@ +Set LANGUAGES dynamically at build time, this allows easily add new languages +just by placing .po into src/translations dir + +Author: Elan Ruusamäe +--- clementine-0.5.3/src/CMakeLists.txt~ 2010-10-20 13:10:28.276756134 +0300 ++++ clementine-0.5.3/src/CMakeLists.txt 2010-10-20 13:10:33.456551043 +0300 +@@ -327,41 +327,12 @@ + + set(LINGUAS "All" CACHE STRING "A space-seperated list of translations to compile in to Clementine, or \"None\".") + if (LINGUAS STREQUAL "All") +- set (LANGUAGES +- ar +- bg +- ca +- cs +- da +- de +- el +- en_CA +- en_GB +- es +- fi +- fr +- gl +- hu +- it +- kk +- lt +- nb +- nl +- oc +- pl +- pt +- pt_BR +- ro +- ru +- sk +- sl +- sr +- sv +- tr +- uk +- zh_CN +- zh_TW +- ) ++ # build LANGUAGES from all existing .po files ++ file(GLOB pofiles translations/*.po) ++ foreach(pofile ${pofiles}) ++ get_filename_component(lang ${pofile} NAME_WE) ++ list(APPEND LANGUAGES ${lang}) ++ endforeach(pofile) + else (LINGUAS STREQUAL "All") + if (NOT LINGUAS OR LINGUAS STREQUAL "None") + set (LANGUAGES "")