/[gentoo-x86]/eclass/multilib-build.eclass
Gentoo

Diff of /eclass/multilib-build.eclass

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

Revision 1.1 Revision 1.2
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/multilib-build.eclass,v 1.1 2013/02/01 21:39:50 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.2 2013/02/10 11:44:00 mgorny Exp $
4 4
5# @ECLASS: multilib-build.eclass 5# @ECLASS: multilib-build.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Michał Górny <mgorny@gentoo.org> 7# Michał Górny <mgorny@gentoo.org>
8# @BLURB: flags and utility functions for building multilib packages 8# @BLURB: flags and utility functions for building multilib packages
135 done 135 done
136 136
137 multijob_finish 137 multijob_finish
138} 138}
139 139
140# @FUNCTION: multilib_check_headers
141# @DESCRIPTION:
142# Check whether the header files are consistent between ABIs.
143#
144# This function needs to be called after each ABI's installation phase.
145# It obtains the header file checksums and compares them with previous
146# runs (if any). Dies if header files differ.
147multilib_check_headers() {
148 _multilib_header_cksum() {
149 find "${ED}"usr/include -type f \
150 -exec cksum {} + | sort -k2
151 }
152
153 local cksum=$(_multilib_header_cksum)
154 local cksum_file=${T}/.multilib_header_cksum
155
156 if [[ -f ${cksum_file} ]]; then
157 local cksum_prev=$(< "${cksum_file}")
158
159 if [[ ${cksum} != ${cksum_prev} ]]; then
160 echo "${cksum}" > "${cksum_file}.new"
161
162 eerror "Header files have changed between ABIs."
163
164 if type -p diff &>/dev/null; then
165 eerror "$(diff -du "${cksum_file}" "${cksum_file}.new")"
166 else
167 eerror "Old checksums in: ${cksum_file}"
168 eerror "New checksums in: ${cksum_file}.new"
169 fi
170
171 die "Header checksum mismatch, aborting."
172 fi
173 else
174 echo "${cksum}" > "${cksum_file}"
175 fi
176}
177
140_MULTILIB_BUILD=1 178_MULTILIB_BUILD=1
141fi 179fi

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20