diff options
author | bapt <bapt@FreeBSD.org> | 2010-12-17 02:47:56 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2010-12-17 02:47:56 +0800 |
commit | 8bd5c04480d2de92fc171aa8541a99d2496eb461 (patch) | |
tree | 81af85352b2e1efacea77405781fbd7517b7886e /devel | |
parent | 131717cc7a280e2493ae7870180987af59a88916 (diff) | |
download | freebsd-ports-gnome-8bd5c04480d2de92fc171aa8541a99d2496eb461.tar.gz freebsd-ports-gnome-8bd5c04480d2de92fc171aa8541a99d2496eb461.tar.zst freebsd-ports-gnome-8bd5c04480d2de92fc171aa8541a99d2496eb461.zip |
- Prepare for devel/icu4 deletion
- fix py-icu with icu4.6
- fix portsgresql*server with icu 4.6
- remove now useless icu patch from webkit
Diffstat (limited to 'devel')
-rw-r--r-- | devel/py-icu/Makefile | 12 | ||||
-rw-r--r-- | devel/py-icu/files/patch-icu-4.6 | 163 |
2 files changed, 165 insertions, 10 deletions
diff --git a/devel/py-icu/Makefile b/devel/py-icu/Makefile index 699afbbd51e8..2c25ff4fda2e 100644 --- a/devel/py-icu/Makefile +++ b/devel/py-icu/Makefile @@ -7,7 +7,7 @@ PORTNAME= icu PORTVERSION= 1.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel python MASTER_SITES= ${MASTER_SITE_CHEESESHOP} MASTER_SITE_SUBDIR= source/P/PyICU @@ -28,14 +28,6 @@ MAKE_ENV+= \ PYICU_LFLAGS="-L${PREFIX}/lib" \ PYICU_LIBRARIES="icui18n:icuuc:icudata" -OPTIONS= ICU4 "Use ICU 4.x instead of 4.6" off - -.include <bsd.port.pre.mk> - -.if defined(WITH_ICU4) || exists(${LOCALBASE}/lib/libicudata.so.44) -LIB_DEPENDS+= icudata:${PORTSDIR}/devel/icu4 -.else LIB_DEPENDS+= icudata:${PORTSDIR}/devel/icu -.endif -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/devel/py-icu/files/patch-icu-4.6 b/devel/py-icu/files/patch-icu-4.6 new file mode 100644 index 000000000000..547d81d61b86 --- /dev/null +++ b/devel/py-icu/files/patch-icu-4.6 @@ -0,0 +1,163 @@ +--- ./common.cpp.orig 2010-12-16 17:23:58.891824000 +0100 ++++ ./common.cpp 2010-12-16 17:25:58.722360225 +0100 +@@ -1133,9 +1133,14 @@ + + int isUnicodeString(PyObject *arg) + { ++#if U_ICU_VERSION_HEX < 0x04060000 + return (PyObject_TypeCheck(arg, &UObjectType) && + (((t_uobject *) arg)->object->getDynamicClassID() == + UnicodeString::getStaticClassID())); ++#else ++ return (PyObject_TypeCheck(arg, &UObjectType) && ++ dynamic_cast<UnicodeString *>(((t_uobject *) arg)->object) != NULL); ++#endif + } + + int32_t toUChar32(UnicodeString& u, UChar32 *c, UErrorCode& status) +--- ./common.h.orig 2010-03-29 20:04:02.000000000 +0200 ++++ ./common.h 2010-12-16 18:59:09.154326449 +0100 +@@ -117,6 +117,34 @@ + #include <unicode/selfmt.h> + #endif + ++#if U_ICU_VERSION_HEX >= 0x04060000 ++#include <typeinfo> ++#endif ++ ++#if U_ICU_VERSION_HEX < 0x04060000 ++typedef UClassID classid; ++#else ++typedef const char *classid; ++#endif ++ ++enum { ++ UObject_ID, ++ Replaceable_ID, ++ MeasureUnit_ID, ++ Measure_ID, ++ StringEnumeration_ID, ++ ForwardCharacterIterator_ID, ++ CharacterIterator_ID, ++ BreakIterator_ID, ++ Format_ID, ++ MeasureFormat_ID, ++ DateFormat_ID, ++ Calendar_ID, ++ Collator_ID, ++ UnicodeMatcher_ID, ++ SearchIterator_ID ++}; ++ + U_NAMESPACE_USE + + /* lifted from ustrenum.h */ +@@ -138,24 +166,6 @@ + extern PyObject *PyExc_ICUError; + extern PyObject *PyExc_InvalidArgsError; + +-enum { +- UObject_ID, +- Replaceable_ID, +- MeasureUnit_ID, +- Measure_ID, +- StringEnumeration_ID, +- ForwardCharacterIterator_ID, +- CharacterIterator_ID, +- BreakIterator_ID, +- Format_ID, +- MeasureFormat_ID, +- DateFormat_ID, +- Calendar_ID, +- Collator_ID, +- UnicodeMatcher_ID, +- SearchIterator_ID +-}; +- + void _init_common(PyObject *m); + + class ICUException { +@@ -214,14 +224,14 @@ + int32_t toUChar32(UnicodeString& u, UChar32 *c, UErrorCode& status); + UnicodeString fromUChar32(UChar32 c); + +-int isInstance(PyObject *arg, UClassID id, PyTypeObject *type); +-void registerType(PyTypeObject *type, UClassID id); ++int isInstance(PyObject *arg, classid id, PyTypeObject *type); ++void registerType(PyTypeObject *type, classid id); + + Formattable *toFormattable(PyObject *arg); + Formattable *toFormattableArray(PyObject *arg, int *len, +- UClassID id, PyTypeObject *type); ++ classid id, PyTypeObject *type); + +-UObject **pl2cpa(PyObject *arg, int *len, UClassID id, PyTypeObject *type); ++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); +--- ./macros.h.orig 2010-04-18 01:49:23.000000000 +0200 ++++ ./macros.h 2010-12-16 19:01:11.229839485 +0100 +@@ -271,12 +271,20 @@ + /* tp_itemsize */ 0, \ + }; + ++#if U_ICU_VERSION_HEX < 0x04060000 + #define TYPE_CLASSID(name) \ + name::getStaticClassID(), &name##Type + + #define TYPE_ID(name) \ + (UClassID) (name##_ID), &name##Type ++#else ++#define TYPE_CLASSID(className) \ ++ typeid(className).name(), &className##Type ++#define TYPE_ID(className) \ ++ typeid(className).name(), &className##Type ++#endif + ++#if U_ICU_VERSION_HEX < 0x04060000 + #define INSTALL_TYPE(name, module) \ + if (PyType_Ready(&name##Type) == 0) \ + { \ +@@ -284,6 +292,16 @@ + PyModule_AddObject(module, #name, (PyObject *) &name##Type); \ + registerType(&name##Type, (UClassID) name##_ID); \ + } ++#else ++#define INSTALL_TYPE(className, module) \ ++ if (PyType_Ready(&className##Type) == 0) \ ++ { \ ++ Py_INCREF(&className##Type); \ ++ PyModule_AddObject(module, #className, \ ++ (PyObject *) &className##Type); \ ++ registerType(&className##Type, typeid(className).name()); \ ++ } ++#endif + + #define INSTALL_STRUCT(name, module) \ + if (PyType_Ready(&name##Type) == 0) \ +@@ -292,6 +310,16 @@ + PyModule_AddObject(module, #name, (PyObject *) &name##Type); \ + } + ++#if U_ICU_VERSION_HEX >= 0x04060000 ++#define REGISTER_TYPE(className, module) \ ++ if (PyType_Ready(&className##Type) == 0) \ ++ { \ ++ Py_INCREF(&className##Type); \ ++ PyModule_AddObject(module, #className, \ ++ (PyObject *) &className##Type); \ ++ registerType(&className##Type, typeid(className).name()); \ ++ } ++#else + #define REGISTER_TYPE(name, module) \ + if (PyType_Ready(&name##Type) == 0) \ + { \ +@@ -299,6 +327,7 @@ + PyModule_AddObject(module, #name, (PyObject *) &name##Type); \ + registerType(&name##Type, name::getStaticClassID()); \ + } ++#endif + + #define INSTALL_CONSTANTS_TYPE(name, module) \ + if (PyType_Ready(&name##Type) == 0) \ |