[Pkg-octave-commit] [SCM] Debian packaging for octave-java branch, master, updated. debian/1.2.8-4-2-gccb4970
Sébastien Villemot
sebastien.villemot at ens.fr
Wed Jul 18 21:12:13 UTC 2012
The following commit has been merged in the master branch:
commit 65d4fe1631cf1020373c528e41252a522491f052
Author: Sébastien Villemot <sebastien.villemot at ens.fr>
Date: Sun Jul 8 14:06:10 2012 +0200
restore-locale.patch: new patch, restores locale after initializing the JVM
Closes: #676800
diff --git a/debian/patches/restore-locale.patch b/debian/patches/restore-locale.patch
new file mode 100644
index 0000000..a05e0e4
--- /dev/null
+++ b/debian/patches/restore-locale.patch
@@ -0,0 +1,40 @@
+Description: Restore the locale after initializing the JVM
+ OpenJDK 7 messes up the locale settings (and LC_NUMERIC in particular), so
+ Octave is no longer able to read a decimal number in locales for which the
+ decimal separator is a comma instead of a point.
+Author: Sébastien Villemot <sebastien.villemot at ens.fr>
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676800
+Forwarded: http://sourceforge.net/mailarchive/message.php?msg_id=29511969
+Last-Update: 2012-07-08
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/__java__.cc
++++ b/src/__java__.cc
+@@ -34,6 +34,8 @@
+ #include <iostream>
+ #include <fstream>
+
++#include <clocale>
++
+ typedef jint (JNICALL *JNI_CreateJavaVM_t) (JavaVM **pvm, JNIEnv **penv, void *args);
+ typedef jint (JNICALL *JNI_GetCreatedJavaVMs_t) (JavaVM **pvm, jsize bufLen, jsize *nVMs);
+
+@@ -385,6 +387,9 @@
+
+ if (jvm) return;
+
++ const char *static_locale = setlocale(LC_ALL, NULL);
++ const std::string locale(static_locale);
++
+ #if defined (__WIN32__)
+
+ HMODULE hMod = GetModuleHandle("jvm.dll");
+@@ -534,6 +539,8 @@
+ }
+
+ #endif
++
++ setlocale(LC_ALL, locale.c_str());
+ }
+
+ static void terminate_jvm(void)
diff --git a/debian/patches/series b/debian/patches/series
index 53487d2..2657c7b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
libjvm.patch
+restore-locale.patch
--
Debian packaging for octave-java
More information about the Pkg-octave-commit
mailing list