diff options
author | 2015-06-07 12:55:46 +0000 | |
---|---|---|
committer | 2015-06-07 12:55:46 +0000 | |
commit | 87d303e5bf8e8372856715553d5710d2b48d15e4 (patch) | |
tree | 1701d0ebc0c589f2ae41e15d203a20e2f1ecebc9 /eclass | |
parent | Add github to remote-id in metadata.xml (diff) | |
download | gentoo-2-87d303e5bf8e8372856715553d5710d2b48d15e4.tar.gz gentoo-2-87d303e5bf8e8372856715553d5710d2b48d15e4.tar.bz2 gentoo-2-87d303e5bf8e8372856715553d5710d2b48d15e4.zip |
Remove deprecated remove_libtool_files() function.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/autotools-utils.eclass | 79 |
2 files changed, 6 insertions, 78 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 83fe2ef3bf1b..0b5c95a1767b 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1641 2015/06/05 16:38:21 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1642 2015/06/07 12:55:46 mgorny Exp $ + + 07 Jun 2015; Michał Górny <mgorny@gentoo.org> autotools-utils.eclass: + Remove deprecated remove_libtool_files() function. 05 Jun 2015; Michał Górny <mgorny@gentoo.org> freebsd.eclass: Enable IUSE=profile globally. Use upstream tarball for FreeBSD > 10.0. diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass index 3c0f9e76c209..89b7a9b55f4c 100644 --- a/eclass/autotools-utils.eclass +++ b/eclass/autotools-utils.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.74 2014/07/31 23:24:56 reavertm Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.75 2015/06/07 12:55:46 mgorny Exp $ # @ECLASS: autotools-utils.eclass # @MAINTAINER: @@ -217,81 +217,6 @@ _check_build_dir() { echo ">>> Working in BUILD_DIR: \"${BUILD_DIR}\"" } -# @FUNCTION: remove_libtool_files -# @USAGE: [all] -# @DESCRIPTION: -# Determines unnecessary libtool files (.la) and libtool static archives (.a) -# and removes them from installation image. -# -# To unconditionally remove all libtool files, pass 'all' as argument. -# Otherwise, libtool archives required for static linking will be preserved. -# -# In most cases it's not necessary to manually invoke this function. -# See autotools-utils_src_install for reference. -remove_libtool_files() { - debug-print-function ${FUNCNAME} "$@" - local removing_all - - eqawarn "The remove_libtool_files() function was deprecated." - eqawarn "Please use prune_libtool_files() from eutils eclass instead." - - [[ ${#} -le 1 ]] || die "Invalid number of args to ${FUNCNAME}()" - if [[ ${#} -eq 1 ]]; then - case "${1}" in - all) - removing_all=1 - ;; - *) - die "Invalid argument to ${FUNCNAME}(): ${1}" - esac - fi - - local pc_libs=() - if [[ ! ${removing_all} ]]; then - local arg - for arg in $(find "${D}" -name '*.pc' -exec \ - sed -n -e 's;^Libs:;;p' {} +); do - [[ ${arg} == -l* ]] && pc_libs+=(lib${arg#-l}.la) - done - fi - - local f - find "${D}" -type f -name '*.la' -print0 | while read -r -d '' f; do - local shouldnotlink=$(sed -ne '/^shouldnotlink=yes$/p' "${f}") - local archivefile=${f/%.la/.a} - [[ "${f}" != "${archivefile}" ]] || die 'regex sanity check failed' - - # Remove static libs we're not supposed to link against. - if [[ ${shouldnotlink} ]]; then - einfo "Removing unnecessary ${archivefile#${D%/}}" - rm -f "${archivefile}" || die - # The .la file may be used by a module loader, so avoid removing it - # unless explicitly requested. - [[ ${removing_all} ]] || continue - fi - - # Remove .la files when: - # - user explicitly wants us to remove all .la files, - # - respective static archive doesn't exist, - # - they are covered by a .pc file already, - # - they don't provide any new information (no libs & no flags). - local removing - if [[ ${removing_all} ]]; then removing='forced' - elif [[ ! -f ${archivefile} ]]; then removing='no static archive' - elif has "$(basename "${f}")" "${pc_libs[@]}"; then - removing='covered by .pc' - elif [[ ! $(sed -n -e \ - "s/^\(dependency_libs\|inherited_linker_flags\)='\(.*\)'$/\2/p" \ - "${f}") ]]; then removing='no libs & flags' - fi - - if [[ ${removing} ]]; then - einfo "Removing unnecessary ${f#${D%/}} (${removing})" - rm -f "${f}" || die - fi - done -} - # @FUNCTION: autotools-utils_src_prepare # @DESCRIPTION: # The src_prepare function. |