[libreoffice] 03/04: "steal" the locale-gen stuff from gcc

Rene Engelhard rene at moszumanska.debian.org
Sat Jun 10 20:38:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

rene pushed a commit to branch debian-experimental-5.4
in repository libreoffice.

commit 8e30d135184f9ed88e2be843c3ecdaad103ebf2d
Author: Rene Engelhard <rene at debian.org>
Date:   Sat Jun 10 10:18:48 2017 +0200

    "steal" the locale-gen stuff from gcc
---
 changelog          |  3 +++
 control            |  1 +
 rules              | 11 +++++++++--
 scripts/locale-gen | 32 ++++++++++++++++++++++++++++++++
 tests/control      |  2 +-
 5 files changed, 46 insertions(+), 3 deletions(-)

diff --git a/changelog b/changelog
index cee2a73..801982b 100644
--- a/changelog
+++ b/changelog
@@ -7,6 +7,9 @@ libreoffice (1:5.4.0~beta2-4) experimental; urgency=medium
   * debian/patches/gerrit_38597.diff: add from gerrit for master, fixes
     i386 tests
 
+  * debian/rules, debian/scripts/locale-gen: upstream insists on using
+    en_US.UTF-8 for the tests. "Steal" the locale-gen stuff from gcc
+
  -- Rene Engelhard <rene at debian.org>  Sat, 10 Jun 2017 06:35:55 +0200
 
 libreoffice (1:5.4.0~beta2-3) experimental; urgency=medium
diff --git a/control b/control
index a0e53f4..e8671ad 100644
--- a/control
+++ b/control
@@ -139,6 +139,7 @@ Build-Depends: ant (>= 1.7.0) [!hppa !ia64 !mips64 !s390 !sparc],
                libxt-dev,
                libxtst-dev,
                libzmf-dev,
+               locales [!kfreebsd-amd64 !kfreebsd-i386 !sparc64] <!nocheck>,
                lp-solve (>= 5.5.0.13-5+b1),
                make (>= 3.81-8.2),
                maven-repo-helper,
diff --git a/rules b/rules
index 2f08473..9310b70 100755
--- a/rules
+++ b/rules
@@ -930,6 +930,7 @@ endif
 ifeq "$(RUN_TESTTOOL)" "y"
 	CONFIGURE_FLAGS += --enable-hids
 endif
+	BUILD_DEPS += , locales$(OOO_NO_CHECK_ARCHS) <!nocheck>
 	BUILD_DEPS += , gdb$(OOO_NO_CHECK_ARCHS) <!nocheck>
 	BUILD_DEPS += , fontconfig$(OOO_NO_CHECK_ARCHS) <!nocheck>
 	BUILD_DEPS += , fonts-liberation$(OOO_NO_CHECK_ARCHS) <!nocheck>
@@ -1910,6 +1911,7 @@ $(STAMP_DIR)/prepare:
 		    debian/scripts/get_libebook_dep.sh \
 		    debian/scripts/get_libvlc_dep.sh \
 		    debian/scripts/get_ttf_version.pl \
+		    debian/scripts/locale-gen \
 		    autogen.sh; \
 	do \
 	  chmod 755 $$FILE ;\
@@ -2027,6 +2029,12 @@ endif
 		--disable-scripting-beanshell \
 		--with-galleries=no --with-theme="$(DEFAULT_IMAGE)"
 
+	# generate the needed en_US.UTF-8. Upstream doesn't want to support
+	# anything else (even though C.UTF-8 works)
+	rm -rf $(CURDIR)/locales
+	mkdir $(CURDIR)/locales
+	USE_CPUS=$(NUM_CPUS) debian/scripts/locale-gen
+
 	# build the tests first
 	export gb_SUPPRESS_TESTS=true; \
 		$(MAKE) check
@@ -2049,8 +2057,7 @@ endif
 		export TMPDIR=$$t; \
 		export HOME=$$t; \
 		export SAL_USE_VCLPLUGIN="svp"; \
-		export LANG=C.UTF-8; \
-		export LC_ALL=C.UTF-8; \
+		export LOCPATH=$(CURDIR)/locales; \
 		if [ -x /usr/bin/gdb ]; then ulimit -c unlimited; fi && \
 		$(MAKE) -k uicheck || PARALLELISM=1 $(MAKE) uicheck && \
 	rm -rf $$t
diff --git a/scripts/locale-gen b/scripts/locale-gen
new file mode 100755
index 0000000..4c05d09
--- /dev/null
+++ b/scripts/locale-gen
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# generate locales that uicheck depend on
+# "stolen" from gcc
+
+LOCPATH=`pwd`/locales
+export LOCPATH
+
+[ -d $LOCPATH ] || mkdir -p $LOCPATH
+
+[ -n "$USE_CPUS" ] || USE_CPUS=1
+
+umask 022
+
+echo "Generating locales..."
+xargs -L 1 -P $USE_CPUS -I{} \
+    sh -c '
+	set {}; locale=$1; charset=$2
+	case $locale in \#*) exit;; esac
+	[ -n "$locale" -a -n "$charset" ] || exit
+	echo "  `echo $locale | sed \"s/\([^.\@]*\).*/\1/\"`.$charset`echo $locale | sed \"s/\([^\@]*\)\(\@.*\)*/\2/\"`..."
+        if [ -f $LOCPATH/$locale ]; then
+	    input=$locale
+	else
+            input=`echo $locale | sed "s/\([^.]*\)[^@]*\(.*\)/\1\2/"`
+	fi
+	localedef -i $input -c -f $charset $LOCPATH/$locale #-A /etc/locale.alias
+    ' <<EOF
+en_US.UTF-8		UTF-8
+EOF
+
+echo "Generation complete."
diff --git a/tests/control b/tests/control
index ffdfe36..5d95a3a 100644
--- a/tests/control
+++ b/tests/control
@@ -1,5 +1,5 @@
 Tests: junit-subsequentcheck
-Depends: libreoffice, libreoffice-subsequentcheckbase, libreoffice-sdbc-hsqldb, autoconf, automake, bc, bison, bzip2, fastjar, flex (>= 2.3.35), gperf, libcups2-dev, libfontconfig1-dev, libfreetype6-dev (>= 2.2.0), libgl1-mesa-dev, libice-dev, libsm-dev, libx11-dev, libxaw7-dev, libxext-dev, libxinerama-dev, libxkbfile-dev, libxrender-dev, libxt-dev, libxtst-dev, pkg-config, unzip, x11proto-render-dev, xsltproc, zip, zlib1g-dev , libgltf-dev (>= 0.1.0) , opencollada-dev (>= 0.1.0~2014070 [...]
+Depends: libreoffice, libreoffice-subsequentcheckbase, libreoffice-sdbc-hsqldb, autoconf, automake, bc, bison, bzip2, fastjar, flex (>= 2.3.35), gperf, libcups2-dev, libfontconfig1-dev, libfreetype6-dev (>= 2.2.0), libgl1-mesa-dev, libice-dev, libsm-dev, libx11-dev, libxaw7-dev, libxext-dev, libxinerama-dev, libxkbfile-dev, libxrender-dev, libxt-dev, libxtst-dev, pkg-config, unzip, x11proto-render-dev, xsltproc, zip, zlib1g-dev , libgltf-dev (>= 0.1.0) , opencollada-dev (>= 0.1.0~2014070 [...]
 
 Tests: pyuno-import
 Depends: python3-uno

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/libreoffice.git



More information about the Pkg-openoffice-commits mailing list