[Lsb-messages] /var/www/bzr/lsb/devel/libstdcpp-test r172: Backport diff from upstream for bug 3287 (locales related issues on new distros)
Stew Benedict
stewb at linux-foundation.org
Mon Feb 20 17:03:56 UTC 2012
------------------------------------------------------------
revno: 172
committer: Stew Benedict <stewb at linux-foundation.org>
branch nick: libstdcpp-test
timestamp: Mon 2012-02-20 12:03:56 -0500
message:
Backport diff from upstream for bug 3287 (locales related issues on new distros)
added:
package/lsb-test-libstdcpp-4.1.0-bug-3287.patch
modified:
package/Makefile
package/lsb-test-libstdcpp.spec.sed
-------------- next part --------------
=== modified file 'package/Makefile'
--- a/package/Makefile 2011-03-24 22:16:47 +0000
+++ b/package/Makefile 2012-02-20 17:03:56 +0000
@@ -2,9 +2,9 @@
# XXX a specfile from this info, but not yet: for now keep in sync
PACKAGE=lsb-test-libstdcpp
VERSION=4.1.0
-LSBSpec=4.0
+LSBSpec=4.1
LSBRelease=4
-RELEASE=15
+RELEASE=16
# for pkgchk
DEPS=-d lsb-qm
=== added file 'package/lsb-test-libstdcpp-4.1.0-bug-3287.patch'
--- a/package/lsb-test-libstdcpp-4.1.0-bug-3287.patch 1970-01-01 00:00:00 +0000
+++ b/package/lsb-test-libstdcpp-4.1.0-bug-3287.patch 2012-02-20 17:03:56 +0000
@@ -0,0 +1,96 @@
+diff -up ./testsuite/22_locale/num_put/put/char/9780-2.cc.bug-3287 ./testsuite/22_locale/num_put/put/char/9780-2.cc
+--- ./testsuite/22_locale/num_put/put/char/9780-2.cc.bug-3287 2005-08-16 22:28:44.000000000 -0400
++++ ./testsuite/22_locale/num_put/put/char/9780-2.cc 2012-02-20 11:23:29.671670445 -0500
+@@ -1,11 +1,11 @@
+ // { dg-require-namedlocale "" }
+
+-// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
++// Copyright (C) 2004, 2005, 2009, 2011 Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+ // terms of the GNU General Public License as published by the
+-// Free Software Foundation; either version 2, or (at your option)
++// Free Software Foundation; either version 3, or (at your option)
+ // any later version.
+
+ // This library is distributed in the hope that it will be useful,
+@@ -14,31 +14,67 @@
+ // GNU General Public License for more details.
+
+ // You should have received a copy of the GNU General Public License along
+-// with this library; see the file COPYING. If not, write to the Free
+-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+-// USA.
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
+
+ #include <sstream>
+ #include <locale>
+ #include <testsuite_hooks.h>
+
+-int main()
++// Make sure that formatted output uses the locale in the output stream.
++using namespace std;
++locale l1 = locale("de_DE");
++const num_put<char>& np = use_facet<num_put<char> >(l1);
++const numpunct<char>& npunct = use_facet<numpunct<char> >(l1);
++
++void test01()
+ {
+- using namespace std;
++ bool test __attribute__((unused)) = true;
++
++ locale l2 = locale("C");
++ const numpunct<char>& npunct2 = use_facet<numpunct<char> >(l2);
++ char c = npunct2.thousands_sep();
++ string s = npunct2.grouping();
++
++ ostringstream oss;
++ oss.imbue(l2);
++
++ long l = 1234567890;
++ np.put(oss.rdbuf(), oss, ' ', l);
++ string res = oss.str();
++
++ VERIFY( res == "1234567890" );
++}
+
++void test02()
++{
+ bool test __attribute__((unused)) = true;
+- locale l1 = locale("de_DE");
++
+ locale l2 = locale("es_ES");
+-
+- const num_put<char>& np = use_facet<num_put<char> >(l1);
++ const numpunct<char>& npunct3 = use_facet<numpunct<char> >(l2);
++ char c = npunct3.thousands_sep();
++ string s = npunct3.grouping();
++
+ ostringstream oss;
+ oss.imbue(l2);
+
+ long l = 1234567890;
+- np.put(oss.rdbuf(), oss, ' ', l); // 1234567890
++ np.put(oss.rdbuf(), oss, ' ', l);
+ string res = oss.str();
+-
+- VERIFY( res == "1234567890" );
+
++ if (!s.empty())
++ VERIFY( res == "1.234.567.890" );
++ else
++ VERIFY( res == "1234567890" );
++}
++
++int main()
++{
++ // Sanity check.
++ char c = npunct.thousands_sep();
++ string s = npunct.grouping();
++
++ test01();
++ test02();
+ return 0;
+ }
=== modified file 'package/lsb-test-libstdcpp.spec.sed'
--- a/package/lsb-test-libstdcpp.spec.sed 2011-02-24 14:14:42 +0000
+++ b/package/lsb-test-libstdcpp.spec.sed 2012-02-20 17:03:56 +0000
@@ -43,6 +43,7 @@
Patch6: lsb-test-libstdcpp-4.1.0-gcc43.patch
Patch7: lsb-test-libstdcpp-4.1.0-bug-2943.patch
Patch8: lsb-test-libstdcpp-4.1.0-bug-3182.patch
+Patch9: lsb-test-libstdcpp-4.1.0-bug-3287.patch
Vendor: CodeSourcery LLC
# If we let RPM detect dependencies, it will get the idea that this package
@@ -102,6 +103,9 @@
# bug 3182 - tests failing on new distros, pull changes from upstream
%patch8 -p0 -b .bug-3182
+# bug 3287 - tests failing on new distros, pull changes from upstream
+%patch9 -p0 -b .bug-3287
+
# (sb) with the bump to 4.1.0, our {ppc,ppc64}-linux-gnu/baseline_symbols.txt
# files are out of date, upstream has {powerpc,powerpc64}-linux-gnu, use those
cp config/abi/powerpc-linux-gnu/baseline_symbols.txt config/abi/ppc-linux-gnu
@@ -322,6 +326,9 @@
fi;
done
+# also get rid of the various backup files from patches
+find $ccdir -name '*.cc.*' | xargs -i rm -f {}
+
# one test needs testsuite_shared.so, build/install it
cd testsuite
lsbc++ -fPIC -c testsuite_shared.cc
@@ -389,6 +396,10 @@
%doc build_binary_testsuite
%changelog
+* Mon Feb 20 2012 Stew Benedict <stewb at linux-foundation.org>
+- add patch for bug 3287 (P9), LSBSpec should be 4.1, not 4.0
+- don't package the various patch backup files
+
* Thu Feb 24 2011 Stew Benedict <stewb at linux-foundation.org>
- own the directories we populate (bug 3195)
More information about the lsb-messages
mailing list