[93629] trunk/dports/php

ryandesign at macports.org ryandesign at macports.org
Sun May 27 22:00:51 PDT 2012


Revision: 93629
          https://trac.macports.org/changeset/93629
Author:   ryandesign at macports.org
Date:     2012-05-27 22:00:51 -0700 (Sun, 27 May 2012)
Log Message:
-----------
php-FreeImage: unified port; update patch for php 5.4

Modified Paths:
--------------
    trunk/dports/php/php-FreeImage/Portfile
    trunk/dports/php/php-FreeImage/files/patch-freeimage.c.diff

Added Paths:
-----------
    trunk/dports/php/php-FreeImage/

Modified: trunk/dports/php/php-FreeImage/Portfile
===================================================================
--- trunk/dports/php/php5-FreeImage/Portfile	2012-05-25 21:53:07 UTC (rev 93529)
+++ trunk/dports/php/php-FreeImage/Portfile	2012-05-28 05:00:51 UTC (rev 93629)
@@ -2,17 +2,20 @@
 # $Id$
 
 PortSystem              1.0
-PortGroup               php5extension 1.0
+PortGroup               php 1.1
 
-php5extension.setup     freeimage 0.1 pecl
+name                    php-FreeImage
+version                 0.1
 revision                1
-name                    php5-FreeImage
 license                 PHP
 categories              php devel
 platforms               darwin
 maintainers             nomaintainer
-homepage                http://pecl.php.net/package/FreeImage
 
+php.branches            5.3 5.4
+php.pecl                yes
+php.pecl.prerelease     yes
+
 description             Provides a wrapper to the FreeImage library.
 
 long_description        This extension is a wrapper for the FreeImage library \
@@ -24,19 +27,22 @@
                         sha1    a81bddb31962f4054cddf1fc4b35d9c2ae7476d7 \
                         rmd160  7a19f53176fc303c7ef04f06671b9eeeadbcec5a
 
-distname                FreeImage-${version}
-
-patchfiles              patch-freeimage.c.diff
-
-depends_lib-append      port:freeimage
-
-configure.args-append   --with-freeimage=${prefix}
-
-post-destroot {
-    set docdir ${prefix}/share/doc/${name}
-    xinstall -d ${destroot}${docdir}
-    xinstall -m 644 -W ${worksrcpath} CREDITS README ${destroot}${docdir}
-    copy ${worksrcpath}/examples ${destroot}${docdir}
+if {${name} != ${subport}} {
+    depends_lib-append      port:freeimage
+    
+    post-extract {
+        # DOS to UNIX line endings so we can patch.
+        reinplace "s|\r||g" ${worksrcpath}/freeimage.c
+    }
+    
+    patchfiles              patch-freeimage.c.diff
+    
+    configure.args-append   --with-freeimage=${prefix}
+    
+    post-destroot {
+        set docdir ${prefix}/share/doc/${subport}
+        xinstall -d ${destroot}${docdir} ${destroot}${prefix}/share/examples
+        xinstall -m 644 -W ${worksrcpath} CREDITS README ${destroot}${docdir}
+        copy ${worksrcpath}/examples ${destroot}${prefix}/share/examples/${subport}
+    }
 }
-
-livecheck.regex         {(\d+(?:\.\d+)*)</a></th>}

Modified: trunk/dports/php/php-FreeImage/files/patch-freeimage.c.diff
===================================================================
--- trunk/dports/php/php5-FreeImage/files/patch-freeimage.c.diff	2012-05-25 21:53:07 UTC (rev 93529)
+++ trunk/dports/php/php-FreeImage/files/patch-freeimage.c.diff	2012-05-28 05:00:51 UTC (rev 93629)
@@ -1,11 +1,20 @@
---- freeimage.c.orig	2010-01-13 22:48:39.000000000 +0100
-+++ freeimage.c	2010-01-13 22:49:08.000000000 +0100
+--- freeimage.c.orig	2004-07-22 08:32:54.000000000 -0500
++++ freeimage.c	2012-05-25 17:48:52.000000000 -0500
+@@ -134,7 +134,7 @@
+  *
+  * Every user visible function must have an entry in freeimage_functions[].
+  */
+-function_entry freeimage_functions[] = {
++zend_function_entry freeimage_functions[] = {
+ 	/* Bitmap management functions */
+ 	PHP_FE(freeimage_load,					NULL)
+ 	PHP_FE(freeimage_save,					NULL)
 @@ -1828,7 +1828,7 @@
- 	if (zend_parse_parameters(argc TSRMLS_CC, "lsbb|b", &fif, &filename, &filename_len, &create_new, &read_only, &keep_cache_in_memory) == FAILURE) 
- 		return;
- 	multibitmap = (FIMULTIBITMAP *)emalloc(sizeof(FIMULTIBITMAP));
--	multibitmap = FreeImage_OpenMultiBitmap((FREE_IMAGE_FORMAT)fif, filename, create_new, read_only, keep_cache_in_memory);
-+	multibitmap = FreeImage_OpenMultiBitmap((FREE_IMAGE_FORMAT)fif, filename, create_new, read_only, keep_cache_in_memory, /* int flags FI_DEFAULT(0) */ 0);
- 	if (multibitmap != NULL) {
- 		ZEND_REGISTER_RESOURCE(return_value, multibitmap, le_freeimage_multibitmap);
- 	} else {
+ 	if (zend_parse_parameters(argc TSRMLS_CC, "lsbb|b", &fif, &filename, &filename_len, &create_new, &read_only, &keep_cache_in_memory) == FAILURE) 
+ 		return;
+ 	multibitmap = (FIMULTIBITMAP *)emalloc(sizeof(FIMULTIBITMAP));
+-	multibitmap = FreeImage_OpenMultiBitmap((FREE_IMAGE_FORMAT)fif, filename, create_new, read_only, keep_cache_in_memory);
++	multibitmap = FreeImage_OpenMultiBitmap((FREE_IMAGE_FORMAT)fif, filename, create_new, read_only, keep_cache_in_memory, /* int flags FI_DEFAULT(0) */ 0);
+ 	if (multibitmap != NULL) {
+ 		ZEND_REGISTER_RESOURCE(return_value, multibitmap, le_freeimage_multibitmap);
+ 	} else {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120527/5ec1de45/attachment-0001.html>


More information about the macports-changes mailing list