public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-devel/native-cctools: metadata.xml native-cctools-1.ebuild ChangeLog
@ 2011-02-09 15:53 Michael Haubenwallner (haubi)
  0 siblings, 0 replies; only message in thread
From: Michael Haubenwallner (haubi) @ 2011-02-09 15:53 UTC (permalink / raw
  To: gentoo-commits

haubi       11/02/09 15:53:53

  Added:                metadata.xml native-cctools-1.ebuild ChangeLog
  Log:
  On AIX, wrap ld to support '-soname' flag (#213277). Moved from prefix-overlay to gentoo-x86.
  
  (Portage version: 2.2.01.17865-prefix/cvs/AIX 00C0078A4C00)

Revision  Changes    Path
1.1                  sys-devel/native-cctools/metadata.xml

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/native-cctools/metadata.xml?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/native-cctools/metadata.xml?rev=1.1&content-type=text/plain

Index: metadata.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>prefix</herd>
</pkgmetadata>



1.1                  sys-devel/native-cctools/native-cctools-1.ebuild

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/native-cctools/native-cctools-1.ebuild?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/native-cctools/native-cctools-1.ebuild?rev=1.1&content-type=text/plain

Index: native-cctools-1.ebuild
===================================================================
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-devel/native-cctools/native-cctools-1.ebuild,v 1.1 2011/02/09 15:53:53 haubi Exp $

EAPI="3"

inherit eutils

DESCRIPTION="Host OS native assembler as and static linker ld"
HOMEPAGE="http://youroperatingsystem.com/"
SRC_URI=""

LICENSE="GPL-2" # actually, we don't know, the wrapper is
SLOT="0"

LD_AIX_V=1

KEYWORDS="~ppc-aix ~x86-interix ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"

IUSE=""

DEPEND="sys-devel/binutils-config"
RDEPEND="${DEPEND}"

src_install() {
	LIBPATH=/usr/$(get_libdir)/binutils/${CHOST}/native-${PV}
	BINPATH=/usr/${CHOST}/binutils-bin/native-${PV}

	keepdir ${LIBPATH} || die
	dodir ${BINPATH} || die

	# allow for future hosts with different paths
	nativepath=""
	wrappers=()
	case ${CHOST} in
		*-solaris*)
			nativepath=/usr/sfw/bin
		;;
		*-aix*)
			nativepath=/usr/ccs/bin
			wrappers=("${wrappers[@]}" "ld=${FILESDIR}/ld-aix-${LD_AIX_V}")
		;;
		*-apple-darwin*|*-netbsd*|*-openbsd*)
			nativepath=/usr/bin
		;;
		*-interix*)
			nativepath=/opt/gcc.3.3/bin
		;;
		*)
			die "Don't know where the native linker for your platform is"
		;;
	esac

	what="addr2line as ar c++filt gprof ld nm objcopy objdump \
		ranlib readelf elfdump size strings strip"
	# Darwin things
	what="${what} install_name_tool ld64 libtool lipo nmedit \
		otool otool64 pagestuff redo_prebinding segedit"

	# copy from the host os
	cd "${ED}${BINPATH}"
	for b in ${what} ; do
		if [[ ${CHOST} == *-darwin* && ${b} == libtool ]] ; then
			echo "linking darwin libtool ${nativepath}/${b}"
			ln -s "${nativepath}/${b}" "${b}"
		elif [[ -x ${nativepath}/g${b} ]] ; then
			einfo "linking ${nativepath}/g${b}"
			ln -s "${nativepath}/g${b}" "${b}"
		elif [[ -x ${nativepath}/${b} ]] ; then
			einfo "linking ${nativepath}/${b}"
			ln -s "${nativepath}/${b}" "${b}"
		else
			ewarn "skipping ${b} (not in ${nativepath})"
		fi
	done

	# post fix for Darwin's ranlib (doesn't like it when its called other than
	# that, as libtool and ranlib are one tool)
	if [[ ${CHOST} == *-darwin* ]] ; then
		rm -f ranlib
		cat <<-EOF > ranlib
			#!/usr/bin/env bash
			exec ${nativepath}/ranlib "\$@"
		EOF
		chmod 755 ranlib
	fi

	exeinto ${BINPATH}
	local wrapper source target
	for wrapper in "${wrappers[@]}" ; do
		source=${wrapper#*=}
		target=${wrapper%%=*}
		newexe "${source}" "${target}" || die
	done
	# Generate an env.d entry for this binutils
	insinto /etc/env.d/binutils
	cat <<-EOF > "${T}"/env.d
		TARGET="${CHOST}"
		VER="native-${PV}"
		LIBPATH="${EPREFIX}/${LIBPATH}"
		FAKE_TARGETS="${CHOST}"
	EOF
	newins "${T}"/env.d ${CHOST}-native-${PV}
}

pkg_postinst() {
	binutils-config ${CHOST}-native-${PV}
}



1.1                  sys-devel/native-cctools/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/native-cctools/ChangeLog?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/native-cctools/ChangeLog?rev=1.1&content-type=text/plain

Index: ChangeLog
===================================================================
# ChangeLog for sys-devel/native-cctools
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/sys-devel/native-cctools/ChangeLog,v 1.1 2011/02/09 15:53:53 haubi Exp $

  09 Feb 2011; Michael Haubenwallner <haubi@gentoo.org> +files/ld-aix-1,
  +native-cctools-1.ebuild, +metadata.xml:
  On AIX, wrap ld to support '-soname' flag (#213277).
  Moved from prefix-overlay to gentoo-x86.

  17 Dec 2008; Fabian Groffen <grobian@gentoo.org> native-cctools-1.ebuild:
  On Darwin, make sure we never link gnu-libtool as libtool, or br0rk4ge will
  be guaranteed

*native-cctools-1 (09 Feb 2011)

  21 Mar 2007; Fabian Groffen <grobian@gentoo.org> +files/ld-aix-1,
  +native-cctools-1.ebuild, +metadata.xml:
  Initial commit of native-cctools, a wrapper package around native installed
  cctools (ld, as, ar, etc) for operating systems where GNU binutils doesn't
  work, or the linker sources are unavailable.







^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-09 15:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-09 15:53 [gentoo-commits] gentoo-x86 commit in sys-devel/native-cctools: metadata.xml native-cctools-1.ebuild ChangeLog Michael Haubenwallner (haubi)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox