From 7d1b2590181cb874d58ec0e6187dec2fdf1da026 Mon Sep 17 00:00:00 2001 From: Asen Alexandrov Date: Fri, 28 Apr 2023 11:51:16 +0300 Subject: [PATCH] fix: libpython3.11.pc --- python/v3.11.3/wlr-build.sh | 7 ++++--- scripts/build-helpers/wlr_package.sh | 2 +- scripts/build-helpers/wlr_pkg_config.sh | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/python/v3.11.3/wlr-build.sh b/python/v3.11.3/wlr-build.sh index c6c4967..5ddb46a 100644 --- a/python/v3.11.3/wlr-build.sh +++ b/python/v3.11.3/wlr-build.sh @@ -107,6 +107,7 @@ then create libpython3.11-aio.a addlib libpython3.11.a addlib ${WLR_DEPS_ROOT}/build-output/lib/wasm32-wasi/libz.a +addlib ${WLR_DEPS_ROOT}/build-output/lib/wasm32-wasi/libbz2.a addlib ${WLR_DEPS_ROOT}/build-output/lib/wasm32-wasi/libsqlite3.a addlib ${WLR_DEPS_ROOT}/build-output/lib/wasm32-wasi/libuuid.a addlib Modules/expat/libexpat.a @@ -121,11 +122,11 @@ EOF logStatus "Generating pkg-config file for libpython3.11.a" DESCRIPTION="libpython3.11 allows embedding the CPython interpreter" - EXTRA_LINK_FLAGS="-lpython3.11 -Wl,-z,stack-size=524288 -Wl,--stack-first -Wl,--initial-memory=10485760" + EXTRA_LINK_FLAGS="-lpython3.11 -Wl,-z,stack-size=524288 -Wl,--stack-first -Wl,--initial-memory=10485760 -lwasi-emulated-getpid -lwasi-emulated-signal -lwasi-emulated-process-clocks" - wlr_pkg_config_create_pc_file "libpython3.11" "${WLR_PACKAGE_VERSION}" "${DESCRIPTION}" "${EXTRA_LINK_FLAGS}" || exit 1 + PC_INCLUDE_SUBDIR=python3.11 wlr_pkg_config_create_pc_file "libpython3.11" "${WLR_PACKAGE_VERSION}" "${DESCRIPTION}" "${EXTRA_LINK_FLAGS}" || exit 1 - wlr_package_lib || exit 1 + WLR_PACKAGE_LIB_EXTRA_DIRS=usr wlr_package_lib || exit 1 fi logStatus "DONE. Artifacts in ${WLR_OUTPUT}" diff --git a/scripts/build-helpers/wlr_package.sh b/scripts/build-helpers/wlr_package.sh index b785432..5ef4bdd 100644 --- a/scripts/build-helpers/wlr_package.sh +++ b/scripts/build-helpers/wlr_package.sh @@ -18,7 +18,7 @@ function wlr_package_lib { --exclude=*.la \ --exclude=lib/wasm32-wasi/cmake \ include \ - lib + lib ${WLR_PACKAGE_LIB_EXTRA_DIRS} gzip -f ${_PACKAGE} } diff --git a/scripts/build-helpers/wlr_pkg_config.sh b/scripts/build-helpers/wlr_pkg_config.sh index 9fe4e91..447042f 100644 --- a/scripts/build-helpers/wlr_pkg_config.sh +++ b/scripts/build-helpers/wlr_pkg_config.sh @@ -39,7 +39,7 @@ function wlr_pkg_config_create_pc_file { prefix= exec_prefix=\${prefix} libdir=\${prefix}/lib/wasm32-wasi -includedir=\${prefix}/include +includedir=\${prefix}/include${PC_INCLUDE_SUBDIR:+/$PC_INCLUDE_SUBDIR} Name: ${LIBRARY_NAME} Description: ${DESCRIPTION} @@ -48,3 +48,4 @@ Libs: -L\${libdir} ${LINK_FLAGS} Cflags: -I\${includedir} EOF } +\