/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.419 Revision 1.420
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.419 2013/05/21 02:57:22 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.420 2013/05/21 14:05:31 mgorny Exp $
4 4
5# @ECLASS: eutils.eclass 5# @ECLASS: eutils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: many extra (but common) functions that are used in ebuilds 8# @BLURB: many extra (but common) functions that are used in ebuilds
1460 local f 1460 local f
1461 local queue=() 1461 local queue=()
1462 while IFS= read -r -d '' f; do # for all .la files 1462 while IFS= read -r -d '' f; do # for all .la files
1463 local archivefile=${f/%.la/.a} 1463 local archivefile=${f/%.la/.a}
1464 1464
1465 # The following check is done by libtool itself.
1466 # It helps us avoid removing random files which match '*.la',
1467 # see bug #468380.
1468 if ! sed -n -e '/^# Generated by .*libtool/q0;4q1'; then
1469 continue
1470 fi
1471
1465 [[ ${f} != ${archivefile} ]] || die 'regex sanity check failed' 1472 [[ ${f} != ${archivefile} ]] || die 'regex sanity check failed'
1466 local reason pkgconfig_scanned 1473 local reason pkgconfig_scanned
1467 local snotlink=$(sed -n -e 's:^shouldnotlink=::p' "${f}") 1474 local snotlink=$(sed -n -e 's:^shouldnotlink=::p' "${f}")
1468 1475
1469 if [[ ${snotlink} == yes ]]; then 1476 if [[ ${snotlink} == yes ]]; then
1478 # unless explicitly requested. 1485 # unless explicitly requested.
1479 if [[ ${removing_modules} ]]; then 1486 if [[ ${removing_modules} ]]; then
1480 reason='module' 1487 reason='module'
1481 fi 1488 fi
1482 1489
1483 elif [[ ${snotlink} == no ]]; then 1490 else
1484
1485 # A valid .la file must have a valid 'shouldnotlink='.
1486 # That assumption helps us avoid removing random files
1487 # which match '*.la', see bug #468380.
1488 1491
1489 # Remove .la files when: 1492 # Remove .la files when:
1490 # - user explicitly wants us to remove all .la files, 1493 # - user explicitly wants us to remove all .la files,
1491 # - respective static archive doesn't exist, 1494 # - respective static archive doesn't exist,
1492 # - they are covered by a .pc file already, 1495 # - they are covered by a .pc file already,

Legend:
Removed from v.1.419  
changed lines
  Added in v.1.420

  ViewVC Help
Powered by ViewVC 1.1.20