diff options
author | Vlad Glagolev | 2013-04-16 13:47:55 +0400 |
---|---|---|
committer | Vlad Glagolev | 2013-04-16 13:47:55 +0400 |
commit | ca90dd02385c918ac14daf4ca95cff4a28f379a1 (patch) | |
tree | bf1f15429dfb0a2d634ed0041b78b20232b82509 /php-pear | |
parent | ea79438c3313f4cf84c50aad4c4b788249218247 (diff) |
imagick: => 3.0.1
Diffstat (limited to 'php-pear')
-rwxr-xr-x | php-pear/imagick/DETAILS | 4 | ||||
-rw-r--r-- | php-pear/imagick/HISTORY | 6 | ||||
-rwxr-xr-x | php-pear/imagick/PRE_BUILD | 8 | ||||
-rw-r--r-- | php-pear/imagick/header.patch | 13 | ||||
-rw-r--r-- | php-pear/imagick/php54.patch | 113 |
5 files changed, 142 insertions, 2 deletions
diff --git a/php-pear/imagick/DETAILS b/php-pear/imagick/DETAILS index c1b1cf1cdd..4ee24d928b 100755 --- a/php-pear/imagick/DETAILS +++ b/php-pear/imagick/DETAILS @@ -1,8 +1,8 @@ SPELL=imagick - VERSION=2.3.0 + VERSION=3.0.1 SOURCE=$SPELL-$VERSION.tgz SOURCE_URL[0]=http://pecl.php.net/get/$SOURCE - SOURCE_HASH=sha512:4ba1528398a0d7db547d9243c028ebaffc5d469942d830102da5f422a9d9cb7d6285ba6292503219183e0c5be20aad24c4eb376eda31edc0c1d84b6cef4c3c59 + SOURCE_HASH=sha512:a8a9872662a8657a91dec793e8dd86ea492fa523f362cc9489f73b5f5f666872db95a929259dfde32b5370133fa4672b39007b08a7fec32be6a462873d7e6a4c SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION" WEB_SITE=http://pecl.php.net/package/imagick/ LICENSE[0]=PHP diff --git a/php-pear/imagick/HISTORY b/php-pear/imagick/HISTORY index 760ed853ae..3858b986de 100644 --- a/php-pear/imagick/HISTORY +++ b/php-pear/imagick/HISTORY @@ -1,3 +1,9 @@ +2013-04-16 Vlad Glagolev <stealth@sourcemage.org> + * DETAILS: updated spell to 3.0.1 + * PRE_BUILD: apply patches + * php54.patch: added, to fix build with PHP >=5.4 + * header.patch: added, to use proper path for include files + 2009-09-14 Vlad Glagolev <stealth@sourcemage.org> * DEPENDS: added missing dependency diff --git a/php-pear/imagick/PRE_BUILD b/php-pear/imagick/PRE_BUILD index 4e954a341a..ddeaff0acf 100755 --- a/php-pear/imagick/PRE_BUILD +++ b/php-pear/imagick/PRE_BUILD @@ -1,6 +1,14 @@ +. "$GRIMOIRE/FUNCTIONS" && + default_pre_build && cd "$SOURCE_DIRECTORY" && +patch -p1 < "$SPELL_DIRECTORY/header.patch" && + +if spell_ok php && is_version_less 5.3.9999 $(installed_version php); then + patch -p1 < "$SPELL_DIRECTORY/php54.patch" +fi && + rm -f "$BUILD_DIRECTORY/package.xml" && phpize diff --git a/php-pear/imagick/header.patch b/php-pear/imagick/header.patch new file mode 100644 index 0000000000..59a01742e4 --- /dev/null +++ b/php-pear/imagick/header.patch @@ -0,0 +1,13 @@ +--- imagick-305615/config.m4 2010/11/21 17:00:04 ++++ imagick-329769/config.m4 2013/03/13 13:14:23 +@@ -52,7 +52,9 @@ + else + AC_MSG_CHECKING(for MagickWand.h header file) + +- if test -r $WAND_DIR/include/ImageMagick/wand/MagickWand.h; then ++ if test -r $WAND_DIR/include/ImageMagick-6/wand/MagickWand.h; then ++ AC_MSG_RESULT(found in $WAND_DIR/include/ImageMagick-6/wand/MagickWand.h) ++ elif test -r $WAND_DIR/include/ImageMagick/wand/MagickWand.h; then + AC_MSG_RESULT(found in $WAND_DIR/include/ImageMagick/wand/MagickWand.h) + else + AC_MSG_ERROR(Cannot locate header file MagickWand.h) diff --git a/php-pear/imagick/php54.patch b/php-pear/imagick/php54.patch new file mode 100644 index 0000000000..596388eaaf --- /dev/null +++ b/php-pear/imagick/php54.patch @@ -0,0 +1,113 @@ +Common subdirectories: imagick-3.0.1/examples and imagick-3.0.1-3/examples +diff -u imagick-3.0.1/imagick.c imagick-3.0.1-3/imagick.c +--- imagick-3.0.1/imagick.c 2010-11-19 05:16:01.000000000 +0800 ++++ imagick-3.0.1-3/imagick.c 2012-05-10 09:05:51.000000000 +0800 +@@ -2374,7 +2374,11 @@ + /* ALLOC_HASHTABLE(intern->zo.properties); */ + + zend_object_std_init(&intern->zo, class_type TSRMLS_CC); ++#if PHP_VERSION_ID < 50399 + zend_hash_copy(intern->zo.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref,(void *) &tmp, sizeof(zval *)); ++#else ++ object_properties_init(&(intern->zo), class_type); ++#endif + + retval.handle = zend_objects_store_put(intern, NULL, (zend_objects_free_object_storage_t) php_imagick_object_free_storage, NULL TSRMLS_CC); + retval.handlers = (zend_object_handlers *) &imagick_object_handlers; +@@ -2409,7 +2413,11 @@ + /* ALLOC_HASHTABLE(intern->zo.properties); */ + + zend_object_std_init(&intern->zo, class_type TSRMLS_CC); ++#if PHP_VERSION_ID < 50399 + zend_hash_copy(intern->zo.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref,(void *) &tmp, sizeof(zval *)); ++#else ++ object_properties_init(&(intern->zo), class_type); ++#endif + + retval.handle = zend_objects_store_put(intern, NULL, (zend_objects_free_object_storage_t) php_imagickdraw_object_free_storage, NULL TSRMLS_CC); + retval.handlers = (zend_object_handlers *) &imagickdraw_object_handlers; +@@ -2443,7 +2451,11 @@ + /* ALLOC_HASHTABLE(intern->zo.properties); */ + + zend_object_std_init(&intern->zo, class_type TSRMLS_CC); ++#if PHP_VERSION_ID < 50399 + zend_hash_copy(intern->zo.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref,(void *) &tmp, sizeof(zval *)); ++#else ++ object_properties_init(&(intern->zo), class_type); ++#endif + + retval.handle = zend_objects_store_put(intern, NULL, (zend_objects_free_object_storage_t) php_imagickpixeliterator_object_free_storage, NULL TSRMLS_CC); + retval.handlers = (zend_object_handlers *) &imagickpixeliterator_object_handlers; +@@ -2471,7 +2483,11 @@ + /* ALLOC_HASHTABLE(intern->zo.properties); */ + + zend_object_std_init(&intern->zo, class_type TSRMLS_CC); ++#if PHP_VERSION_ID < 50399 + zend_hash_copy(intern->zo.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref,(void *) &tmp, sizeof(zval *)); ++#else ++ object_properties_init(&(intern->zo), class_type); ++#endif + + retval.handle = zend_objects_store_put(intern, NULL, (zend_objects_free_object_storage_t) php_imagickpixel_object_free_storage, NULL TSRMLS_CC); + retval.handlers = (zend_object_handlers *) &imagickpixel_object_handlers; +diff -u imagick-3.0.1/imagick_helpers.c imagick-3.0.1-3/imagick_helpers.c +--- imagick-3.0.1/imagick_helpers.c 2010-11-19 05:16:01.000000000 +0800 ++++ imagick-3.0.1-3/imagick_helpers.c 2012-05-10 09:02:42.000000000 +0800 +@@ -723,9 +723,11 @@ + + int php_imagick_safe_mode_check(const char *filename TSRMLS_DC) + { ++#if PHP_VERSION_ID < 50399 + if (PG(safe_mode) && (!php_checkuid_ex(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR, CHECKUID_NO_ERRORS))) { + return IMAGICK_READ_WRITE_SAFE_MODE_ERROR; + } ++#endif + + if (PG(open_basedir) && php_check_open_basedir_ex(filename, 0 TSRMLS_CC)) { + return IMAGICK_READ_WRITE_OPEN_BASEDIR_ERROR; +diff -u imagick-3.0.1/imagick_read.c imagick-3.0.1-3/imagick_read.c +--- imagick-3.0.1/imagick_read.c 2010-11-19 05:16:01.000000000 +0800 ++++ imagick-3.0.1-3/imagick_read.c 2012-05-10 09:03:18.000000000 +0800 +@@ -176,7 +176,11 @@ + { + int status = IMAGICK_READ_WRITE_NO_ERROR; + ++#if PHP_VERSION_ID < 50399 + if (PG(open_basedir) || PG(safe_mode)) { ++#else ++ if (PG(open_basedir)) { ++#endif + char *absolute = php_imagick_get_absolute_filename(filename, filename_len TSRMLS_CC); + + if (absolute) { +diff -u imagick-3.0.1/php_imagick_macros.h imagick-3.0.1-3/php_imagick_macros.h +--- imagick-3.0.1/php_imagick_macros.h 2010-11-19 05:16:01.000000000 +0800 ++++ imagick-3.0.1-3/php_imagick_macros.h 2012-05-10 09:02:07.000000000 +0800 +@@ -145,6 +145,7 @@ + value = (type)NULL; \ + } \ + ++#if PHP_VERSION_ID < 50399 + #define IMAGICK_SAFE_MODE_CHECK(filename_, status_)\ + if (filename_) { \ + if (strlen(filename_) > MAXPATHLEN) { \ +@@ -156,7 +157,18 @@ + if (php_check_open_basedir_ex(filename_, 0 TSRMLS_CC)) { \ + status_ = IMAGICK_READ_WRITE_OPEN_BASEDIR_ERROR; \ + } \ +- } \ ++ } ++#else ++#define IMAGICK_SAFE_MODE_CHECK(filename_, status_)\ ++ if (filename_) { \ ++ if (strlen(filename_) > MAXPATHLEN) { \ ++ status_ = IMAGICK_READ_WRITE_FILENAME_TOO_LONG; \ ++ } \ ++ if (php_check_open_basedir_ex(filename_, 0 TSRMLS_CC)) { \ ++ status_ = IMAGICK_READ_WRITE_OPEN_BASEDIR_ERROR; \ ++ } \ ++ } ++#endif + + #define IMAGICK_HAS_FORMAT(buffer, magick_wand, free_buffer)\ + buffer = MagickGetImageFormat(magick_wand);\ |