mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-20 15:25:36 +08:00
add parallel windows support
This commit is contained in:
@@ -190,7 +190,10 @@
|
|||||||
"parallel": {
|
"parallel": {
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "parallel",
|
"source": "parallel",
|
||||||
"arg-type-windows": "with"
|
"arg-type-windows": "with",
|
||||||
|
"lib-depends-windows": [
|
||||||
|
"pthreads4w"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"ldap": {
|
"ldap": {
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
|
|||||||
@@ -125,6 +125,12 @@
|
|||||||
"gmp.h"
|
"gmp.h"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"pthreads4w": {
|
||||||
|
"source": "pthreads4w",
|
||||||
|
"static-libs-windows": [
|
||||||
|
"libpthreadVC3.lib"
|
||||||
|
]
|
||||||
|
},
|
||||||
"icu": {
|
"icu": {
|
||||||
"source": "icu",
|
"source": "icu",
|
||||||
"cpp-library": true,
|
"cpp-library": true,
|
||||||
|
|||||||
@@ -52,6 +52,15 @@
|
|||||||
"path": "COPYING"
|
"path": "COPYING"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"pthreads4w": {
|
||||||
|
"type": "git",
|
||||||
|
"rev": "master",
|
||||||
|
"url": "https://git.code.sf.net/p/pthreads4w/code",
|
||||||
|
"license": {
|
||||||
|
"type": "file",
|
||||||
|
"path": "LICENSE"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ext-ds": {
|
"ext-ds": {
|
||||||
"type": "url",
|
"type": "url",
|
||||||
"url": "https://pecl.php.net/get/ds",
|
"url": "https://pecl.php.net/get/ds",
|
||||||
|
|||||||
29
src/SPC/builder/windows/library/pthreads4w.php
Normal file
29
src/SPC/builder/windows/library/pthreads4w.php
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace SPC\builder\windows\library;
|
||||||
|
|
||||||
|
class pthreads4w extends WindowsLibraryBase
|
||||||
|
{
|
||||||
|
public const NAME = 'pthreads4w';
|
||||||
|
|
||||||
|
protected function build(): void
|
||||||
|
{
|
||||||
|
cmd()->cd($this->source_dir)
|
||||||
|
->execWithWrapper(
|
||||||
|
$this->builder->makeSimpleWrapper(
|
||||||
|
'nmake /E /nologo /f Makefile ' .
|
||||||
|
'DESTROOT=' . BUILD_ROOT_PATH . ' ' .
|
||||||
|
'XCFLAGS="/MT" ' . // no dll
|
||||||
|
'EHFLAGS="/I. /DHAVE_CONFIG_H /Os /Ob2 /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED"'
|
||||||
|
),
|
||||||
|
'pthreadVC3.inlined_static_stamp'
|
||||||
|
);
|
||||||
|
copy($this->source_dir . '\libpthreadVC3.lib', BUILD_LIB_PATH . '\libpthreadVC3.lib');
|
||||||
|
copy($this->source_dir . '\_ptw32.h', BUILD_INCLUDE_PATH . '\_ptw32.h');
|
||||||
|
copy($this->source_dir . '\pthread.h', BUILD_INCLUDE_PATH . '\pthread.h');
|
||||||
|
copy($this->source_dir . '\sched.h', BUILD_INCLUDE_PATH . '\sched.h');
|
||||||
|
copy($this->source_dir . '\semaphore.h', BUILD_INCLUDE_PATH . '\semaphore.h');
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user