File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ ext-rar :
2+ type : php-extension
3+ artifact :
4+ source :
5+ type : git
6+ url : ' https://github.com/static-php/php-rar.git'
7+ rev : issue-php82
8+ extract : php-src/ext/rar
9+ metadata :
10+ license-files : [LICENSE]
11+ license : PHP-3.01
12+ lang : cpp
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Package \Extension ;
6+
7+ use Package \Target \php ;
8+ use StaticPHP \Attribute \Package \BeforeStage ;
9+ use StaticPHP \Attribute \Package \Extension ;
10+ use StaticPHP \Attribute \PatchDescription ;
11+ use StaticPHP \Package \PhpExtensionPackage ;
12+ use StaticPHP \Runtime \SystemTarget ;
13+ use StaticPHP \Util \FileSystem ;
14+
15+ #[Extension('rar ' )]
16+ class rar extends PhpExtensionPackage
17+ {
18+ #[BeforeStage('php ' , [php::class, 'buildconfForUnix ' ], 'ext-rar ' )]
19+ #[PatchDescription('rar extension workaround for newer Xcode clang (>= 15.0) ' )]
20+ public function patchBeforeBuildconf (): void
21+ {
22+ // workaround for newer Xcode clang (>= 15.0)
23+ if (SystemTarget::getTargetOS () === 'Darwin ' ) {
24+ FileSystem::replaceFileStr ("{$ this ->getSourceDir ()}/config.m4 " , '-Wall -fvisibility=hidden ' , '-Wall -Wno-incompatible-function-pointer-types -fvisibility=hidden ' );
25+ }
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments