@@ -284,17 +284,17 @@ function generateConfigureArgs(config: BuildConfig, installPrefix: string): stri
284
284
`--with-openssl=${ launchpadPath } /openssl.org/v1.1.1w` ,
285
285
`--with-sodium=${ launchpadPath } /libsodium.org/v1.0.18` ,
286
286
`--with-xsl=${ launchpadPath } /gnome.org/libxslt/v1.1.43` ,
287
- `--with-zlib=${ launchpadPath } /zlib.net/v1.3.1`
287
+ `--with-zlib=${ launchpadPath } /zlib.net/v1.3.1` ,
288
+ `--with-bz2=${ launchpadPath } /bzip.org/v1.0.8`
288
289
]
289
290
290
291
// Platform-specific arguments
291
292
if ( config . platform === 'darwin' ) {
292
293
return [
293
294
...baseArgs ,
294
295
...dependencyArgs ,
295
- '--with-iconv' , // Re-enable iconv with Launchpad dependencies
296
+ '--with-iconv' ,
296
297
'--enable-opcache' ,
297
- '--with-bz2' ,
298
298
'--with-kerberos' ,
299
299
'--with-libedit' ,
300
300
'--with-zip' ,
@@ -307,7 +307,6 @@ function generateConfigureArgs(config: BuildConfig, installPrefix: string): stri
307
307
...dependencyArgs ,
308
308
'--with-iconv' , // Use system iconv on Linux
309
309
'--enable-opcache' ,
310
- '--with-bz2' ,
311
310
'--with-kerberos' ,
312
311
'--with-readline' ,
313
312
'--with-zip' ,
@@ -497,7 +496,7 @@ ${essentialExtensions
497
496
498
497
; Enable additional available extensions (excluding problematic ones)
499
498
${ extensions
500
- . filter ( ext => ! essentialExtensions . includes ( ext ) &&
499
+ . filter ( ext => ! essentialExtensions . includes ( ext ) &&
501
500
! [ 'opcache' , 'pdo_firebird' , 'snmp' , 'pcntl' , 'posix' ] . includes ( ext ) )
502
501
. map ( ext => `extension=${ ext } ` )
503
502
. join ( '\n' ) }
@@ -687,7 +686,7 @@ async function buildPhp(config: BuildConfig): Promise<string> {
687
686
let buildEnv = { ...process . env }
688
687
const homeDir = process . env . HOME || process . env . USERPROFILE || '/Users/chrisbreuer'
689
688
const launchpadRoot = `${ homeDir } /.local`
690
-
689
+
691
690
// Add essential Launchpad paths to PATH
692
691
const launchpadBinPaths = [
693
692
`${ launchpadRoot } /gnu.org/autoconf/v2.72.0/bin` ,
@@ -696,9 +695,9 @@ async function buildPhp(config: BuildConfig): Promise<string> {
696
695
`${ launchpadRoot } /gnu.org/automake/v1.18.1/bin` ,
697
696
`${ launchpadRoot } /freedesktop.org/pkg-config/v0.29.2/bin`
698
697
]
699
-
698
+
700
699
buildEnv . PATH = `${ launchpadBinPaths . join ( ':' ) } :${ buildEnv . PATH } `
701
-
700
+
702
701
// Set up targeted PKG_CONFIG_PATH for essential libraries
703
702
const pkgConfigPaths = [
704
703
`${ launchpadRoot } /gnu.org/libiconv/v1.18.0/lib/pkgconfig` ,
@@ -865,21 +864,21 @@ exec "$@"
865
864
// Source the Launchpad environment and run configure in the same shell
866
865
const buildEnvScript = `${ homeDir } /.local/build-env.sh`
867
866
let configureCommand : string
868
-
867
+
869
868
// Check if Launchpad environment script exists, otherwise install dependencies first
870
869
if ( existsSync ( buildEnvScript ) ) {
871
870
configureCommand = `source ${ buildEnvScript } && ./configure ${ configureArgs . join ( ' ' ) } `
872
871
} else {
873
872
log ( '⚠️ Launchpad build-env.sh not found, installing PHP dependencies first' )
874
-
873
+
875
874
// Install PHP dependencies using Launchpad
876
875
try {
877
876
execSync ( 'bun ./launchpad install php --deps-only' , {
878
877
stdio : 'inherit' ,
879
878
cwd : process . cwd ( )
880
879
} )
881
880
log ( '✅ Launchpad dependencies installed successfully' )
882
-
881
+
883
882
// Now try to source the environment script
884
883
if ( existsSync ( buildEnvScript ) ) {
885
884
configureCommand = `source ${ buildEnvScript } && ./configure ${ configureArgs . join ( ' ' ) } `
0 commit comments