summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2006-04-25 18:49:52 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2006-04-25 18:49:52 +0000
commit30e62c9cf55601ee0a3eb529f3da92f7ead31493 (patch)
tree5105413ece1d9ad4fe3b82272f0d5c86ddb653fe /sys-freebsd/freebsd-lib
parentStable on sparc wrt #130529 (diff)
downloadgentoo-2-30e62c9cf55601ee0a3eb529f3da92f7ead31493.tar.gz
gentoo-2-30e62c9cf55601ee0a3eb529f3da92f7ead31493.tar.bz2
gentoo-2-30e62c9cf55601ee0a3eb529f3da92f7ead31493.zip
Improve support for crosscompilation, now freebsd-lib actually compiles and install fine on Gentoo/Linux AMD64.
(Portage version: 2.1_pre9-r4)
Diffstat (limited to 'sys-freebsd/freebsd-lib')
-rw-r--r--sys-freebsd/freebsd-lib/ChangeLog12
-rw-r--r--sys-freebsd/freebsd-lib/freebsd-lib-6.0-r2.ebuild48
2 files changed, 49 insertions, 11 deletions
diff --git a/sys-freebsd/freebsd-lib/ChangeLog b/sys-freebsd/freebsd-lib/ChangeLog
index 2b6b59f6cdff..2fcdcfa49d5e 100644
--- a/sys-freebsd/freebsd-lib/ChangeLog
+++ b/sys-freebsd/freebsd-lib/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sys-freebsd/freebsd-lib
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/ChangeLog,v 1.7 2006/04/20 07:40:12 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/ChangeLog,v 1.8 2006/04/25 18:49:52 flameeyes Exp $
+
+ 25 Apr 2006; Diego Pettenò <flameeyes@gentoo.org>
+ freebsd-lib-6.0-r2.ebuild:
+ Improve support for crosscompilation, now freebsd-lib actually compiles and
+ install fine on Gentoo/Linux AMD64.
+
+ 25 Apr 2006; Diego Pettenò <flameeyes@gentoo.org>
+ freebsd-lib-6.0-r2.ebuild:
+ Improve support for crosscompilation, now freebsd-lib actually compiles and
+ install fine on Gentoo/Linux AMD64.
*freebsd-lib-6.0-r2 (20 Apr 2006)
diff --git a/sys-freebsd/freebsd-lib/freebsd-lib-6.0-r2.ebuild b/sys-freebsd/freebsd-lib/freebsd-lib-6.0-r2.ebuild
index 48b8cb81c4ef..27f10c5b4bba 100644
--- a/sys-freebsd/freebsd-lib/freebsd-lib-6.0-r2.ebuild
+++ b/sys-freebsd/freebsd-lib/freebsd-lib-6.0-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/freebsd-lib-6.0-r2.ebuild,v 1.1 2006/04/20 07:40:12 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/freebsd-lib-6.0-r2.ebuild,v 1.2 2006/04/25 18:49:52 flameeyes Exp $
inherit bsdmk freebsd flag-o-matic toolchain-funcs
@@ -31,8 +31,10 @@ DEPEND="${RDEPEND}
=sys-freebsd/freebsd-mk-defs-${RV}*
=sys-freebsd/freebsd-sources-${RV}*"
-PROVIDE="virtual/libc
- virtual/os-headers"
+if [[ ${CATEGORY/cross-} == {CATEGORY} ]]; then
+ PROVIDE="virtual/libc
+ virtual/os-headers"
+fi
S="${WORKDIR}/lib"
@@ -113,16 +115,28 @@ src_compile() {
use _E_CROSS_HEADERS_ONLY && return 0
- cd "${S}"
-
if [[ ${CTARGET} != ${CHOST} ]]; then
- cd "${S}/libc"
export YACC='yacc -by'
CHOST=${CTARGET} tc-export CC LD CXX
+ local csudir
+ if [[ -d "${S}/csu/$(tc-arch-kernel ${CTARGET})-elf" ]]; then
+ csudir="${S}/csu/$(tc-arch-kernel ${CTARGET})-elf"
+ else
+ csudir="${S}/csu/$(tc-arch-kernel ${CTARGET})"
+ fi
+ cd "${csudir}"
+ $(freebsd_get_bmake) ${mymakeopts} || die "make csu failed"
+
append-flags "-isystem /usr/${CTARGET}/include"
+ append-flags "-B ${csudir}"
+ append-ldflags "-B ${csudir}"
+ cd "${S}/libc"
+ $(freebsd_get_bmake) ${mymakeopts} || die "make libc failed"
+ else
+ cd "${S}"
+ freebsd_src_compile
fi
- freebsd_src_compile
}
src_install() {
@@ -147,10 +161,24 @@ src_install() {
use _E_CROSS_HEADERS_ONLY && return 0
- cd "${S}"
+ if [[ ${CTARGET} != ${CHOST} ]]; then
+ local csudir
+ if [[ -d "${S}/csu/$(tc-arch-kernel ${CTARGET})-elf" ]]; then
+ csudir="${S}/csu/$(tc-arch-kernel ${CTARGET})-elf"
+ else
+ csudir="${S}/csu/$(tc-arch-kernel ${CTARGET})"
+ fi
+ cd "${csudir}"
+ $(freebsd_get_bmake) ${mymakeopts} DESTDIR="${D}" install \
+ FILESDIR="/usr/${CTARGET}/lib" || die "Install csu failed"
- [[ ${CTARGET} != ${CHOST} ]] && cd "${S}/libc"
- mkinstall || die "Install failed"
+ cd "${S}/libc"
+ $(freebsd_get_bmake) ${mymakeopts} DESTDIR="${D}" install NO_MAN= \
+ SHLIBDIR="/usr/${CTARGET}/lib" LIBDIR="/usr/${CTARGET}/lib" || die "Install failed"
+ else
+ cd "${S}"
+ mkinstall || die "Install failed"
+ fi
# Don't install the rest of the configuration files if crosscompiling
[[ ${CTARGET} != ${CHOST} ]] && return 0