diff --git a/config/pkg/ext/ext-parallel.yml b/config/pkg/ext/ext-parallel.yml new file mode 100644 index 00000000..a3e91efe --- /dev/null +++ b/config/pkg/ext/ext-parallel.yml @@ -0,0 +1,9 @@ +ext-parallel: + type: php-extension + artifact: + source: + type: pecl + name: parallel + metadata: + license-files: [LICENSE] + license: PHP-3.01 diff --git a/src/Package/Extension/parallel.php b/src/Package/Extension/parallel.php new file mode 100644 index 00000000..0ec58595 --- /dev/null +++ b/src/Package/Extension/parallel.php @@ -0,0 +1,35 @@ +getOption('enable-zts')) { + throw new WrongUsageException('ext-parallel must be built with ZTS builds. Use "--enable-zts" option!'); + } + } + + #[BeforeStage('php', [php::class, 'buildconfForUnix'], 'ext-parallel')] + #[PatchDescription('Fix parallel m4 hardcoded PHP_VERSION check')] + public function patchBeforeBuildconf(): bool + { + FileSystem::replaceFileRegex("{$this->getSourceDir()}/config.m4", '/PHP_VERSION=.*/m', ''); + return true; + } +}