Add support for PyPy3 executables like libpypy3-c.so (fixes #955)

This commit is contained in:
Yamashita, Yuu 2017-07-26 01:06:04 +00:00
parent 7dae19765c
commit adc0365923

View file

@ -987,19 +987,20 @@ build_package_pypy() {
mkdir -p "${PREFIX_PATH}/bin" "${PREFIX_PATH}/lib" mkdir -p "${PREFIX_PATH}/bin" "${PREFIX_PATH}/lib"
local pypy libpypy python local pypy libpypy python
shopt -s nullglob shopt -s nullglob
for pypy in "bin/pypy"*; do for bin in "bin/pypy"*; do
case "${pypy##*/}" in case "${bin##*/}" in
"libpypy"* )
( cd "${PREFIX_PATH}/lib" && ln -fs "../bin/${bin##*/}" "${bin##*/}" )
;;
"pypy-stm" ) "pypy-stm" )
python="bin/python" python="bin/python"
( cd "${PREFIX_PATH}/bin" && ln -fs "${bin##*/}" "${python##*/}" )
;; ;;
* ) "pypy"* )
python="$(basename "${pypy}" | sed -e 's/pypy/python/')" python="$(basename "${pypy}" | sed -e 's/pypy/python/')"
( cd "${PREFIX_PATH}/bin" && ln -fs "${bin##*/}" "${python##*/}" )
;; ;;
esac esac
( cd "${PREFIX_PATH}/bin" && ln -fs "${pypy##*/}" "${python##*/}" )
done
for libpypy in "bin/libpypy-c."*; do
( cd "${PREFIX_PATH}/lib" && ln -fs "../bin/$(basename "${libpypy}")" "$(basename "${libpypy}")" )
done done
shopt -u nullglob shopt -u nullglob
} }
@ -1014,11 +1015,11 @@ build_package_pypy_builder() {
return 1 return 1
fi fi
{ mkdir -p "bin" "lib" { mkdir -p "bin" "lib"
if [ -x "pypy-c" ]; then for pypy in "pypy"*; do
mv -f "pypy-c" "bin/pypy" mv -f "${pypy}" "bin/${pypy##*/}"
fi done
for libpypy in "libpypy-c."*; do for libpypy in "libpypy"*; do
mv -f "${libpypy}" "bin/" mv -f "${libpypy}" "bin/${libpypy##*/}"
done done
} >&4 2>&1 } >&4 2>&1
build_package_pypy build_package_pypy