diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2009-11-06 11:08:07 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2009-11-09 17:02:07 +0100 |
commit | 706e680ffa13a8456b29cbb5cf494a862f4e6659 (patch) | |
tree | 5f9e1f0fb5243c0694cbb2045d58c7cfa5ed7084 | |
parent | 7ad1fdc5d5b6580daf0ef7460a5e2104bb9b5ff8 (diff) | |
download | ptxdist-706e680ffa13a8456b29cbb5cf494a862f4e6659.tar.gz ptxdist-706e680ffa13a8456b29cbb5cf494a862f4e6659.tar.xz |
[ptxd_make_world_install] move sysroot calculation into ptxd_make_world_common
..and introduce the variable: "pkg_sysroot_dir" which points to the
package's sysroot.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r-- | scripts/lib/ptxd_make_world_common.sh | 10 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_world_install.sh | 16 |
2 files changed, 14 insertions, 12 deletions
diff --git a/scripts/lib/ptxd_make_world_common.sh b/scripts/lib/ptxd_make_world_common.sh index 18db8f4ad..7e69dfb4e 100644 --- a/scripts/lib/ptxd_make_world_common.sh +++ b/scripts/lib/ptxd_make_world_common.sh @@ -132,6 +132,16 @@ ptxd_make_world_init_compat() { pkg_tags_opt="${pkg_tags_opt:-tags}" + # + # pkg_sysroot_dir + # + case "${pkg_stamp}" in + initramfs-*|klibc-*) pkg_sysroot_dir="${PTXDIST_SYSROOT_TARGET}/usr/lib/klibc" ;; + host-*|cross-*) pkg_sysroot_dir="";; + *) pkg_sysroot_dir="${PTXDIST_SYSROOT_TARGET}" ;; + esac + + # pkg_env case "${pkg_type}" in target) pkg_env="${PTXDIST_CROSS_ENV_PKG_CONFIG}" ;; diff --git a/scripts/lib/ptxd_make_world_install.sh b/scripts/lib/ptxd_make_world_install.sh index 7b09037c6..5800f5012 100644 --- a/scripts/lib/ptxd_make_world_install.sh +++ b/scripts/lib/ptxd_make_world_install.sh @@ -52,27 +52,19 @@ ptxd_make_world_install_target() { return fi && - local sysroot - case "${pkg_stamp}" in - initramfs-*|klibc-*) - sysroot="${PTXDIST_SYSROOT_TARGET}/usr/lib/klibc" ;; - *) - sysroot="${PTXDIST_SYSROOT_TARGET}" ;; - esac - # prefix paths in la files with sysroot find "${pkg_pkgdir}" -name "*.la" -print0 | xargs -r -0 -- \ sed -i \ - -e "/^dependency_libs/s:\( \)\(/lib\|/usr/lib\):\1${sysroot}\2:g" \ - -e "/^libdir=/s:\(libdir='\)\(/lib\|/usr/lib\):\1${sysroot}\2:g" && + -e "/^dependency_libs/s:\( \)\(/lib\|/usr/lib\):\1${pkg_sysroot_dir}\2:g" \ + -e "/^libdir=/s:\(libdir='\)\(/lib\|/usr/lib\):\1${pkg_sysroot_dir}\2:g" && check_pipe_status && # make pkgconfig's pc files relocatable find "${pkg_pkgdir}" -name "*.pc" -print0 | \ - xargs -r -0 gawk -f "${PTXDIST_LIB_DIR}/ptxd_make_world_install_mangle_pc.awk" + xargs -r -0 gawk -f "${PTXDIST_LIB_DIR}/ptxd_make_world_install_mangle_pc.awk" && check_pipe_status && - cp -dprf -- "${pkg_pkgdir}"/* "${sysroot}" + cp -dprf -- "${pkg_pkgdir}"/* "${pkg_sysroot_dir}" } export -f ptxd_make_world_install_target |