commit:     de3908baf258bf900fe251e9c4fb15644d84f94d
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun May  4 22:00:16 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun May  4 22:05:49 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de3908ba

media-gfx/librecad: Drop plocales mishandling

Just set LRELEASE properly instead.

Don't add this back unless you enlist as maintainer.

Bug: https://bugs.gentoo.org/847394
Bug: https://bugs.gentoo.org/947545
Bug: https://bugs.gentoo.org/955171
Closes: https://bugs.gentoo.org/955436
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-gfx/librecad/librecad-2.2.1.1.ebuild         | 28 +++-------------------
 .../librecad-2.2.2_alpha1_pre20250501.ebuild       | 28 +++-------------------
 2 files changed, 6 insertions(+), 50 deletions(-)

diff --git a/media-gfx/librecad/librecad-2.2.1.1.ebuild 
b/media-gfx/librecad/librecad-2.2.1.1.ebuild
index 3e2c3e9bade4..726b0b098d9a 100644
--- a/media-gfx/librecad/librecad-2.2.1.1.ebuild
+++ b/media-gfx/librecad/librecad-2.2.1.1.ebuild
@@ -3,8 +3,7 @@
 
 EAPI=8
 
-PLOCALES="ar ca cs da de el en en_au es es_ar es_bo es_cl es_co es_cr es_do 
es_ec es_gt es_hn es_mx es_ni es_pa es_pe es_pr es_py es_sv es_us es_uy es_ve 
et eu fi fr gl he hi hu id_ID it ja ka ko lv mk nl no pa pl pt_br pt_pt ro_ro 
ru sk sl sq_al sr sv ta th tr uk zh_cn zh_tw"
-inherit desktop edo plocale qmake-utils
+inherit desktop qmake-utils
 
 DESCRIPTION="Generic 2D CAD program"
 HOMEPAGE="https://www.librecad.org/";
@@ -43,35 +42,14 @@ BDEPEND="
 src_prepare() {
        default
 
-       # Stock script doesn't work correctly on Gentoo (see bug #847394)
-       # and also it compiles all translations regardles of selected locales.
-       # To avoid this just comment out locale building and do it manually
-       sed -i -e '/LRELEASE/s!^!# !' scripts/postprocess-unix.sh || die
-
-       plocale_find_changes 'librecad/ts' 'librecad_' '.ts'
+       sed -e "/^LRELEASE/s:lrelease:$(qt6_get_bindir)/lrelease:" \
+               -i scripts/postprocess-unix.sh || die
 }
 
 src_configure() {
        eqmake5 -r
 }
 
-src_compile() {
-       default
-
-       build_locale() {
-               local lrelease="$(qt5_get_bindir)/lrelease"
-               edo "${lrelease}" "librecad/ts/librecad_${1}.ts" \
-                       -qm "unix/resources/qm/librecad_${1}.qm"
-               edo "${lrelease}" "plugins/ts/plugins_${1}.ts" \
-                       -qm "unix/resources/qm/plugins_${1}.qm"
-       }
-
-       plocale_for_each_locale build_locale
-       # We want the en locale to be always present. Otherwise it could
-       # be impossible to select the English command set which is quite 
crucial.
-       has en $(plocale_get_locales) || build_locale en
-}
-
 src_install() {
        dobin unix/librecad
        use tools && dobin unix/ttf2lff

diff --git a/media-gfx/librecad/librecad-2.2.2_alpha1_pre20250501.ebuild 
b/media-gfx/librecad/librecad-2.2.2_alpha1_pre20250501.ebuild
index a4e69b392ee1..f5278882f1cd 100644
--- a/media-gfx/librecad/librecad-2.2.2_alpha1_pre20250501.ebuild
+++ b/media-gfx/librecad/librecad-2.2.2_alpha1_pre20250501.ebuild
@@ -4,8 +4,7 @@
 EAPI=8
 
 COMMIT=2f5b68f347ba50fd8d6c4fee437cfedff63848b4
-PLOCALES="ar ca cs da de el en en_au es es_ar es_bo es_cl es_co es_cr es_do 
es_ec es_gt es_hn es_mx es_ni es_pa es_pe es_pr es_py es_sv es_us es_uy es_ve 
et eu fi fr gl he hi hu id_ID it ja ka ko lv mk nl no pa pl pt_br pt_pt ro_ro 
ru sk sl sq_al sr sv ta th tr uk zh_cn zh_tw"
-inherit desktop edo plocale qmake-utils
+inherit desktop qmake-utils
 
 DESCRIPTION="Generic 2D CAD program"
 HOMEPAGE="https://www.librecad.org/";
@@ -41,35 +40,14 @@ BDEPEND="
 src_prepare() {
        default
 
-       # Stock script doesn't work correctly on gentoo (see bug #847394)
-       # and also it compiles all translations regardles of selected locales.
-       # To avoid this just comment out locale building and do it manually
-       sed -i -e '/LRELEASE/s!^!# !' scripts/postprocess-unix.sh || die
-
-       plocale_find_changes 'librecad/ts' 'librecad_' '.ts'
+       sed -e "/^LRELEASE/s:lrelease:$(qt6_get_bindir)/lrelease:" \
+               -i scripts/postprocess-unix.sh || die
 }
 
 src_configure() {
        eqmake6 -r
 }
 
-src_compile() {
-       default
-
-       build_locale() {
-               local lrelease="$(qt6_get_bindir)/lrelease"
-               edo "${lrelease}" "librecad/ts/librecad_${1}.ts" \
-                       -qm "unix/resources/qm/librecad_${1}.qm"
-               edo "${lrelease}" "plugins/ts/plugins_${1}.ts" \
-                       -qm "unix/resources/qm/plugins_${1}.qm"
-       }
-
-       plocale_for_each_locale build_locale
-       # We want the en locale to be always present. Otherwise it could
-       # be impossible to select the English command set which is quite 
crucial.
-       has en $(plocale_get_locales) || build_locale en
-}
-
 src_install() {
        dobin unix/librecad
        use tools && dobin unix/ttf2lff

Reply via email to