--with-pic and --enable-pic for other libraries that support them

This commit is contained in:
DubbleClick 2025-05-31 14:35:59 +07:00
parent 8767181a80
commit 2dbcbc6963
11 changed files with 16 additions and 6 deletions

View File

@ -25,7 +25,7 @@ class pdo_sqlsrv extends Extension
shell()->cd($this->source_dir)
->setEnv($env)
->execWithEnv(BUILD_BIN_PATH . '/phpize')
->execWithEnv('./configure ' . $this->getUnixConfigureArg(true) . ' --with-php-config=' . BUILD_BIN_PATH . '/php-config --enable-shared --disable-static')
->execWithEnv('./configure ' . $this->getUnixConfigureArg(true) . ' --with-php-config=' . BUILD_BIN_PATH . '/php-config --enable-shared --disable-static --with-pic')
->execWithEnv('make clean')
->execWithEnv('make -j' . $this->builder->concurrency)
->execWithEnv('make install');

View File

@ -49,7 +49,12 @@ class openssl extends BSDLibraryBase
}
shell()->cd($this->source_dir)
->exec(
->setEnv([
'CFLAGS' => $this->getLibExtraCFlags(),
'LDFLAGS' => $this->getLibExtraLdFlags(),
'LIBS' => $this->getLibExtraLibs() . " {$ex_lib}",
])
->execWithEnv(
"./Configure no-shared {$extra} " .
'--prefix=/ ' . // use prefix=/
"--libdir={$lib} " .

View File

@ -37,7 +37,7 @@ trait libacl
])
->execWithEnv('libtoolize --force --copy')
->execWithEnv('./autogen.sh || autoreconf -if')
->execWithEnv('./configure --prefix= --enable-static --disable-shared --disable-tests --disable-nls')
->execWithEnv('./configure --prefix= --enable-static --disable-shared --disable-tests --disable-nls --with-pic')
->execWithEnv("make -j {$this->builder->concurrency}")
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);

View File

@ -20,6 +20,7 @@ trait libiconv
'./configure ' .
'--enable-static ' .
'--disable-shared ' .
'--enable-pic ' .
'--enable-extra-encodings ' .
'--prefix='
)

View File

@ -26,6 +26,7 @@ trait libjpeg
"cmake {$this->builder->makeCmakeArgs()} " .
'-DENABLE_STATIC=ON ' .
'-DENABLE_SHARED=OFF ' .
'-DPOSITION_INDEPENDENT_CODE=ON ' .
'..'
)
->exec("cmake --build . -j {$this->builder->concurrency}")

View File

@ -30,7 +30,7 @@ trait libtiff
])
->execWithEnv(
'./configure ' .
'--enable-static --disable-shared ' .
'--enable-static --disable-shared --with-pic ' .
"{$extra_libs} " .
'--disable-cxx ' .
'--prefix='

View File

@ -35,6 +35,7 @@ trait libxslt
"{$this->builder->getOption('ld_library_path')} " .
'./configure ' .
'--enable-static --disable-shared ' .
'--with-pic ' .
'--without-python ' .
'--without-mem-debug ' .
'--without-crypto ' .

View File

@ -45,6 +45,7 @@ trait nghttp2
'./configure ' .
'--enable-static ' .
'--disable-shared ' .
'--with-pic ' .
'--enable-lib-only ' .
'--with-boost=no ' .
$args . ' ' .

View File

@ -23,7 +23,7 @@ trait onig
'LDFLAGS' => $this->getLibExtraLdFlags(),
'LIBS' => $this->getLibExtraLibs(),
])
->execWithEnv('./configure --enable-static --disable-shared --prefix=')
->execWithEnv('./configure --enable-static --disable-shared --enable-pic --prefix=')
->execWithEnv('make clean')
->execWithEnv("make -j{$this->builder->concurrency}")
->exec("make install DESTDIR={$destdir}");

View File

@ -14,7 +14,7 @@ trait sqlite
'LDFLAGS' => $this->getLibExtraLdFlags(),
'LIBS' => $this->getLibExtraLibs(),
])
->execWithEnv('./configure --enable-static --disable-shared --prefix=')
->execWithEnv('./configure --enable-static --disable-shared --with-pic --prefix=')
->execWithEnv('make clean')
->execWithEnv("make -j{$this->builder->concurrency}")
->execWithEnv('make install DESTDIR=' . BUILD_ROOT_PATH);

View File

@ -20,6 +20,7 @@ trait xz
'./configure ' .
'--enable-static ' .
'--disable-shared ' .
'--enable-pic ' .
'--disable-scripts ' .
'--disable-doc ' .
'--with-libiconv ' .