summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rules/pre/Rules.make3
-rw-r--r--scripts/lib/ptxd_make_00-init.sh40
-rw-r--r--scripts/lib/ptxd_make_world_common.sh2
3 files changed, 14 insertions, 31 deletions
diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make
index 622af08a7..04d132af4 100644
--- a/rules/pre/Rules.make
+++ b/rules/pre/Rules.make
@@ -144,8 +144,7 @@ CROSS_LIB_DIR := $(shell ptxd_get_lib_dir)
#
CROSS_ENV_PKG_CONFIG := \
SYSROOT="$(PTXDIST_SYSROOT_TARGET)" \
- $(PTXDIST_CROSS_ENV_PKG_CONFIG) \
- PKG_CONFIG="$(PTXDIST_SYSROOT_CROSS)/bin/$(COMPILER_PREFIX)pkg-config"
+ $(PTXDIST_CROSS_ENV_PKG_CONFIG)
#
# The ac_cv_* variables are needed to tell configure scripts not to
diff --git a/scripts/lib/ptxd_make_00-init.sh b/scripts/lib/ptxd_make_00-init.sh
index 9c280fb19..3383cae00 100644
--- a/scripts/lib/ptxd_make_00-init.sh
+++ b/scripts/lib/ptxd_make_00-init.sh
@@ -286,34 +286,15 @@ ptxd_init_cross_env() {
pkg_system_libpath=( "${pkg_libdir[@]/%//../../lib}" "${pkg_libdir[@]/%//../lib}" "/usr/lib" "/lib" )
pkg_system_incpath=( "${pkg_libdir[@]/%//../../include}" "${pkg_libdir[@]/%//../include}" "/usr/include" "/include" )
- #
- # PKG_CONFIG_PATH contains additional pkg-config search
- # directories. It's searched before searching the path specified
- # in _LIBDIR.
- #
-
- #
- # If we have pkg_config_path defined in our ptxconfig,
- # prefix them with sysroot and add to pkg_path.
- #
- # FIXME: we only take care of normal sysroot for now, no support
- # for production releases, though.
- #
- local -a pkg_path
- local -a opt_pkg_path
- if opt_pkg_path=( $(ptxd_get_ptxconf PTXCONF_PKG_CONFIG_PATH) ); then
- IFS=":"
- local -a sysroot
- sysroot=( ${PTXDIST_PATH_SYSROOT} )
- IFS="${orig_IFS}"
-
- pkg_path=( "${opt_pkg_path[@]/#/${sysroot[0]}}" )
- fi
-
IFS=":"
- PTXDIST_CROSS_ENV_PKG_CONFIG="PKG_CONFIG_PATH='${pkg_path[*]}' PKG_CONFIG_LIBDIR='${pkg_libdir[*]}' PKG_CONFIG_SYSTEM_LIBRARY_PATH='${pkg_system_libpath[*]}' PKG_CONFIG_SYSTEM_INCLUDE_PATH='${pkg_system_incpath[*]}'"
- export PTXDIST_CROSS_ENV_PKG_CONFIG
+ local pc_path="PKG_CONFIG_PATH=''"
+ local pc_libdir="PKG_CONFIG_LIBDIR='${pkg_libdir[*]}'"
+ local pc_sys_lib_path="PKG_CONFIG_SYSTEM_LIBRARY_PATH='${pkg_system_libpath[*]}'"
+ local pc_syc_inc_path="PKG_CONFIG_SYSTEM_INCLUDE_PATH='${pkg_system_incpath[*]}'"
IFS="${orig_IFS}"
+ local pc="PKG_CONFIG='$(ptxd_get_ptxconf PTXCONF_SYSROOT_CROSS)/bin/$(ptxd_get_ptxconf PTXCONF_COMPILER_PREFIX)pkg-config'"
+ PTXDIST_CROSS_ENV_PKG_CONFIG="${pc_path} ${pc_libdir} ${pc_sys_lib_path} ${pc_syc_inc_path} ${pc}"
+ export PTXDIST_CROSS_ENV_PKG_CONFIG
}
#
@@ -369,9 +350,12 @@ ptxd_init_host_env() {
pkg_libdir=( "${prefix[@]/%//${lib_dir}/pkgconfig}" "${prefix[@]/%//share/pkgconfig}" )
IFS=":"
- PTXDIST_HOST_ENV_PKG_CONFIG="PKG_CONFIG_PATH='' PKG_CONFIG_LIBDIR='${pkg_libdir[*]}'"
- export PTXDIST_HOST_ENV_PKG_CONFIG
+ local pc_path="PKG_CONFIG_PATH=''"
+ local pc_libdir="PKG_CONFIG_LIBDIR='${pkg_libdir[*]}'"
IFS="${orig_IFS}"
+ local pc="PKG_CONFIG='$(ptxd_get_ptxconf PTXCONF_SYSROOT_HOST)/bin/pkg-config'"
+ PTXDIST_HOST_ENV_PKG_CONFIG="${pc_path} ${pc_libdir} ${pc}"
+ export PTXDIST_HOST_ENV_PKG_CONFIG
}
ptxd_init_devpkg()
diff --git a/scripts/lib/ptxd_make_world_common.sh b/scripts/lib/ptxd_make_world_common.sh
index 85471ce22..ebc3ac22d 100644
--- a/scripts/lib/ptxd_make_world_common.sh
+++ b/scripts/lib/ptxd_make_world_common.sh
@@ -161,7 +161,7 @@ ptxd_make_world_init_compat() {
pkg_env="SYSROOT='${pkg_sysroot_dir}' V=${PTXDIST_VERBOSE} VERBOSE=${PTXDIST_VERBOSE/0/}"
case "${pkg_type}" in
target) pkg_env="${PTXDIST_CROSS_ENV_PKG_CONFIG} ${pkg_env}" ;;
- host|cross) pkg_env="PKG_CONFIG_LIBDIR='${PTXDIST_SYSROOT_HOST}/lib/pkgconfig:${PTXDIST_SYSROOT_HOST}/share/pkgconfig' ${pkg_env}" ;;
+ host|cross) pkg_env="${PTXDIST_HOST_ENV_PKG_CONFIG} ${pkg_env}" ;;
esac
}
export -f ptxd_make_world_init_compat