Hi,
Having a deeper look, your php-imlib package is still using format 1.0,
which annoyed me. I've attached the changes which I propose to upload.
This changes to format 3.0 (quilt), puts the old patch into quilt
format, and adds my fix for the call-time pass-by-reference problem.
Please let me know if that's still ok to upload with these changes. I
believe it is, but I still think it's better to ask first... ;)
Cheers,
Thomas
diff -u -N -r php-imlib-0.7.orig/config.m4 php-imlib-0.7/config.m4
--- php-imlib-0.7.orig/config.m4 2012-05-09 10:06:23.000000000 +0000
+++ php-imlib-0.7/config.m4 2012-05-09 10:05:44.000000000 +0000
@@ -25,16 +25,6 @@
IMLIB2_LIBDIR=$IMLIB2_DIR/lib
IMLIB2_INCDIR=$IMLIB2_DIR/include
- dnl In theory we should be able to use imlib2-config --cflags, but
- dnl it's not smart enough to know when Imlib2 was built without X
- dnl support anyway -- might as well use AC_PATH_X and skip
- dnl path-hunting for imlib2-config itself...
-
- AC_PATH_X([X], [X11/Xlib.h], [XOpenDisplay(NULL)])
- if test "x$have_x" = "xyes"; then
- PHP_ADD_INCLUDE($x_includes)
- fi
-
AC_TEMP_LDFLAGS(-L$IMLIB2_LIBDIR,[
AC_CHECK_LIB(Imlib2, imlib_load_image, [AC_DEFINE(HAVE_IMLIB2,1,[ ])],
[AC_MSG_ERROR(Imlib2 module requires CVS Imlib2)])
diff -u -N -r php-imlib-0.7.orig/debian/changelog php-imlib-0.7/debian/changelog
--- php-imlib-0.7.orig/debian/changelog 2012-05-09 10:06:23.000000000 +0000
+++ php-imlib-0.7/debian/changelog 2012-05-09 10:12:14.000000000 +0000
@@ -1,3 +1,11 @@
+php-imlib (0.7-4.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Switching to format 3.0 (quilt).
+ * Added a patch to remove call-time pass-by-reference (Closes: #658954).
+
+ -- Thomas Goirand <[email protected]> Wed, 09 May 2012 09:57:10 +0000
+
php-imlib (0.7-4) unstable; urgency=high
* Fix FTBFS with PHP 5.4. Thanks to Lior Kaplan for the patch.
diff -u -N -r php-imlib-0.7.orig/debian/patches/removes-call-time-pass-by-reference-in-docs-folder php-imlib-0.7/debian/patches/removes-call-time-pass-by-reference-in-docs-folder
--- php-imlib-0.7.orig/debian/patches/removes-call-time-pass-by-reference-in-docs-folder 1970-01-01 00:00:00.000000000 +0000
+++ php-imlib-0.7/debian/patches/removes-call-time-pass-by-reference-in-docs-folder 2012-05-09 10:05:33.000000000 +0000
@@ -0,0 +1,37 @@
+Description: removes call-time pass-by-reference in docs folder
+Author: Thomas Goirand <[email protected]>
+Forwarded: no
+
+--- php-imlib-0.7.orig/docs/class.ImlibText.php
++++ php-imlib-0.7/docs/class.ImlibText.php
+@@ -102,7 +102,7 @@ class ImlibText extends ImlibColor
+ if (!is_resource($this->fnt))
+ return false;
+
+- return imlib_get_text_size($this->fnt,$str,&$fw,&$fh,$dir);
++ return imlib_get_text_size($this->fnt,$str,$fw,$fh,$dir);
+ }
+
+ /**
+--- php-imlib-0.7.orig/docs/class.ImlibPoly.php
++++ php-imlib-0.7/docs/class.ImlibPoly.php
+@@ -147,7 +147,7 @@ class ImlibPoly extends ImlibCliprect
+ if (!is_resource($this->poly))
+ return false;
+
+- imlib_polygon_get_bounds($this->poly,&$x1,&$y1,&$x2,&$y2);
++ imlib_polygon_get_bounds($this->poly,$x1,$y1,$x2,$y2);
+ }
+
+ /**
+--- php-imlib-0.7.orig/docs/class.ImlibImage.php
++++ php-imlib-0.7/docs/class.ImlibImage.php
+@@ -237,7 +237,7 @@ class ImlibImage
+ if (!is_resource($this->id))
+ return false;
+
+- if (!imlib_dump_image($this->id,&$err,$quality))
++ if (!imlib_dump_image($this->id,$err,$quality))
+ return false;
+ else
+ return true;
diff -u -N -r php-imlib-0.7.orig/debian/patches/series php-imlib-0.7/debian/patches/series
--- php-imlib-0.7.orig/debian/patches/series 1970-01-01 00:00:00.000000000 +0000
+++ php-imlib-0.7/debian/patches/series 2012-05-09 10:05:06.000000000 +0000
@@ -0,0 +1,2 @@
+tweaks-imlib.c-and-config.m4
+removes-call-time-pass-by-reference-in-docs-folder
diff -u -N -r php-imlib-0.7.orig/debian/patches/tweaks-imlib.c-and-config.m4 php-imlib-0.7/debian/patches/tweaks-imlib.c-and-config.m4
--- php-imlib-0.7.orig/debian/patches/tweaks-imlib.c-and-config.m4 1970-01-01 00:00:00.000000000 +0000
+++ php-imlib-0.7/debian/patches/tweaks-imlib.c-and-config.m4 2012-05-09 10:03:32.000000000 +0000
@@ -0,0 +1,70 @@
+Description: Tweaks imlib.c and config.m4
+Author: Unkonwn (probably Steve...)
+Forwarded: no
+
+--- php-imlib-0.7.orig/imlib.c
++++ php-imlib-0.7/imlib.c
+@@ -42,7 +42,17 @@
+
+ ZEND_DECLARE_MODULE_GLOBALS(imlib);
+
+-static
++ ZEND_BEGIN_ARG_INFO(second_arg_force_ref, 0)
++ ZEND_ARG_PASS_INFO(0)
++ ZEND_ARG_PASS_INFO(1)
++ ZEND_END_ARG_INFO();
++
++ ZEND_BEGIN_ARG_INFO(third_arg_force_ref, 0)
++ ZEND_ARG_PASS_INFO(0)
++ ZEND_ARG_PASS_INFO(0)
++ ZEND_ARG_PASS_INFO(1)
++ ZEND_END_ARG_INFO();
++
+ ZEND_BEGIN_ARG_INFO(third_and_fourth_arg_force_ref, 0)
+ ZEND_ARG_PASS_INFO(0)
+ ZEND_ARG_PASS_INFO(0)
+@@ -50,7 +60,6 @@ static
+ ZEND_ARG_PASS_INFO(1)
+ ZEND_END_ARG_INFO();
+
+-static
+ ZEND_BEGIN_ARG_INFO(second_through_fifth_arg_force_ref, 0)
+ ZEND_ARG_PASS_INFO(0)
+ ZEND_ARG_PASS_INFO(1)
+@@ -64,7 +73,7 @@ static int le_imlib_font;
+ static int le_imlib_img;
+ static int le_imlib_poly;
+
+-function_entry imlib_functions[] = {
++zend_function_entry imlib_functions[] = {
+ PHP_FE(imlib_add_color_to_color_range,NULL)
+ PHP_FE(imlib_blend_image_onto_image,NULL)
+ PHP_FE(imlib_clone_image,NULL)
+@@ -121,7 +130,7 @@ function_entry imlib_functions[] = {
+
+ PHP_INI_BEGIN()
+ STD_PHP_INI_ENTRY("imlib.font_path",
+- "/usr/local/share/fonts",
++ "/usr/share/fonts/truetype",
+ PHP_INI_SYSTEM|PHP_INI_PERDIR,
+ OnUpdateString,
+ font_path,
+--- php-imlib-0.7.orig/config.m4
++++ php-imlib-0.7/config.m4
+@@ -25,6 +25,16 @@ if test "$PHP_IMLIB" != "no"; then
+ IMLIB2_LIBDIR=$IMLIB2_DIR/lib
+ IMLIB2_INCDIR=$IMLIB2_DIR/include
+
++ dnl In theory we should be able to use imlib2-config --cflags, but
++ dnl it's not smart enough to know when Imlib2 was built without X
++ dnl support anyway -- might as well use AC_PATH_X and skip
++ dnl path-hunting for imlib2-config itself...
++
++ AC_PATH_X([X], [X11/Xlib.h], [XOpenDisplay(NULL)])
++ if test "x$have_x" = "xyes"; then
++ PHP_ADD_INCLUDE($x_includes)
++ fi
++
+ AC_TEMP_LDFLAGS(-L$IMLIB2_LIBDIR,[
+ AC_CHECK_LIB(Imlib2, imlib_load_image, [AC_DEFINE(HAVE_IMLIB2,1,[ ])],
+ [AC_MSG_ERROR(Imlib2 module requires CVS Imlib2)])
diff -u -N -r php-imlib-0.7.orig/debian/source/format php-imlib-0.7/debian/source/format
--- php-imlib-0.7.orig/debian/source/format 1970-01-01 00:00:00.000000000 +0000
+++ php-imlib-0.7/debian/source/format 2012-05-09 09:58:17.000000000 +0000
@@ -0,0 +1 @@
+3.0 (quilt)
diff -u -N -r php-imlib-0.7.orig/imlib.c php-imlib-0.7/imlib.c
--- php-imlib-0.7.orig/imlib.c 2012-05-09 10:06:23.000000000 +0000
+++ php-imlib-0.7/imlib.c 2012-05-09 10:05:44.000000000 +0000
@@ -42,17 +42,7 @@
ZEND_DECLARE_MODULE_GLOBALS(imlib);
- ZEND_BEGIN_ARG_INFO(second_arg_force_ref, 0)
- ZEND_ARG_PASS_INFO(0)
- ZEND_ARG_PASS_INFO(1)
- ZEND_END_ARG_INFO();
-
- ZEND_BEGIN_ARG_INFO(third_arg_force_ref, 0)
- ZEND_ARG_PASS_INFO(0)
- ZEND_ARG_PASS_INFO(0)
- ZEND_ARG_PASS_INFO(1)
- ZEND_END_ARG_INFO();
-
+static
ZEND_BEGIN_ARG_INFO(third_and_fourth_arg_force_ref, 0)
ZEND_ARG_PASS_INFO(0)
ZEND_ARG_PASS_INFO(0)
@@ -60,6 +50,7 @@
ZEND_ARG_PASS_INFO(1)
ZEND_END_ARG_INFO();
+static
ZEND_BEGIN_ARG_INFO(second_through_fifth_arg_force_ref, 0)
ZEND_ARG_PASS_INFO(0)
ZEND_ARG_PASS_INFO(1)
@@ -73,7 +64,7 @@
static int le_imlib_img;
static int le_imlib_poly;
-zend_function_entry imlib_functions[] = {
+function_entry imlib_functions[] = {
PHP_FE(imlib_add_color_to_color_range,NULL)
PHP_FE(imlib_blend_image_onto_image,NULL)
PHP_FE(imlib_clone_image,NULL)
@@ -130,7 +121,7 @@
PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("imlib.font_path",
- "/usr/share/fonts/truetype",
+ "/usr/local/share/fonts",
PHP_INI_SYSTEM|PHP_INI_PERDIR,
OnUpdateString,
font_path,