summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haubenwallner <haubi@gentoo.org>2009-10-28 16:00:12 +0000
committerMichael Haubenwallner <haubi@gentoo.org>2009-10-28 16:00:12 +0000
commita8f270dbeaa679eececbb23ac8ed03737fe40f4d (patch)
tree18e17ecae52afb58858ca1bba07c318fc3c90446 /profiles
parentFix the variable name again. (diff)
downloadhistorical-a8f270dbeaa679eececbb23ac8ed03737fe40f4d.tar.gz
historical-a8f270dbeaa679eececbb23ac8ed03737fe40f4d.tar.bz2
historical-a8f270dbeaa679eececbb23ac8ed03737fe40f4d.zip
portage handles merging of shared library archives on aix itself now,
no need to do this in profile.bashrc any more.
Diffstat (limited to 'profiles')
-rw-r--r--profiles/prefix/ChangeLog6
-rw-r--r--profiles/prefix/aix/profile.bashrc118
2 files changed, 5 insertions, 119 deletions
diff --git a/profiles/prefix/ChangeLog b/profiles/prefix/ChangeLog
index b8d5dabe531b..e385c929073d 100644
--- a/profiles/prefix/ChangeLog
+++ b/profiles/prefix/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for profiles/prefix
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/profiles/prefix/ChangeLog,v 1.108 2009/10/27 19:38:41 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/profiles/prefix/ChangeLog,v 1.109 2009/10/28 16:00:11 haubi Exp $
+
+ 28 Oct 2009; Michael Haubenwallner <haubi@gentoo.org> -aix/profile.bashrc:
+ portage handles merging of shared library archives on aix itself now,
+ no need to do this in profile.bashrc any more.
27 Oct 2009; Fabian Groffen <grobian@gentoo.org> darwin/package.mask:
Mask gcc-4.{3,4} on Darwin, as it doesn't compile for a while now
diff --git a/profiles/prefix/aix/profile.bashrc b/profiles/prefix/aix/profile.bashrc
deleted file mode 100644
index 6e0b039639f7..000000000000
--- a/profiles/prefix/aix/profile.bashrc
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/profiles/prefix/aix/profile.bashrc,v 1.2 2009/07/22 16:29:50 haubi Exp $
-
-# never use /bin/sh as CONFIG_SHELL on AIX: it works, but is way to slow.
-export CONFIG_SHELL=${BASH}
-
-# Portage cannot merge shared objects inside archive libraries on AIX (yet).
-# So we need to hack around by unpacking the archive libraries, let portage
-# merge/unmerge the archive library members as normal files, and recreate the
-# archive libraries after merge/unmerge.
-
-aixdll_find_unprepared() {
- find "$1" -type f -name 'lib*.a' -print
-}
-
-aixdll_find_prepared() {
- find "$1" -type d -name 'lib*.a.d' -print
-}
-
-aixdll_prepare_for_merge() {
- local liba=$1
- local libad=${liba}.d
- mkdir "${libad}" || die "Cannot create ${libad}"
- pushd "${libad}" >/dev/null || die "Cannot cd to ${libad}"
- /usr/ccs/bin/ar -x "${liba}" || die "Cannot un-ar ${liba}"
- popd >/dev/null || die "Cannot cd back from ${libad}"
- true
-}
-
-aixdll_is_prepared() {
- local what=$1
- [[ ${what##*/} == lib*.a.d ]]
-}
-
-aixdll_unprepare_from_merge() {
- aixdll_is_prepared "${1}" || return 0
- local liba libad
- libad=${1}
- liba=${libad%.d}
-
- if [[ -d ${libad} ]]; then
- pushd "${libad}" >/dev/null || die "Cannot cd to ${libad}"
- rm -f "./${liba##*/}.new" || die "Cannot remove ${liba##*/}.new"
- /usr/ccs/bin/ar -coqszvl -X 32_64 "./${liba##*/}.new" ./* || die "Cannot recreate ${liba}"
- mv -f "./${liba##*/}.new" "${liba}" || die "Cannot move ${liba##*/}.new to ${liba}"
- popd >/dev/null || die "Cannot cd back from ${libad}"
- elif [[ -f ${liba} ]]; then
- rm -f "${liba}" || die "Cannot prune ${liba}"
- fi
- true
-}
-
-prefix_aix-post_src_install() {
- prefix-post_src_install
-
- local liba
- einfo "Preparing AIX libraries for merge..."
- pushd "${D}" >/dev/null || die "Cannot cd to ${D}"
- for liba in $(aixdll_find_unprepared .); do
- /bin/file "${liba}" | /bin/grep ': archive' >/dev/null || return 0
- liba=${liba#./}
- einfo "preparing ${liba}"
- aixdll_prepare_for_merge "${D}${liba}"
- rm -f "${D}${liba}" || die "Cannot prune ${liba}"
- eend 0
- done
- popd >/dev/null || die "Cannot cd back from ${D}"
-}
-
-prefix_aix-pre_pkg_postinst() {
- local libad save_IFS content
- einfo "Preparing AIX libraries for unmerge..."
- pushd "${D}" >/dev/null || die "Cannot cd to ${D}"
- for libad in $(aixdll_find_prepared .); do
- libad=${libad#./}
- aixdll_is_prepared "${ROOT}${libad}" || continue
- einfo "unpreparing ${libad}"
- aixdll_unprepare_from_merge "${ROOT}${libad}"
- eend 0
- done
- popd >/dev/null || die "Cannot cd back from ${D}"
-}
-
-prefix_aix-pre_pkg_postrm() {
- local libad save_IFS content
- einfo "Preparing AIX libraries for unmerge..."
- pushd "${ROOT}" >/dev/null || die "Cannot cd to ${ROOT}"
- save_IFS=$IFS
- IFS='
-';
- local MY_PR=${PR}
- [[ ${MY_PR} == r0 ]] && MY_PR=
- local -a contents=($(<"${EPREFIX}/var/db/pkg/${CATEGORY}/${P}${MY_PR:+-}${MY_PR}/CONTENTS"));
- IFS=$save_IFS
- local -a cont
- for content in "${contents[@]}"; do
- cont=(${content})
- libad=${cont[1]}
- libad=${libad#/}
- aixdll_is_prepared "${ROOT}${libad}" || continue
- einfo "unpreparing ${libad}"
- aixdll_unprepare_from_merge "${ROOT}${libad}"
- eend 0
- done
- popd >/dev/null || die "Cannot cd back from ${ROOT}"
-}
-
-# These are because of
-# http://archives.gentoo.org/gentoo-dev/msg_529a0806ed2cf841a467940a57e2d588.xml
-# The profile-* ones are meant to be used in etc/portage/profile.bashrc by user
-# until there is the registration mechanism.
-profile-post_src_install() { prefix_aix-post_src_install ; }
- post_src_install() { prefix_aix-post_src_install ; }
-profile-pre_pkg_postinst() { prefix_aix-pre_pkg_postinst ; }
- pre_pkg_postinst() { prefix_aix-pre_pkg_postinst ; }
-profile-pre_pkg_postrm() { prefix_aix-pre_pkg_postrm ; }
- pre_pkg_postrm() { prefix_aix-pre_pkg_postrm ; }