diff options
author | jdolecek <jdolecek> | 2010-03-21 16:57:13 +0000 |
---|---|---|
committer | jdolecek <jdolecek> | 2010-03-21 16:57:13 +0000 |
commit | 53034713bc728c46fd23e161c5fde10a41fa8c62 (patch) | |
tree | 832cb9c882ca9f445ee9001f77d390c7e9390070 /textproc/php-intl | |
parent | 79c5097d2019d23c686aefc27e2d7325ca8f6ad4 (diff) | |
download | pkgsrc-53034713bc728c46fd23e161c5fde10a41fa8c62.tar.gz |
Add php-intl package, using PECL version 1.1.1, modified to compile with
both PHP 5.3.2 and PHP 5.3.12
compile tested on Mac OS X 10.6.2 and NetBSD 5.0.1
This module is an internationalization extension, enabling PHP programmers
to perform UCA-conformant collation and date/time/number/currency formatting
in their scripts.
It tends to closely follow ICU APIs, so that people having experience
working with ICU in either C/C++ or Java could easily use the PHP
API. Also, this way ICU documentation would be useful to understand
various ICU functions.
Intl consists of several modules, each of them exposes the corresponding ICU
API:
* Collator: provides string comparison capability with support
for appropriate locale-sensitive sort orderings.
* Number Formatter: allows to display number according to the
localized format or given pattern or set of rules, and to parse
strings into numbers.
* Message Formatter: allows to create messages incorporating
data (such as numbers or dates) formatted according to given
pattern and locale rules, and parse messages extracting data
from them.
* Normalizer: provides a function to transform text into one
of the Unicode normalization forms, and provides a routine to
test if a given string is already normalized.
* Locale: provides interaction with locale identifiers in the
form of functions to get subtags from locale identifier; parse,
compose, match(lookup and filter) locale identifiers.
Diffstat (limited to 'textproc/php-intl')
-rw-r--r-- | textproc/php-intl/DESCR | 28 | ||||
-rw-r--r-- | textproc/php-intl/Makefile | 18 | ||||
-rw-r--r-- | textproc/php-intl/distinfo | 14 | ||||
-rw-r--r-- | textproc/php-intl/patches/patch-aa | 17 | ||||
-rw-r--r-- | textproc/php-intl/patches/patch-ab | 31 | ||||
-rw-r--r-- | textproc/php-intl/patches/patch-ac | 56 | ||||
-rw-r--r-- | textproc/php-intl/patches/patch-ad | 81 | ||||
-rw-r--r-- | textproc/php-intl/patches/patch-ae | 39 | ||||
-rw-r--r-- | textproc/php-intl/patches/patch-af | 45 | ||||
-rw-r--r-- | textproc/php-intl/patches/patch-ag | 13 | ||||
-rw-r--r-- | textproc/php-intl/patches/patch-ah | 13 | ||||
-rw-r--r-- | textproc/php-intl/patches/patch-aj | 31 |
12 files changed, 386 insertions, 0 deletions
diff --git a/textproc/php-intl/DESCR b/textproc/php-intl/DESCR new file mode 100644 index 00000000000..ac504319f3f --- /dev/null +++ b/textproc/php-intl/DESCR @@ -0,0 +1,28 @@ +PHP is a programming language designed to be embedded into web pages. + +This module is an internationalization extension, enabling PHP programmers +to perform UCA-conformant collation and date/time/number/currency formatting +in their scripts. + +It tends to closely follow ICU APIs, so that people having experience +working with ICU in either C/C++ or Java could easily use the PHP +API. Also, this way ICU documentation would be useful to understand +various ICU functions. + +Intl consists of several modules, each of them exposes the corresponding ICU +API: + * Collator: provides string comparison capability with support + for appropriate locale-sensitive sort orderings. + * Number Formatter: allows to display number according to the + localized format or given pattern or set of rules, and to parse + strings into numbers. + * Message Formatter: allows to create messages incorporating + data (such as numbers or dates) formatted according to given + pattern and locale rules, and parse messages extracting data + from them. + * Normalizer: provides a function to transform text into one + of the Unicode normalization forms, and provides a routine to + test if a given string is already normalized. + * Locale: provides interaction with locale identifiers in the + form of functions to get subtags from locale identifier; parse, + compose, match(lookup and filter) locale identifiers. diff --git a/textproc/php-intl/Makefile b/textproc/php-intl/Makefile new file mode 100644 index 00000000000..9a8d36583e1 --- /dev/null +++ b/textproc/php-intl/Makefile @@ -0,0 +1,18 @@ +# $NetBSD: Makefile,v 1.1.1.1 2010/03/21 16:57:13 jdolecek Exp $ + +MODNAME= intl +PECL_VERSION= 1.1.1 +CATEGORIES+= textproc +COMMENT= PHP extension for i18n + +PHP_VERSIONS_ACCEPTED= 5 + +PKG_DESTDIR_SUPPORT= user-destdir + +CONFIGURE_ARGS+= --enable-${MODNAME}=shared,${BUILDLINK_DIR} + +USE_LANGUAGES+= c c++ + +.include "../../lang/php/ext.mk" +.include "../../textproc/icu/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/textproc/php-intl/distinfo b/textproc/php-intl/distinfo new file mode 100644 index 00000000000..a4d8efdd4be --- /dev/null +++ b/textproc/php-intl/distinfo @@ -0,0 +1,14 @@ +$NetBSD: distinfo,v 1.1.1.1 2010/03/21 16:57:13 jdolecek Exp $ + +SHA1 (php-intl/intl-1.1.1.tgz) = 052d43b57fea9a3193fe577c9aaa619f6c7508b0 +RMD160 (php-intl/intl-1.1.1.tgz) = 74abe4582aafe9f9bc3da41936fd0116c271ef8b +Size (php-intl/intl-1.1.1.tgz) = 142269 bytes +SHA1 (patch-aa) = 7a44fab01351f8f810c8b906f5fcb0ea9dd4160c +SHA1 (patch-ab) = 01b4fa84d71319f29e0869f25e0dd1be869eaad0 +SHA1 (patch-ac) = 635ac309125521018a13dbb84d741210e80fe635 +SHA1 (patch-ad) = 3e09a48471dcf6fcfdcfca295dac778814fd2bd1 +SHA1 (patch-ae) = 750d9284f86a730fce7733ce488cbb4ae13983ce +SHA1 (patch-af) = 815006577c08b1cab7f0e5e601770f786c61c910 +SHA1 (patch-ag) = 66db6e293f9eb9e81ccd6f8055aed2e036791247 +SHA1 (patch-ah) = 024f97675087d3f282e6cd8af059179ea7faea60 +SHA1 (patch-aj) = edb43a597a43db653af7be4d3066bf9bd376e8be diff --git a/textproc/php-intl/patches/patch-aa b/textproc/php-intl/patches/patch-aa new file mode 100644 index 00000000000..6c4b32851fc --- /dev/null +++ b/textproc/php-intl/patches/patch-aa @@ -0,0 +1,17 @@ +$NetBSD: patch-aa,v 1.1.1.1 2010/03/21 16:57:13 jdolecek Exp $ + +--- php_intl.h.orig 2010-03-15 23:03:31.000000000 +0100 ++++ php_intl.h +@@ -65,6 +65,12 @@ PHP_MINFO_FUNCTION(intl); + + #define PHP_INTL_VERSION "1.0.3" + ++#if (PHP_VERSION_ID >= 50300) ++# define PHP_INTL_ZEND_ARG_STATIC ++#else ++# define PHP_INTL_ZEND_ARG_STATIC static ++# define Z_DELREF_P(object) (object)->refcount-- ++#endif + #endif /* PHP_INTL_H */ + + /* diff --git a/textproc/php-intl/patches/patch-ab b/textproc/php-intl/patches/patch-ab new file mode 100644 index 00000000000..985eb4c8b3c --- /dev/null +++ b/textproc/php-intl/patches/patch-ab @@ -0,0 +1,31 @@ +$NetBSD: patch-ab,v 1.1.1.1 2010/03/21 16:57:13 jdolecek Exp $ + +--- collator/collator_class.c.orig 2010-03-11 00:13:52.000000000 +0100 ++++ collator/collator_class.c +@@ -88,22 +88,22 @@ zend_object_value Collator_object_create + modify approptiate 'collator_XX_args' for + the procedural API. + */ +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX( collator_0_args, 0, 0, 0 ) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX( collator_1_arg, 0, 0, 1 ) + ZEND_ARG_INFO( 0, arg1 ) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX( collator_2_args, 0, 0, 2 ) + ZEND_ARG_INFO( 0, arg1 ) + ZEND_ARG_INFO( 0, arg2 ) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX( collator_sort_args, 0, 0, 1 ) + ZEND_ARG_ARRAY_INFO( 1, arr, 0 ) + ZEND_ARG_INFO( 0, flags ) diff --git a/textproc/php-intl/patches/patch-ac b/textproc/php-intl/patches/patch-ac new file mode 100644 index 00000000000..8296a8516e7 --- /dev/null +++ b/textproc/php-intl/patches/patch-ac @@ -0,0 +1,56 @@ +$NetBSD: patch-ac,v 1.1.1.1 2010/03/21 16:57:13 jdolecek Exp $ + +--- dateformat/dateformat_class.c.orig 2010-03-11 00:19:56.000000000 +0100 ++++ dateformat/dateformat_class.c +@@ -84,42 +84,43 @@ zend_object_value IntlDateFormatter_obje + */ + + /* {{{ arginfo */ +-static ZEND_BEGIN_ARG_INFO_EX(datefmt_parse_args, 0, 0, 1) ++PHP_INTL_ZEND_ARG_STATIC ++ZEND_BEGIN_ARG_INFO_EX(datefmt_parse_args, 0, 0, 1) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(1, position) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_format, 0, 0, 0) + ZEND_ARG_INFO(0, args) + ZEND_ARG_INFO(0, array) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO(arginfo_intldateformatter_getdatetype, 0) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_settimezoneid, 0, 0, 1) + ZEND_ARG_INFO(0, zone) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_setpattern, 0, 0, 1) + ZEND_ARG_INFO(0, pattern) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_setlenient, 0, 0, 1) + ZEND_ARG_INFO(0, lenient) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_setcalendar, 0, 0, 1) + ZEND_ARG_INFO(0, which) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter___construct, 0, 0, 3) + ZEND_ARG_INFO(0, locale) + ZEND_ARG_INFO(0, datetype) diff --git a/textproc/php-intl/patches/patch-ad b/textproc/php-intl/patches/patch-ad new file mode 100644 index 00000000000..1349a8267df --- /dev/null +++ b/textproc/php-intl/patches/patch-ad @@ -0,0 +1,81 @@ +$NetBSD: patch-ad,v 1.1.1.1 2010/03/21 16:57:13 jdolecek Exp $ + +--- formatter/formatter_class.c.orig 2010-03-11 00:17:19.000000000 +0100 ++++ formatter/formatter_class.c +@@ -80,63 +80,65 @@ zend_object_value NumberFormatter_object + */ + + /* {{{ arginfo */ +-static ZEND_BEGIN_ARG_INFO_EX(number_parse_arginfo, 0, 0, 1) ++PHP_INTL_ZEND_ARG_STATIC ++ZEND_BEGIN_ARG_INFO_EX(number_parse_arginfo, 0, 0, 1) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(0, type) + ZEND_ARG_INFO(1, position) + ZEND_END_ARG_INFO() + +-static ZEND_BEGIN_ARG_INFO_EX(number_parse_currency_arginfo, 0, 0, 2) ++PHP_INTL_ZEND_ARG_STATIC ++ZEND_BEGIN_ARG_INFO_EX(number_parse_currency_arginfo, 0, 0, 2) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(1, currency) + ZEND_ARG_INFO(1, position) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_numberformatter_getattribute, 0, 0, 1) + ZEND_ARG_INFO(0, attr) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_numberformatter_setattribute, 0, 0, 2) + ZEND_ARG_INFO(0, attr) + ZEND_ARG_INFO(0, value) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_numberformatter_setsymbol, 0, 0, 2) + ZEND_ARG_INFO(0, attr) + ZEND_ARG_INFO(0, symbol) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO(arginfo_numberformatter_getpattern, 0) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_numberformatter_setpattern, 0, 0, 1) + ZEND_ARG_INFO(0, pattern) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_numberformatter_getlocale, 0, 0, 0) + ZEND_ARG_INFO(0, type) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_numberformatter___construct, 0, 0, 2) + ZEND_ARG_INFO(0, locale) + ZEND_ARG_INFO(0, style) + ZEND_ARG_INFO(0, pattern) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_numberformatter_formatcurrency, 0, 0, 2) + ZEND_ARG_INFO(0, num) + ZEND_ARG_INFO(0, currency) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_numberformatter_format, 0, 0, 1) + ZEND_ARG_INFO(0, num) + ZEND_ARG_INFO(0, type) diff --git a/textproc/php-intl/patches/patch-ae b/textproc/php-intl/patches/patch-ae new file mode 100644 index 00000000000..53fa77186d8 --- /dev/null +++ b/textproc/php-intl/patches/patch-ae @@ -0,0 +1,39 @@ +$NetBSD: patch-ae,v 1.1.1.1 2010/03/21 16:57:13 jdolecek Exp $ + +--- locale/locale_class.c.orig 2010-03-11 00:19:03.000000000 +0100 ++++ locale/locale_class.c +@@ -35,29 +35,29 @@ zend_class_entry *Locale_ce_ptr = NULL; + * approptiate 'locale_XX_args' for the procedural API! + */ + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX( locale_0_args, 0, 0, 0 ) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX( locale_1_arg, 0, 0, 1 ) + ZEND_ARG_INFO( 0, arg1 ) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX( locale_2_args, 0, 0, 2 ) + ZEND_ARG_INFO( 0, arg1 ) + ZEND_ARG_INFO( 0, arg2 ) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX( locale_3_args, 0, 0, 3 ) + ZEND_ARG_INFO( 0, arg1 ) + ZEND_ARG_INFO( 0, arg2 ) + ZEND_ARG_INFO( 0, arg3 ) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX( locale_4_args, 0, 0, 4 ) + ZEND_ARG_INFO( 0, arg1 ) + ZEND_ARG_INFO( 0, arg2 ) diff --git a/textproc/php-intl/patches/patch-af b/textproc/php-intl/patches/patch-af new file mode 100644 index 00000000000..f4dfed91adc --- /dev/null +++ b/textproc/php-intl/patches/patch-af @@ -0,0 +1,45 @@ +$NetBSD: patch-af,v 1.1.1.1 2010/03/21 16:57:13 jdolecek Exp $ + +--- msgformat/msgformat_class.c.orig 2010-03-11 00:20:56.000000000 +0100 ++++ msgformat/msgformat_class.c +@@ -77,34 +77,34 @@ zend_object_value MessageFormatter_objec + */ + + /* {{{ arginfo */ +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter___construct, 0, 0, 2) + ZEND_ARG_INFO(0, locale) + ZEND_ARG_INFO(0, pattern) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO(arginfo_messageformatter_geterrormessage, 0) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter_formatmessage, 0, 0, 3) + ZEND_ARG_INFO(0, locale) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, args) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter_format, 0, 0, 1) + ZEND_ARG_INFO(0, args) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter_setpattern, 0, 0, 1) + ZEND_ARG_INFO(0, pattern) + ZEND_END_ARG_INFO() + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter_parse, 0, 0, 1) + ZEND_ARG_INFO(0, source) + ZEND_END_ARG_INFO() diff --git a/textproc/php-intl/patches/patch-ag b/textproc/php-intl/patches/patch-ag new file mode 100644 index 00000000000..79b9a811300 --- /dev/null +++ b/textproc/php-intl/patches/patch-ag @@ -0,0 +1,13 @@ +$NetBSD: patch-ag,v 1.1.1.1 2010/03/21 16:57:13 jdolecek Exp $ + +--- normalizer/normalizer_class.c.orig 2010-03-11 00:18:31.000000000 +0100 ++++ normalizer/normalizer_class.c +@@ -29,7 +29,7 @@ zend_class_entry *Normalizer_ce_ptr = NU + + /* {{{ Normalizer methods arguments info */ + +-static ++PHP_INTL_ZEND_ARG_STATIC + ZEND_BEGIN_ARG_INFO_EX( normalizer_3_args, 0, 0, 3 ) + ZEND_ARG_INFO( 0, arg1 ) + ZEND_ARG_INFO( 0, arg2 ) diff --git a/textproc/php-intl/patches/patch-ah b/textproc/php-intl/patches/patch-ah new file mode 100644 index 00000000000..cd8b7046248 --- /dev/null +++ b/textproc/php-intl/patches/patch-ah @@ -0,0 +1,13 @@ +$NetBSD: patch-ah,v 1.1.1.1 2010/03/21 16:57:13 jdolecek Exp $ + +--- resourcebundle/resourcebundle_class.c.orig 2010-03-21 16:45:18.000000000 +0100 ++++ resourcebundle/resourcebundle_class.c +@@ -212,7 +212,7 @@ zval *resourcebundle_array_get(zval *obj + MAKE_STD_ZVAL(retval); + + resourcebundle_array_fetch(object, offset, retval, 1 TSRMLS_CC); +- retval->refcount--; ++ Z_DELREF_P(retval); + return retval; + } + /* }}} */ diff --git a/textproc/php-intl/patches/patch-aj b/textproc/php-intl/patches/patch-aj new file mode 100644 index 00000000000..eee7237cf3a --- /dev/null +++ b/textproc/php-intl/patches/patch-aj @@ -0,0 +1,31 @@ +$NetBSD: patch-aj,v 1.1.1.1 2010/03/21 16:57:13 jdolecek Exp $ + +--- resourcebundle/resourcebundle_iterator.c.orig 2010-03-15 23:03:30.000000000 +0100 ++++ resourcebundle/resourcebundle_iterator.c +@@ -18,6 +18,8 @@ + #include <zend.h> + #include <zend_API.h> + ++#include "php_intl.h" ++ + #include "resourcebundle/resourcebundle.h" + #include "resourcebundle/resourcebundle_class.h" + #include "resourcebundle/resourcebundle_iterator.h" +@@ -75,7 +77,7 @@ static void resourcebundle_iterator_dtor + + resourcebundle_iterator_invalidate( iter TSRMLS_CC ); + +- object->refcount--; ++ Z_DELREF_P(object); + + efree(iterator); + } +@@ -162,7 +164,7 @@ zend_object_iterator *resourcebundle_get + php_error( E_ERROR, "ResourceBundle does not support writable iterators" ); + } + +- object->refcount++; ++ Z_DELREF_P(object); + iterator->intern.data = (void *) object; + iterator->intern.funcs = &resourcebundle_iterator_funcs; + |