Skip to content

Commit

Permalink
fix: libpython3.11.pc
Browse files Browse the repository at this point in the history
  • Loading branch information
assambar committed Apr 28, 2023
1 parent ae546b7 commit 7d1b259
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions python/v3.11.3/wlr-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}"
2 changes: 1 addition & 1 deletion scripts/build-helpers/wlr_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}

Expand Down
3 changes: 2 additions & 1 deletion scripts/build-helpers/wlr_pkg_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -48,3 +48,4 @@ Libs: -L\${libdir} ${LINK_FLAGS}
Cflags: -I\${includedir}
EOF
}
\

0 comments on commit 7d1b259

Please sign in to comment.