| 1 | # Copyright 1999-2009 Gentoo Foundation |
1 | # Copyright 1999-2009 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.353 2011/01/09 02:16:53 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.354 2011/02/25 21:58:19 ulm 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 |
| … | |
… | |
| 289 | # ???_arch_foo.patch |
289 | # ???_arch_foo.patch |
| 290 | # Else, skip this input altogether |
290 | # Else, skip this input altogether |
| 291 | local a=${patchname#*_} # strip the ???_ |
291 | local a=${patchname#*_} # strip the ???_ |
| 292 | a=${a%%_*} # strip the _foo.patch |
292 | a=${a%%_*} # strip the _foo.patch |
| 293 | if ! [[ ${SINGLE_PATCH} == "yes" || \ |
293 | if ! [[ ${SINGLE_PATCH} == "yes" || \ |
| 294 | ${EPATCH_FORCE} == "yes" || \ |
294 | ${EPATCH_FORCE} == "yes" || \ |
| 295 | ${a} == all || \ |
295 | ${a} == all || \ |
| 296 | ${a} == ${ARCH} ]] |
296 | ${a} == ${ARCH} ]] |
| 297 | then |
297 | then |
| 298 | continue |
298 | continue |
| 299 | fi |
299 | fi |
| 300 | |
300 | |
| 301 | # Let people filter things dynamically |
301 | # Let people filter things dynamically |
| … | |
… | |
| 1948 | else |
1948 | else |
| 1949 | newbin "${tmpwrapper}" "${wrapper}" || die |
1949 | newbin "${tmpwrapper}" "${wrapper}" || die |
| 1950 | fi |
1950 | fi |
| 1951 | } |
1951 | } |
| 1952 | |
1952 | |
| 1953 | # @FUNCTION: prepalldocs |
|
|
| 1954 | # @USAGE: |
|
|
| 1955 | # @DESCRIPTION: |
|
|
| 1956 | # Compress files in /usr/share/doc which are not already |
|
|
| 1957 | # compressed, excluding /usr/share/doc/${PF}/html. |
|
|
| 1958 | # Uses the ecompressdir to do the compression. |
|
|
| 1959 | # 2009-02-18 by betelgeuse: |
|
|
| 1960 | # Commented because ecompressdir is even more internal to |
|
|
| 1961 | # Portage than prepalldocs (it's not even mentioned in man 5 |
|
|
| 1962 | # ebuild). Please submit a better version for review to gentoo-dev |
|
|
| 1963 | # if you want prepalldocs here. |
|
|
| 1964 | #prepalldocs() { |
|
|
| 1965 | # if [[ -n $1 ]] ; then |
|
|
| 1966 | # ewarn "prepalldocs: invalid usage; takes no arguments" |
|
|
| 1967 | # fi |
|
|
| 1968 | |
|
|
| 1969 | # cd "${D}" |
|
|
| 1970 | # [[ -d usr/share/doc ]] || return 0 |
|
|
| 1971 | |
|
|
| 1972 | # find usr/share/doc -exec gzip {} + |
|
|
| 1973 | # ecompressdir --ignore /usr/share/doc/${PF}/html |
|
|
| 1974 | # ecompressdir --queue /usr/share/doc |
|
|
| 1975 | #} |
|
|
| 1976 | |
|
|
| 1977 | # @FUNCTION: path_exists |
1953 | # @FUNCTION: path_exists |
| 1978 | # @USAGE: [-a|-o] <paths> |
1954 | # @USAGE: [-a|-o] <paths> |
| 1979 | # @DESCRIPTION: |
1955 | # @DESCRIPTION: |
| 1980 | # Check if the specified paths exist. Works for all types of paths |
1956 | # Check if the specified paths exist. Works for all types of paths |
| 1981 | # (files/dirs/etc...). The -a and -o flags control the requirements |
1957 | # (files/dirs/etc...). The -a and -o flags control the requirements |