Skip to content

Use pkg-config on Windows #16830

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 0 additions & 188 deletions .circleci/config.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .github/scripts/windows/build_task.bat
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,24 @@ if not exist "%DEPS_DIR%" (
)
if %errorlevel% neq 0 exit /b 3

rem temporary work-around for missing pkg-config and .pc files
copy .pkg-config\pkg-config.exe %PHP_BUILD_CACHE_SDK_DIR%\bin\pkg-config.exe
copy .pkg-config\pkgconfig\* %DEPS_DIR%\lib\pkgconfig

cmd /c buildconf.bat --force
if %errorlevel% neq 0 exit /b 3

if "%THREAD_SAFE%" equ "0" set ADD_CONF=%ADD_CONF% --disable-zts
if "%INTRINSICS%" neq "" set ADD_CONF=%ADD_CONF% --enable-native-intrinsics=%INTRINSICS%

set PKG_CONFIG_PATH=%DEPS_DIR%\lib\pkgconfig
set CFLAGS=/W1 /WX

cmd /c configure.bat ^
--enable-snapshot-build ^
--disable-debug-pack ^
--without-analyzer ^
--enable-object-out-dir=%PHP_BUILD_OBJ_DIR% ^
--with-php-build=%DEPS_DIR% ^
%ADD_CONF% ^
--disable-test-ini
if %errorlevel% neq 0 exit /b 3
Expand Down
2 changes: 2 additions & 0 deletions .github/scripts/windows/test_task.bat
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ for %%i in (ldap) do (

set TEST_PHPDBG_EXECUTABLE=%PHP_BUILD_DIR%\phpdbg.exe

path=%DEPS_DIR%\bin;%PATH%

mkdir c:\tests_tmp

nmake test TESTS="%OPCACHE_OPTS% -g FAIL,BORK,LEAK,XLEAK --no-progress -q --offline --show-diff --show-slow 1000 --set-timeout 120 --temp-source c:\tests_tmp --temp-target c:\tests_tmp %PARALLEL%"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ env:
CXX: ccache g++
jobs:
LINUX_X64:
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
if: false
services:
mysql:
image: mysql:8.3
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
if: ${{ !matrix.asan }}
uses: ./.github/actions/verify-generated-files
LINUX_X32:
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
if: false
name: LINUX_X32_DEBUG_ZTS
runs-on: ubuntu-latest
timeout-minutes: 50
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
-d zend_extension=opcache.so
-d opcache.enable_cli=1
MACOS_DEBUG_NTS:
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
if: false
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -254,7 +254,7 @@ jobs:
run: .github/scripts/windows/test.bat
BENCHMARKING:
name: BENCHMARKING
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
if: false
runs-on: ubuntu-24.04
timeout-minutes: 50
steps:
Expand Down
Binary file added .pkg-config/pkg-config.exe
Binary file not shown.
10 changes: 10 additions & 0 deletions .pkg-config/pkgconfig/ICU.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=C:/usr
includedir=${prefix}/include
libdir=${prefix}/lib

Name: ICU
Description: winlibs ICU package
Url: https://github.com/winlibs/icu4c
Version: 75.1
Libs: -L${libdir} -licuuc -licudt -licuin -licuio
Cflags: -I${includedir} /std:c++17
9 changes: 9 additions & 0 deletions .pkg-config/pkgconfig/apache.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
prefix=C:/usr
libdir=${prefix}/lib/apache2_4
includedir=${prefix}/include/apache2_4

Name: apache
Description: winlibs apache package
Version: 2.4.43
Libs: -L${libdir} -llibhttpd -llibapr-1 -llibaprutil-1
Cflags: -I${includedir}
11 changes: 11 additions & 0 deletions .pkg-config/pkgconfig/cyrus-sasl.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix=C:/usr
libdir=${prefix}/lib
includedir=${prefix}/include

Name: cyrus-sasl
Description: winlib cyrus-sasl package
URL: https://github.com/winlibs/cyrus-sasl
Version: 3.0.15pl1
Requires: openssl
Libs: -L${libdir} -llibsasl
Cflags: -I${includedir}
9 changes: 9 additions & 0 deletions .pkg-config/pkgconfig/fbclient.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
prefix=C:/usr
libdir=${prefix}/lib
includedir=${prefix}/include/interbase

Name: fbclient
Description: winlibs fbclient package
Version: 4.0.4
Libs: -L${libdir} -lfbclient_ms
Cflags: -I${includedir}
10 changes: 10 additions & 0 deletions .pkg-config/pkgconfig/freetype.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=C:/usr
libdir=${prefix}/lib
includedir=${prefix}/include/freetype2

Name: freetype
Description: winlibs freetype package
Url: https://github.com/winlibs/freetype
Version: 2.13.3
Libs: -L${libdir} -lfreetype_a
Cflags: -I${includedir}
10 changes: 10 additions & 0 deletions .pkg-config/pkgconfig/gettext.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=C:/usr
libdir=${prefix}/lib
includedir=${prefix}/include

Name: gettext
Description: winlibs gettext package
Url: https://github.com/winlibs/gettext
Version: 0.18.3
Libs: -L${libdir} -llibintl_a
Cflags: -I${includedir}
10 changes: 10 additions & 0 deletions .pkg-config/pkgconfig/libargon.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=C:/usr
libdir=${prefix}/lib
includedir=${prefix}/include

Name: libargon
Description: winlibs libargon package
Url: https://github.com/winlibs/argon2
Version: 20190702
Libs: -L${libdir} -largon2_a
Cflags: -I${includedir}
10 changes: 10 additions & 0 deletions .pkg-config/pkgconfig/libavif.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=C:/usr
libdir=${prefix}/lib
includedir=${prefix}/include/webp

Name: libavif
Description: winlibs libavif package
Url: https://github.com/winlibs/libavif
Version: 1.1.1
Libs: -L${libdir} -lavif_a -laom_a
Cflags: -I${includedir}
10 changes: 10 additions & 0 deletions .pkg-config/pkgconfig/libbzip2.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=C:/usr
libdir=${prefix}/lib
includedir=${prefix}/include

Name: libbzip2
Description: winlibs libbzip2 package
Url: https://github.com/winlibs/libbzip2
Version: 1.0.8
Libs: -L${libdir} -llibbz2_a
Cflags: -I${includedir}
11 changes: 11 additions & 0 deletions .pkg-config/pkgconfig/libcurl.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix=C:/usr
libdir=${prefix}/lib
includedir=${prefix}/include

Name: libcurl
Description: winlibs libcurl package
Url: https://github.com/winlibs/cURL
Version: 8.10.1
Requires: libssh2 nghttp2
Libs: -L${libdir} -llibcurl_a
Cflags: -I${includedir}
10 changes: 10 additions & 0 deletions .pkg-config/pkgconfig/libenchant.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=C:/usr
libdir=${prefix}/lib
includedir=${prefix}/include

Name: libenchant
Description: winlibs libenchant package
Url: https://github.com/winlibs/enchant
Version: 2.2.8-1
Libs: -L${libdir} -llibenchant2
Cflags: -I${includedir}
10 changes: 10 additions & 0 deletions .pkg-config/pkgconfig/libexslt.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=C:/usr
libdir=${prefix}/lib
includedir=${prefix}/include

Name: libexslt
Description: winlibs libexslt package
Url: https://github.com/winlibs/libxslt
Version: 1.1.39
Libs: -L${libdir} -llibexslt_a
Cflags: -I${includedir} /DLIBEXSLT_STATIC
Loading