-
-
Notifications
You must be signed in to change notification settings - Fork 381
Expand file tree
/
Copy pathbzip2.php
More file actions
24 lines (20 loc) · 607 Bytes
/
bzip2.php
File metadata and controls
24 lines (20 loc) · 607 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
declare(strict_types=1);
namespace Package\Artifact;
use StaticPHP\Artifact\Artifact;
use StaticPHP\Attribute\Artifact\AfterSourceExtract;
use StaticPHP\Attribute\PatchDescription;
use StaticPHP\Util\FileSystem;
class bzip2
{
#[AfterSourceExtract('bzip2')]
#[PatchDescription('Patch bzip2 Makefile to add -fPIC flag for position-independent code')]
public function patchBzip2Makefile(Artifact $artifact): void
{
FileSystem::replaceFileStr(
$artifact->getSourceDir() . '/Makefile',
'CFLAGS=-Wall',
'CFLAGS=-fPIC -Wall'
);
}
}