]> Pileus Git - ~andy/sunrise/commitdiff
dev-python/pyicu: Support ICU 4.8.
authorMartin von Gagern (MvG) <Martin.vGagern@gmx.net>
Sun, 29 May 2011 12:42:43 +0000 (12:42 +0000)
committerMartin von Gagern (MvG) <Martin.vGagern@gmx.net>
Sun, 29 May 2011 12:42:43 +0000 (12:42 +0000)
svn path=/sunrise/; revision=12113

dev-python/pyicu/ChangeLog
dev-python/pyicu/Manifest
dev-python/pyicu/files/estyleEnums.patch [new file with mode: 0644]
dev-python/pyicu/pyicu-1.1-r1.ebuild [moved from dev-python/pyicu/pyicu-1.1.ebuild with 89% similarity]

index ecd2bb3b0962e79d61b30305970e7a5fbedd36f3..adcea747d8ad26847690e6757f21dedaf42ff41b 100644 (file)
@@ -2,6 +2,12 @@
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+*pyicu-1.1-r1 (29 May 2011)
+
+  29 May 2011; Martin von Gagern (MvG) <Martin.vGagern@gmx.net>
+  -pyicu-1.1.ebuild, +pyicu-1.1-r1.ebuild, +files/estyleEnums.patch:
+  Support ICU 4.8.
+
   21 May 2011; Martin von Gagern (MvG) <Martin.vGagern@gmx.net>
   pyicu-1.1.ebuild:
   Won't compile against ICU 4.8_rc1:
index 89c5a30ede2ac86a20d778339dc2cb73613fe69c..3cbfa7ec7fa6ac786530af4204d9990b2aebbfc4 100644 (file)
@@ -1,5 +1,6 @@
+AUX estyleEnums.patch 3626 RMD160 d6a540e90d273fcb664aea572d698a4d73d534a7 SHA1 f167cdf90ab5cb6864191f28461eb1d99de11616 SHA256 f0dd4743e6b04d1b8f28b1eb6f3e7b9e0ad9d772ef7778ab71004e279cbafd26
 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 1108 RMD160 4af450be546690857a8a9b16de2114ebfe00ad99 SHA1 67ff97b874d6bdbe9400b2d6e571fb00e26f6c0f SHA256 7e8695c0b1dfd510878ec2e054c865bddce47c1368c91d39e7455a02f7b80136
-MISC ChangeLog 875 RMD160 81b7818f1b9f7118fa274f3e15793503100e891e SHA1 bb4b833b2638fd5ba7dbc76a0cab48dcfddc4c7d SHA256 71d8e07865d4b0fc53581ec624b55b686016f5bd43affe2128d591200cac5c4f
+EBUILD pyicu-1.1-r1.ebuild 1119 RMD160 7e96849671dad18c93d54672fc641f71ae672c18 SHA1 a60abafe22e54164b32b24a079f16a53354cf345 SHA256 a51ee6a1ac303b417345cde1e1a8c782592447427bfd677d384dc598b924584c
+MISC ChangeLog 1057 RMD160 2a66df96ae42c26135db8f63495f6f3a20c91098 SHA1 765111c58e1160f06713aa36cc3b5116bb4a75e7 SHA256 ff5944c6a0f7e98f8e2cde92a8887909f9ff5c52cc04078b126e2f2c9dcd322b
 MISC metadata.xml 521 RMD160 ef6b751ab41a1385a3c52781a3e8fc74a6891316 SHA1 c309e2f7732bd1e397b00e3a44d602e7c7c49d62 SHA256 2f19b7aec8532c2f67de98f8b3d4634b4d8091f999797450bf9580a3db707b82
