TL;DR: see the question at the end.

Hi Mike,

"PECL Announce" in php.pecl.dev (Tue, 19 Jan 2016 07:07:41 +0000):
>The new PECL package raphf-1.1.2 (stable) has been released at 
>http://pecl.php.net/.
>
>Release notes
>-------------
>* Fixed release stability to stable

There are lots of problems with this release (and the others of the same
date) when compiling on Windows. See 
http://windows.php.net/downloads/pecl/releases/propro/1.0.2/logs/
for the errors.

The config.w32:

ARG_ENABLE("raphf", "for raphf support", "no");

if (PHP_RAPHF == "yes") {
        var PHP_RAPHF_HEADERS=glob("src/*.h"),
         PHP_RAPHF_SOURCES=glob("src/*.c");

        EXTENSION("raphf", PHP_RAPHF_SOURCES);
        PHP_INSTALL_HEADERS("ext/raphf", "php_propro.h");
        for (var i=0; i<PHP_RAPHF_HEADERS.length; ++i) {
                var basename = FSO.GetFileName(PHP_RAPHF_HEADERS[i]);
                copy_and_subst(PHP_RAPHF_HEADERS[i], basename, []);
                PHP_INSTALL_HEADERS("ext/raphf", basename);
        }

        AC_DEFINE("HAVE_RAPHF", 1);
}

EXTENSION() needs a second argument with a space delimited string of all
sources. The 2nd argument now is a javascript array, which results in
"Microsoft JScript runtime error: Object doesn't support this property or
method." Solution:

        var PHP_RAPHF_SRC_ARRAY=glob(configure_module_dirname +
                "/src/*.c");
        var PHP_RAPHF_SOURCES="";
        for (var i=0; i<PHP_RAPHF_SRC_ARRAY.length; ++i) {
                var basename = FSO.GetFileName(PHP_RAPHF_SRC_ARRAY[i]);
                copy_and_subst("src/" + basename, basename, []);
                PHP_RAPHF_SOURCES = PHP_RAPHF_SOURCES + " " + basename;
        }

This line:
        PHP_INSTALL_HEADERS("ext/raphf", "php_propro.h");
should of course be:
        PHP_INSTALL_HEADERS("ext/raphf", "php_raphf.h");

For one problem I did not find a real solution. QUESTION for all readers:

Is there a way for a config.w32 to deal with the situation when there is
no c-file in the root-dir of the extension? 

Mike's answer in
https://github.com/m6w6/ext-http/issues/15#issuecomment-147960198:
>the build system really should not depend on that; I think that's
>something for the Windows team to fix?

I ended up with copying all c-files from /src to the root, but this is not
satisfactory.

Jan

-- 
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to