summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-10-26 13:23:34 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-10-26 13:23:34 +0000
commit1f97e6a1b3053fa2948b9c23c0d7c7d55c9de0e4 (patch)
tree2138ddba0fe7c385b027bc52bd275e8101806b1f /subr
parent62e7f894c91d37e3b5fa321fb3ae2195aebc74f4 (diff)
downloadmidipix_build-1f97e6a1b3053fa2948b9c23c0d7c7d55c9de0e4.tar.bz2
midipix_build-1f97e6a1b3053fa2948b9c23c0d7c7d55c9de0e4.tar.xz
subr/pkg_install.subr:pkgp_install_dlltool(): generate library archives via {perk,mdso} (via midipix.)
subr/pkg_install.subr:pkgp_install_dlltool(): correctly infer {so,lib} file names.
Diffstat (limited to 'subr')
-rw-r--r--subr/pkg_install.subr35
1 files changed, 19 insertions, 16 deletions
diff --git a/subr/pkg_install.subr b/subr/pkg_install.subr
index fb1cba43..ac963f7a 100644
--- a/subr/pkg_install.subr
+++ b/subr/pkg_install.subr
@@ -15,26 +15,29 @@ pkgp_install_dlltool() {
local _so_fname _so_name;
if [ "${PKG_BUILD_TYPE}" != "host" ] \
&& test_cmd perk \
- && test_cmd ${PKG_TARGET}-dlltool; then
+ && test_cmd ${PKG_TARGET}-mdso; then
for _so_fname in \
- $(find \( -name "*.so" \
- -or -name "*.so.[0-9]" \
- -or -name "*.so.[0-9].[0-9]" \
- -or -name "*.so.[0-9].[0-9].[0-9]" \) -printf '%P\n');
+ $(find \( -name "*.so" \
+ -or -name "*.so.*" \
+ -or -name "*.so.*.*" \
+ -or -name "*.so.*.*.*" \) -printf '%P\n');
do
- if [ \( -e ${_so_fname%.so}.lib.a \) -o \
- \( ! -e ${PKG_PREFIX}/lib/$(basename ${_so_fname}) \) -o \
- \( "$(readlink -f ${_so_fname})" = "/dev/null" \) ]; then
+ case "${_so_fname}" in
+ *.so) _so_fname_ver=""; ;;
+ *.so.*) _so_fname_ver="${_so_fname##*.so.}"; ;;
+ esac;
+ _so_name="${_so_fname%%.so*}";
+ _lib_fname="${_so_name}${_so_fname_ver:+.${_so_fname_ver}}.lib.a";
+ if [ -e "${_lib_fname}" ] \
+ || [ ! -e "${PKG_PREFIX}/lib/$(basename "${_so_fname}")" ] \
+ || [ "$(readlink -f "${_so_fname}")" = "/dev/null" \) ]; then
continue;
else
- _so_name="${_so_fname%.so}";
- echo perk -epdlltool ${_so_fname} \> ${_so_fname%.so}.def;
- perk -epdlltool ${_so_fname} > ${_so_fname%.so}.def;
- echo ${PKG_TARGET}-dlltool -l ${_so_fname%.so}.lib.a \
- -D ${_so_fname} -d ${_so_fname%.so}.def;
- ${PKG_TARGET}-dlltool -l ${_so_fname%.so}.lib.a \
- -D ${_so_fname} -d ${_so_fname%.so}.def;
- build_fileop cp ${_so_fname%.so}.lib.a "${PKG_PREFIX}/lib";
+ echo perk -e "${_so_fname}" \|\
+ ${PKG_TARGET}-mdso -i ${_lib_fname} -n "${_so_fname}" -
+ perk -e "${_so_fname}" |\
+ ${PKG_TARGET}-mdso -i ${_lib_fname} -n "${_so_fname}" -
+ build_fileop cp "${_lib_fname}" "${PKG_PREFIX}/lib";
fi;
done;
fi;