File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -87,8 +87,8 @@ public static function patchBeforeBuildconf(BuilderBase $builder): void
87
87
}
88
88
89
89
// patch configure.ac
90
- /*
91
90
$ musl = SPCTarget::getLibc () === 'musl ' ;
91
+ FileSystem::backupFile (SOURCE_PATH . '/php-src/configure.ac ' );
92
92
FileSystem::replaceFileStr (
93
93
SOURCE_PATH . '/php-src/configure.ac ' ,
94
94
'if command -v ldd >/dev/null && ldd --version 2>&1 | grep ^musl >/dev/null 2>&1 ' ,
@@ -97,7 +97,6 @@ public static function patchBeforeBuildconf(BuilderBase $builder): void
97
97
if (getenv ('SPC_LIBC ' ) === false && ($ libc = SPCTarget::getLibc ()) !== null ) {
98
98
putenv ("SPC_LIBC= {$ libc }" );
99
99
}
100
- */
101
100
102
101
// patch php-src/build/php.m4 PKG_CHECK_MODULES -> PKG_CHECK_MODULES_STATIC
103
102
FileSystem::replaceFileStr (SOURCE_PATH . '/php-src/build/php.m4 ' , 'PKG_CHECK_MODULES( ' , 'PKG_CHECK_MODULES_STATIC( ' );
@@ -132,6 +131,11 @@ public static function patchBeforeConfigure(BuilderBase $builder): void
132
131
if (is_unix ()) {
133
132
FileSystem::replaceFileRegex (SOURCE_PATH . '/php-src/configure ' , '/have_capstone="yes"/ ' , 'have_capstone="no" ' );
134
133
}
134
+
135
+ if (file_exists (SOURCE_PATH . '/php-src/configure.ac.bak ' )) {
136
+ // restore configure.ac
137
+ FileSystem::restoreBackupFile (SOURCE_PATH . '/php-src/configure.ac ' );
138
+ }
135
139
}
136
140
137
141
/**
You can’t perform that action at this time.
0 commit comments