Skip to content

Commit 56b0ff0

Browse files
committed
Merge branch 'PHP-5.6'
* PHP-5.6: updated NEWS Fixed bug #65406 Enchant broker plugins are in the wrong place in windows
2 parents b9bc84e + f040b48 commit 56b0ff0

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

win32/build/mkdist.php

+17-6
Original file line numberDiff line numberDiff line change
@@ -322,13 +322,24 @@ function extract_file_from_tarball($pkg, $filename, $dest_dir) /* {{{ */
322322
copy($filename, "$dist_dir/" . basename($filename));
323323
}
324324
$ENCHANT_DLLS = array(
325-
'glib-2.dll',
326-
'gmodule-2.dll',
327-
'libenchant_myspell.dll',
328-
'libenchant_ispell.dll',
325+
array('', 'glib-2.dll'),
326+
array('', 'gmodule-2.dll'),
327+
array('lib/enchant', 'libenchant_myspell.dll'),
328+
array('lib/enchant', 'libenchant_ispell.dll'),
329329
);
330-
foreach ($ENCHANT_DLLS as $filename) {
331-
copy($php_build_dir . '/bin/' . $filename, "$dist_dir/" . basename($filename));
330+
foreach ($ENCHANT_DLLS as $dll) {
331+
$dest = "$dist_dir/$dll[0]";
332+
$filename = $dll[1];
333+
334+
if (!file_exists("$dest") || !is_dir("$dest")) {
335+
if (!mkdir("$dest", 0777, true)) {
336+
echo "WARNING: couldn't create '$dest' for enchant plugins ";
337+
}
338+
}
339+
340+
if (!copy($php_build_dir . '/bin/' . $filename, "$dest/" . basename($filename))) {
341+
echo "WARNING: couldn't copy $filename into the dist dir";
342+
}
332343
}
333344

334345
/* and those for pecl */

0 commit comments

Comments
 (0)