]> Pileus Git - ~andy/sunrise/commitdiff
dev-python/pyicu: Version bump
authorMartin von Gagern (MvG) <Martin.vGagern@gmx.net>
Sat, 12 Feb 2011 11:22:13 +0000 (11:22 +0000)
committerMartin von Gagern (MvG) <Martin.vGagern@gmx.net>
Sat, 12 Feb 2011 11:22:13 +0000 (11:22 +0000)
svn path=/sunrise/; revision=11762

dev-python/pyicu/ChangeLog
dev-python/pyicu/Manifest
dev-python/pyicu/files/parseArgsConstChar.patch [new file with mode: 0644]
dev-python/pyicu/pyicu-0.8.1.ebuild [deleted file]
dev-python/pyicu/pyicu-1.1.ebuild [new file with mode: 0644]

index e50bd6c60793b98c92015d8f99d89cc4a8635465..f10f61b21fbec8374055b0461eadd5dc30c2a5f0 100644 (file)
@@ -1,7 +1,13 @@
 # ChangeLog for dev-python/pyicu
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+*pyicu-1.1 (12 Feb 2011)
+
+  12 Feb 2011; Martin von Gagern (MvG) <Martin.vGagern@gmx.net>
+  -pyicu-0.8.1.ebuild, +pyicu-1.1.ebuild, +files/parseArgsConstChar.patch:
+  Version bump. Avoid many gcc warnings.
+
   13 Aug 2010; Thomas Sachau (Tommy[D]) <tommy@gentoo.org>
   pyicu-0.8.1.ebuild:
   Switch to pypi mirror list
index 31ad7dc606d610ae9102aefd186df36ab7051bd2..5df68980bb963d49f204faf74c1db56ae04cf8b5 100644 (file)
@@ -1,4 +1,5 @@
-DIST PyICU-0.8.1.tar.gz 66819 RMD160 af38047ab04824fab52f529454528cf7dd71d520 SHA1 f8f3c8821cb90442ba6637530592e91929efdf6d SHA256 8edf1901e998d198d861b95a8ba9d12d7d9d2ca82c82984f6c94b1b009c48008
-EBUILD pyicu-0.8.1.ebuild 958 RMD160 1c0360b0ec0b6074cd9fbd13d5de0696335971e5 SHA1 df1e1805212733acaf47d3f1ce2e2ffd2a8baba6 SHA256 1164fc3e4f0915b099cb1af0256a237115e1ec583e4f105fbeff226cc77cb045
-MISC ChangeLog 487 RMD160 e5fcb99e60c0d2290492d2220fdf0ab7e3a6aafe SHA1 619fdb8858aff1b097cbf5a40ecd675624fd0a33 SHA256 04f260ed9e4b72d442f30f54ff826abe2d87ee14c9d72a8d39915decac141cf3
+AUX parseArgsConstChar.patch 6676 RMD160 f4e13f90f838bcf83dd27f5cfd59c13db1b77386 SHA1 a4537a767e9903559b23043635da5f0b432461b3 SHA256 429087b2971f241a75c160fcfe9e82243cf793dc54e6ac3259bbb08f884dc696
+DIST PyICU-1.1.tar.gz 102194 RMD160 4beb62af133f7b6ae46db0ad497a91b4e1c954ec SHA1 19fd27123d55b2c4fc82d81b88fa3e2e8f9c34bf SHA256 986f625f210439400343c6fd299af380c1fd018d5884720801331be850e2b7e2
+EBUILD pyicu-1.1.ebuild 1085 RMD160 af487c2e6ded90be62cac7c1779152f594fad9c9 SHA1 8278d45760313fe39a5f6b0faa293fbcd1ce0a37 SHA256 d4f438c54da007b6f73d02141f546520437bd6791a15126532c795d5e5f19df3
+MISC ChangeLog 694 RMD160 22c7afa5033888820048e7a2415443c948dd4c7a SHA1 3e0863cac43a6a5c165567f8e53cdb2425a882ee SHA256 831ea87d932b1e7a0becc65b7da355ff53835c7f14f2c8973dd7bc3896d304a0
 MISC metadata.xml 521 RMD160 ef6b751ab41a1385a3c52781a3e8fc74a6891316 SHA1 c309e2f7732bd1e397b00e3a44d602e7c7c49d62 SHA256 2f19b7aec8532c2f67de98f8b3d4634b4d8091f999797450bf9580a3db707b82
