summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Repository.mk1
-rw-r--r--i18nlangtag/Executable_localestr.mk29
-rw-r--r--i18nlangtag/Module_i18nlangtag.mk9
-rw-r--r--i18nlangtag/source/localestr/localestr.cxx20
-rwxr-xr-xsolenv/bin/localestr17
-rw-r--r--solenv/gbuild/AllLangMoTarget.mk9
6 files changed, 20 insertions, 65 deletions
diff --git a/Repository.mk b/Repository.mk
index c4d89a7c19f0..85388801b5f2 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -42,7 +42,6 @@ $(eval $(call gb_Helper_register_executables,NONE, \
libtest \
lngconvex \
localize \
- localestr \
makedepend \
mbsdiff \
mork_helper \
diff --git a/i18nlangtag/Executable_localestr.mk b/i18nlangtag/Executable_localestr.mk
deleted file mode 100644
index 99195ffc7b80..000000000000
--- a/i18nlangtag/Executable_localestr.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Executable_Executable,localestr))
-
-$(eval $(call gb_Executable_use_api,localestr,\
- offapi \
- udkapi \
-))
-
-$(eval $(call gb_Executable_use_external,localestr,liblangtag))
-
-$(eval $(call gb_Executable_use_libraries,localestr,\
- i18nlangtag \
- sal \
-))
-
-$(eval $(call gb_Executable_add_exception_objects,localestr,\
- i18nlangtag/source/localestr/localestr \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/i18nlangtag/Module_i18nlangtag.mk b/i18nlangtag/Module_i18nlangtag.mk
index a58f8f9bc608..edd2e1d2e2a9 100644
--- a/i18nlangtag/Module_i18nlangtag.mk
+++ b/i18nlangtag/Module_i18nlangtag.mk
@@ -12,15 +12,6 @@ $(eval $(call gb_Module_add_targets,i18nlangtag,\
Library_i18nlangtag \
))
-ifeq ($(CROSS_COMPILING),)
-
-$(eval $(call gb_Module_add_targets,i18nlangtag,\
- Executable_localestr \
-))
-
-endif
-
-
$(eval $(call gb_Module_add_check_targets,i18nlangtag,\
CppunitTest_i18nlangtag_test_languagetag \
))
diff --git a/i18nlangtag/source/localestr/localestr.cxx b/i18nlangtag/source/localestr/localestr.cxx
deleted file mode 100644
index c18531330c51..000000000000
--- a/i18nlangtag/source/localestr/localestr.cxx
+++ /dev/null
@@ -1,20 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-#include <i18nlangtag/languagetag.hxx>
-#include <stdio.h>
-
-int main(int /*argc*/, char **argv)
-{
- LanguageTag aTag(OUString::createFromAscii(argv[1]));
- OUString aLocaleStr = aTag.getGlibcLocaleString("");
- printf("%s", aLocaleStr.toUtf8().getStr());
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/solenv/bin/localestr b/solenv/bin/localestr
new file mode 100755
index 000000000000..07eab968b908
--- /dev/null
+++ b/solenv/bin/localestr
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+case "$1" in
+ ca-valencia)
+ echo ca@valencia
+ ;;
+ kmr-Latn)
+ echo kmr@latin
+ ;;
+ sr-Latn)
+ echo sr@latin
+ ;;
+ *)
+ echo $1 | tr '-' '_'
+ ;;
+esac
+
diff --git a/solenv/gbuild/AllLangMoTarget.mk b/solenv/gbuild/AllLangMoTarget.mk
index 9772e8c8d1e6..c5cf2cf1005d 100644
--- a/solenv/gbuild/AllLangMoTarget.mk
+++ b/solenv/gbuild/AllLangMoTarget.mk
@@ -23,9 +23,6 @@
# AllLangMoTarget nothing MoTarget for all active langs
# MoTarget running msgfmt
-gb_MoTarget_LOCALESTRDEPS := $(call gb_Executable_get_runtime_dependencies,localestr)
-gb_MoTarget_LOCALESTRCOMMAND := $(call gb_Executable_get_command,localestr)
-
# MoTarget
$(call gb_MoTarget_get_clean_target,%) :
@@ -39,7 +36,7 @@ $(call gb_MoTarget_get_clean_target,%) :
#and minimize msgctxt
#eventually instead can do something like
#msgfmt $(gb_POLOCATION)/$(LANGUAGE)/$(LIBRARY)/messages.po -o $@)
-$(call gb_MoTarget_get_target,%) : $(gb_Helper_MISCDUMMY) $(gb_MoTarget_LOCALESTRDEPS)
+$(call gb_MoTarget_get_target,%) : $(gb_Helper_MISCDUMMY)
$(call gb_Output_announce,$*,$(true),MO,2)
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && \
@@ -71,7 +68,7 @@ $(call gb_AllLangMoTarget_get_clean_target,%) :
$(call gb_Helper_abbreviate_dirs,\
rm -f $(call gb_AllLangMoTarget_get_target,$*))
-$(call gb_AllLangMoTarget_get_target,%) : $(gb_MoTarget_LOCALESTRDEPS)
+$(call gb_AllLangMoTarget_get_target,%) :
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && touch $@)
@@ -87,7 +84,7 @@ $(foreach lang,$(gb_AllLangMoTarget_LANGS),\
$(foreach lang,$(gb_AllLangMoTarget_LANGS),\
$(call gb_Helper_install,$(call gb_AllLangMoTarget_get_target,$(1)), \
- $(call gb_MoTarget_get_install_target,$(shell $(SRCDIR)/bin/run localestr $(lang))/LC_MESSAGES/$(1)), \
+ $(call gb_MoTarget_get_install_target,$(shell $(SRCDIR)/solenv/bin/localestr $(lang))/LC_MESSAGES/$(1)), \
$(call gb_MoTarget_get_target,$(1)$(lang))))
$$(eval $$(call gb_Module_register_target,$(call gb_AllLangMoTarget_get_target,$(1)),$(call gb_AllLangMoTarget_get_clean_target,$(1))))