diff --git a/dev-python/pyicu/files/estyleEnums.patch b/dev-python/pyicu/files/estyleEnums.patch
new file mode 100644 (file)
index 0000000..747e189
--- /dev/null
@@ -0,0 +1,109 @@
+Make PyICU compile against ICU 4.8RC1.
+
+Fixes https://bugzilla.osafoundation.org/show_bug.cgi?id=13022
+
+Based on 'svn diff -c 177 http://svn.osafoundation.org/pyicu/trunk'
+but removed patch for CHANGES file, as that wouldn't apply out of
+order.
+
+Index: format.cpp
+===================================================================
+--- format.cpp (revision 176)
++++ format.cpp (revision 177)
+@@ -31,6 +31,10 @@
+ #include "dateformat.h"
+ #include "numberformat.h"
++#if U_ICU_VERSION_HEX >= 0x04080000
++    DECLARE_CONSTANTS_TYPE(UTimeUnitFormatStyle);
++#endif
++
+ /* FieldPosition */
+ class t_fieldposition : public _wrapper {
+@@ -728,7 +732,11 @@
+ static int t_timeunitformat_init(t_timeunitformat *self,
+                                  PyObject *args, PyObject *kwds)
+ {
++#if U_ICU_VERSION_HEX >= 0x04080000
++    UTimeUnitFormatStyle style;
++#else
+     TimeUnitFormat::EStyle style;
++#endif
+     Locale *locale;
+     switch (PyTuple_Size(args)) {
+@@ -1659,8 +1667,13 @@
+     INSTALL_STATIC_INT(FieldPosition, DONT_CARE);
+-#if U_ICU_VERSION_HEX >= 0x04020000
++#if U_ICU_VERSION_HEX >= 0x04020000 && U_ICU_VERSION_HEX < 0x04080000
+     INSTALL_STATIC_INT(TimeUnitFormat, kFull);
+     INSTALL_STATIC_INT(TimeUnitFormat, kAbbreviate);
+ #endif
++#if U_ICU_VERSION_HEX >= 0x04080000
++    INSTALL_CONSTANTS_TYPE(UTimeUnitFormatStyle, m);
++    INSTALL_ENUM(UTimeUnitFormatStyle, "FULL", UTMUTFMT_FULL_STYLE);
++    INSTALL_ENUM(UTimeUnitFormatStyle, "ABBREVIATED", UTMUTFMT_ABBREVIATED_STYLE);
++#endif
+ }
+Index: numberformat.cpp
+===================================================================
+--- numberformat.cpp   (revision 176)
++++ numberformat.cpp   (revision 177)
+@@ -30,6 +30,10 @@
+ #include "numberformat.h"
+ #include "macros.h"
++#if U_ICU_VERSION_HEX >= 0x04080000
++    DECLARE_CONSTANTS_TYPE(UCurrencySpacing);
++#endif
++
+ /* DecimalFormatSymbols */
+ class t_decimalformatsymbols : public _wrapper {
+@@ -494,7 +498,11 @@
+ static PyObject *t_decimalformatsymbols_getPatternForCurrencySpacing(t_decimalformatsymbols *self, PyObject *args)
+ {
++#if U_ICU_VERSION_HEX >= 0x04080000
++    UCurrencySpacing type;
++#else
+     DecimalFormatSymbols::ECurrencySpacing type;
++#endif
+     UBool beforeCurrency;
+     if (!parseArgs(args, "ib", &type, &beforeCurrency))
+@@ -510,7 +518,11 @@
+ static PyObject *t_decimalformatsymbols_setPatternForCurrencySpacing(t_decimalformatsymbols *self, PyObject *args)
+ {
+     UnicodeString *u, _u;
++#if U_ICU_VERSION_HEX >= 0x04080000
++    UCurrencySpacing type;
++#else
+     DecimalFormatSymbols::ECurrencySpacing type;
++#endif
+     UBool beforeCurrency;
+     if (!parseArgs(args, "ibS", &type, &beforeCurrency, &u, &_u))
+@@ -2278,12 +2290,18 @@
+     INSTALL_STATIC_INT(DecimalFormatSymbols, kNaNSymbol);
+     INSTALL_STATIC_INT(DecimalFormatSymbols, kSignificantDigitSymbol);
+-#if U_ICU_VERSION_HEX >= 0x04020000
++#if U_ICU_VERSION_HEX >= 0x04020000 && U_ICU_VERSION_HEX < 0x04080000
+     INSTALL_STATIC_INT(DecimalFormatSymbols, kCurrencyMatch);
+     INSTALL_STATIC_INT(DecimalFormatSymbols, kSurroundingMatch);
+     INSTALL_STATIC_INT(DecimalFormatSymbols, kInsert);
+     INSTALL_STATIC_INT(DecimalFormatSymbols, kCurrencySpacingCount);
+ #endif
++#if U_ICU_VERSION_HEX >= 0x04080000
++    INSTALL_CONSTANTS_TYPE(UCurrencySpacing, m);
++    INSTALL_ENUM(UCurrencySpacing, "MATCH", UNUM_CURRENCY_MATCH);
++    INSTALL_ENUM(UCurrencySpacing, "SURROUNDING_MATCH", UNUM_CURRENCY_SURROUNDING_MATCH);
++    INSTALL_ENUM(UCurrencySpacing, "INSERT", UNUM_CURRENCY_INSERT);
++#endif
+     INSTALL_STATIC_INT(NumberFormat, kIntegerField);
+     INSTALL_STATIC_INT(NumberFormat, kFractionField);
similarity index 89%
rename from dev-python/pyicu/pyicu-1.1.ebuild
rename to dev-python/pyicu/pyicu-1.1-r1.ebuild
index ad2369300b7c52557702dfe24522c1d23501afa5..80af7f9a9d737a3917bf6d5f4265e94b3d5555bf 100644 (file)
@@ -21,15 +21,17 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE="doc"
 
-RDEPEND=">=dev-libs/icu-4.6
-       <dev-libs/icu-4.8_rc1"
+RDEPEND=">=dev-libs/icu-4.6"
 DEPEND="${RDEPEND}
        doc? ( dev-python/epydoc )"
 
 S="${WORKDIR}/${MY_P}"
 
 DOCS="CHANGES CREDITS README"
-PATCHES=( "${FILESDIR}/parseArgsConstChar.patch" )
+PATCHES=(
+       "${FILESDIR}/parseArgsConstChar.patch"
+       "${FILESDIR}/estyleEnums.patch"
+)
 
 src_prepare() {
        base_src_prepare