diff --git a/dev-python/pyicu/files/parseArgsConstChar.patch b/dev-python/pyicu/files/parseArgsConstChar.patch
new file mode 100644 (file)
index 0000000..6f963ed
--- /dev/null
@@ -0,0 +1,181 @@
+Treat string literals as const char* instead of char*.
+
+PyICU had a lot of implicit conversions from string constant to char*,
+which could cause huge lists of compiler messages like this:
+
+warning: deprecated conversion from string constant to ‘char*’
+
+This patch attempts to fix as many of these as possible inside the
+PyICU codebase. Some cannot be fixed, because the cooresponding
+problem is in Python headers. This is known as Python issue #6952.
+
+2011-02-11 Martin von Gagern
+
+References:
+http://bugs.gentoo.org/237888
+http://bugs.python.org/issue6952
+
+Index: PyICU-1.1/common.cpp
+===================================================================
+--- PyICU-1.1.orig/common.cpp
++++ PyICU-1.1/common.cpp
+@@ -178,7 +178,8 @@ EXPORT PyObject *PyUnicode_FromUnicodeSt
+ }
+ EXPORT UnicodeString &PyString_AsUnicodeString(PyObject *object,
+-                                               char *encoding, char *mode,
++                                               const char *encoding,
++                                               const char *mode,
+                                                UnicodeString &string)
+ {
+     UErrorCode status = U_ZERO_ERROR;
+@@ -206,7 +207,7 @@ EXPORT UnicodeString &PyString_AsUnicode
+     if (U_FAILURE(status))
+     {
+-        char *reasonName;
++        const char *reasonName;
+         switch (stop.reason) {
+           case UCNV_UNASSIGNED:
+@@ -241,7 +242,8 @@ EXPORT UnicodeString &PyString_AsUnicode
+ }
+ EXPORT UnicodeString &PyObject_AsUnicodeString(PyObject *object,
+-                                               char *encoding, char *mode,
++                                               const char *encoding,
++                                               const char *mode,
+                                                UnicodeString &string)
+ {
+     if (PyUnicode_Check(object))
+@@ -672,7 +674,7 @@ static UBool *toUBoolArray(PyObject *arg
+ #ifdef _MSC_VER
+-int __parseArgs(PyObject *args, char *types, ...)
++int __parseArgs(PyObject *args, const char *types, ...)
+ {
+     int count = ((PyTupleObject *)(args))->ob_size;
+     va_list list;
+@@ -682,7 +684,7 @@ int __parseArgs(PyObject *args, char *ty
+     return _parseArgs(((PyTupleObject *)(args))->ob_item, count, types, list);
+ }
+-int __parseArg(PyObject *arg, char *types, ...)
++int __parseArg(PyObject *arg, const char *types, ...)
+ {
+     va_list list;
+@@ -692,14 +694,14 @@ int __parseArg(PyObject *arg, char *type
+ }
+-int _parseArgs(PyObject **args, int count, char *types, va_list list)
++int _parseArgs(PyObject **args, int count, const char *types, va_list list)
+ {
+     if (count != strlen(types))
+         return -1;
+ #else
+-int _parseArgs(PyObject **args, int count, char *types, ...)
++int _parseArgs(PyObject **args, int count, const char *types, ...)
+ {
+     va_list list;
+@@ -1121,7 +1123,7 @@ int _parseArgs(PyObject **args, int coun
+     return 0;
+ }
+-PyObject *PyErr_SetArgsError(PyObject *self, char *name, PyObject *args)
++PyObject *PyErr_SetArgsError(PyObject *self, const char *name, PyObject *args)
+ {
+     if (!PyErr_Occurred())
+     {
+@@ -1135,7 +1137,7 @@ PyObject *PyErr_SetArgsError(PyObject *s
+     return NULL;
+ }
+-PyObject *PyErr_SetArgsError(PyTypeObject *type, char *name, PyObject *args)
++PyObject *PyErr_SetArgsError(PyTypeObject *type, const char *name, PyObject *args)
+ {
+     if (!PyErr_Occurred())
+     {
+Index: PyICU-1.1/common.h
+===================================================================
+--- PyICU-1.1.orig/common.h
++++ PyICU-1.1/common.h
+@@ -191,10 +191,12 @@ EXPORT PyObject *PyUnicode_FromUnicodeSt
+ EXPORT PyObject *PyUnicode_FromUnicodeString(const UChar *chars, int size);
+ EXPORT UnicodeString &PyString_AsUnicodeString(PyObject *object,
+-                                               char *encoding, char *mode,
++                                               const char *encoding,
++                                               const char *mode,
+                                                UnicodeString &string);
+ EXPORT UnicodeString &PyObject_AsUnicodeString(PyObject *object,
+-                                               char *encoding, char *mode,
++                                               const char *encoding,
++                                               const char *mode,
+                                                UnicodeString &string);
+ EXPORT UnicodeString &PyObject_AsUnicodeString(PyObject *object,
+                                                UnicodeString &string);
+@@ -208,10 +210,10 @@ int abstract_init(PyObject *self, PyObje
+ #define parseArgs __parseArgs
+ #define parseArg __parseArg
+-int __parseArgs(PyObject *args, char *types, ...);
+-int __parseArg(PyObject *arg, char *types, ...);
++int __parseArgs(PyObject *args, const char *types, ...);
++int __parseArg(PyObject *arg, const char *types, ...);
+-int _parseArgs(PyObject **args, int count, char *types, va_list list);
++int _parseArgs(PyObject **args, int count, const char *types, va_list list);
+ #else
+@@ -222,7 +224,7 @@ int _parseArgs(PyObject **args, int coun
+ #define parseArg(arg, types, rest...) \
+     _parseArgs(&(arg), 1, types, ##rest)
+-int _parseArgs(PyObject **args, int count, char *types, ...);
++int _parseArgs(PyObject **args, int count, const char *types, ...);
+ #endif
+@@ -240,7 +242,7 @@ Formattable *toFormattableArray(PyObject
+ UObject **pl2cpa(PyObject *arg, int *len, classid id, PyTypeObject *type);
+ PyObject *cpa2pl(UObject **array, int len, PyObject *(*wrap)(UObject *, int));
+-PyObject *PyErr_SetArgsError(PyObject *self, char *name, PyObject *args);
+-PyObject *PyErr_SetArgsError(PyTypeObject *type, char *name, PyObject *args);
++PyObject *PyErr_SetArgsError(PyObject *self, const char *name, PyObject *args);
++PyObject *PyErr_SetArgsError(PyTypeObject *type, const char *name, PyObject *args);
+ #endif /* _common_h */
+Index: PyICU-1.1/errors.cpp
+===================================================================
+--- PyICU-1.1.orig/errors.cpp
++++ PyICU-1.1/errors.cpp
+@@ -26,7 +26,7 @@
+ #include "errors.h"
+-static void _setMsg(PyObject *messages, UErrorCode code, char *msg)
++static void _setMsg(PyObject *messages, UErrorCode code, const char *msg)
+ {
+     PyObject *pycode = PyInt_FromLong((long) code);
+     PyObject *pymsg = PyString_FromString(msg);
+Index: PyICU-1.1/bases.cpp
+===================================================================
+--- PyICU-1.1.orig/bases.cpp
++++ PyICU-1.1/bases.cpp
+@@ -532,7 +532,7 @@ static int t_unicodestring_init(t_unicod
+ {
+     UnicodeString *u, _u;
+     PyObject *obj;
+-    char *encoding, *mode;
++    const char *encoding, *mode;
+     int32_t start, length;
+     int i;
diff --git a/dev-python/pyicu/pyicu-0.8.1.ebuild b/dev-python/pyicu/pyicu-0.8.1.ebuild
deleted file mode 100644 (file)
index d9546fb..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-inherit distutils
-
-MY_PN="PyICU"
-MY_P="${MY_PN}-${PV}"
-
-DESCRIPTION="a Python extension wrapping IBM's International components for
-Unicode C++ Library"
-HOMEPAGE="http://pyicu.osafoundation.org/"
-SRC_URI="mirror://pypi/P/${MY_PN}/${MY_P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="doc"
-
-DEPEND="doc? ( dev-python/epydoc )"
-RDEPEND=">=dev-libs/icu-3.6"
-
-S="${WORKDIR}/${MY_P}"
-
-DOCS="CHANGES CREDITS README"
-
-src_compile() {
-       if use doc; then
-               epydoc --html --verbose --url="${HOMEPAGE}" --name="${MY_P}" "${MY_PN}".py \
-               || die "Making the docs failed!"
-       fi
-       distutils_src_compile
-}
-
-src_test() {
-       PYTHONPATH="$(ls -d build/lib.*)" ${python} setup.py test \
-               || die "Tests failed to complete!"
-}
-
-src_install() {
-       if use doc; then
-               dohtml -r html/* || die "Installing the docs failed!"
-       fi
-       distutils_src_install
-}
diff --git a/dev-python/pyicu/pyicu-1.1.ebuild b/dev-python/pyicu/pyicu-1.1.ebuild
new file mode 100644 (file)
index 0000000..adcc161
--- /dev/null
@@ -0,0 +1,52 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+SUPPORT_PYTHON_ABIS=1
+RESTRICT_PYTHON_ABIS="3.* *-jython"
+DISTUTILS_SRC_TEST=setup.py
+
+inherit base distutils
+
+MY_PN="PyICU"
+MY_P="${MY_PN}-${PV}"
+DESCRIPTION="Python bindings for dev-libs/icu"
+HOMEPAGE="http://pyicu.osafoundation.org/"
+SRC_URI="mirror://pypi/P/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND=">=dev-libs/icu-4.6"
+DEPEND="${RDEPEND}
+       doc? ( dev-python/epydoc )"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS="CHANGES CREDITS README"
+PATCHES=( "${FILESDIR}/parseArgsConstChar.patch" )
+
+src_prepare() {
+       base_src_prepare
+       distutils_src_prepare
+}
+
+distutils_src_compile_post_hook() {
+       if use doc; then
+               echo " * Making documentation"
+               PYTHONPATH=$(_distutils_get_PYTHONPATH) \
+                       epydoc --html --verbose --url="${HOMEPAGE}" --name="${MY_P}" \
+                       icu.py || die "Making the docs failed!"
+       fi
+}
+
+src_install() {
+       distutils_src_install
+       if use doc; then
+               dohtml -r html/* || die "Installing the docs failed!"
+       fi
+}