diff options
author | XU Benda <heroxbd@gmail.com> | 2011-12-22 13:37:11 +0900 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2016-06-25 22:45:04 +0900 |
commit | d370474e3f85a3bbcbb2026ca5ec55257b7a0f39 (patch) | |
tree | f3f08abbf1b4d4aab3a9ad9d52b6351751d9eb52 /wrappers | |
parent | config.site: add musl libc support (diff) | |
download | crossdev-d370474e3f85a3bbcbb2026ca5ec55257b7a0f39.tar.gz crossdev-d370474e3f85a3bbcbb2026ca5ec55257b7a0f39.tar.bz2 crossdev-d370474e3f85a3bbcbb2026ca5ec55257b7a0f39.zip |
prefixify build system and scripts.
Diffstat (limited to 'wrappers')
-rw-r--r-- | wrappers/Makefile | 3 | ||||
-rwxr-xr-x | wrappers/cross-emerge | 7 | ||||
-rwxr-xr-x | wrappers/emerge-wrapper | 2 | ||||
-rw-r--r-- | wrappers/etc/portage/make.conf | 2 |
4 files changed, 11 insertions, 3 deletions
diff --git a/wrappers/Makefile b/wrappers/Makefile index 144ecc1..df5eb2b 100644 --- a/wrappers/Makefile +++ b/wrappers/Makefile @@ -9,6 +9,9 @@ SITE = $(PREFIX)/share/crossdev/include/site TOPDIR = all: + sed -i -e "s,@GENTOO_PORTAGE_EPREFIX@,$(EPREFIX),g" cross-emerge + sed -i -e "s,@GENTOO_PORTAGE_EPREFIX@,$(EPREFIX),g" emerge-wrapper + sed -i -e "s,@GENTOO_PORTAGE_EPREFIX@,$(EPREFIX),g" etc/portage/make.conf install: $(INSTALL_DIR) $(DESTDIR)/$(PREFIX)/bin/ $(DESTDIR)/$(SITE) diff --git a/wrappers/cross-emerge b/wrappers/cross-emerge index fc6117e..fb98951 100755 --- a/wrappers/cross-emerge +++ b/wrappers/cross-emerge @@ -9,7 +9,12 @@ if [ -z "${CHOST}" ] ; then fi export CHOST -: ${SYSROOT=/usr/${CHOST}} +EPREFIX="@GENTOO_PORTAGE_EPREFIX@" +if [[ ${EPREFIX} == "@"GENTOO_PORTAGE_EPREFIX"@" ]] ; then + EPREFIX="" +fi + +: ${SYSROOT=${EPREFIX}/usr/${CHOST}} : ${PORTAGE_CONFIGROOT=${SYSROOT}} export SYSROOT PORTAGE_CONFIGROOT diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper index e375025..c123259 100755 --- a/wrappers/emerge-wrapper +++ b/wrappers/emerge-wrapper @@ -91,7 +91,7 @@ cross_wrap_bin() cross_wrap() { - SYSROOT=/usr/${CHOST} + SYSROOT=@GENTOO_PORTAGE_EPREFIX@/usr/${CHOST} cross_wrap_bin "$@" || return $? if [[ -d ${SYSROOT} ]] && [[ ! -d ${SYSROOT}/etc ]] ; then cross_wrap_etc "$@" diff --git a/wrappers/etc/portage/make.conf b/wrappers/etc/portage/make.conf index 65214dc..573ead0 100644 --- a/wrappers/etc/portage/make.conf +++ b/wrappers/etc/portage/make.conf @@ -4,7 +4,7 @@ ARCH=__ARCH__ HOSTCC=__CBUILD__-gcc -ROOT=/usr/${CHOST}/ +ROOT=@GENTOO_PORTAGE_EPREFIX@/usr/${CHOST}/ ACCEPT_KEYWORDS="__ARCH__ ~__ARCH__" |