Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 34981 Details for
Bug 56408
ebuild environment should be properly saved and reused, and general cleanup
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
ebuild-functions.sh
ebuild-functions.sh (text/plain), 4.43 KB, created by
Brian Harring (RETIRED)
on 2004-07-07 21:50:00 UTC
(
hide
)
Description:
ebuild-functions.sh
Filename:
MIME Type:
Creator:
Brian Harring (RETIRED)
Created:
2004-07-07 21:50:00 UTC
Size:
4.43 KB
patch
obsolete
>#!/bin/bash ># Copyright 1999-2003 Gentoo Technologies, Inc. ># Distributed under the terms of the GNU General Public License v2 ># $Header: /home/cvsroot/gentoo-src/portage/bin/ebuild.sh,v 1.168 2004/06/02 23:28:05 carpaski Exp $ > >use() { > if useq ${1}; then > echo "${1}" > return 0 > fi > return 1 >} >has() { > if hasq "$@"; then > echo "${1}" > return 0 > fi > return 1 >} > >use_with() { > if [ -z "$1" ]; then > echo "!!! use_with() called without a parameter." >&2 > echo "!!! use_with <USEFLAG> [<flagname> [value]]" >&2 > return > fi > > local UW_SUFFIX="" > if [ ! -z "${3}" ]; then > UW_SUFFIX="=${3}" > fi > > local UWORD="$2" > if [ -z "${UWORD}" ]; then > UWORD="$1" > fi > > if useq $1; then > echo "--with-${UWORD}${UW_SUFFIX}" > return 0 > else > echo "--without-${UWORD}" > return 1 > fi >} > >use_enable() { > if [ -z "$1" ]; then > echo "!!! use_enable() called without a parameter." >&2 > echo "!!! use_enable <USEFLAG> [<flagname> [value]]" >&2 > return > fi > > local UE_SUFFIX="" > if [ ! -z "${3}" ]; then > UE_SUFFIX="=${3}" > fi > > local UWORD="$2" > if [ -z "${UWORD}" ]; then > UWORD="$1" > fi > > if useq $1; then > echo "--enable-${UWORD}${UE_SUFFIX}" > return 0 > else > echo "--disable-${UWORD}" > return 1 > fi >} > >econf() { > if [ -x ./configure ]; then > if [ ! -z "${CBUILD}" ]; then > EXTRA_ECONF="--build=${CBUILD} ${EXTRA_ECONF}" > fi > ./configure \ > --prefix=/usr \ > --host=${CHOST} \ > --mandir=/usr/share/man \ > --infodir=/usr/share/info \ > --datadir=/usr/share \ > --sysconfdir=/etc \ > --localstatedir=/var/lib \ > ${EXTRA_ECONF} \ > "$@" || die "econf failed" > else > die "no configure script found" > fi >} > >einstall() { > if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then > if [ ! -z "${PORTAGE_DEBUG}" ]; then > make -n prefix=${D}/usr \ > datadir=${D}/usr/share \ > infodir=${D}/usr/share/info \ > localstatedir=${D}/var/lib \ > mandir=${D}/usr/share/man \ > sysconfdir=${D}/etc \ > "$@" install > fi > make prefix=${D}/usr \ > datadir=${D}/usr/share \ > infodir=${D}/usr/share/info \ > localstatedir=${D}/var/lib \ > mandir=${D}/usr/share/man \ > sysconfdir=${D}/etc \ > "$@" install || die "einstall failed" > else > die "no Makefile found" > fi >} > >pkg_setup() >{ > return >} > >pkg_nofetch() >{ > [ -z "${SRC_URI}" ] && return > > echo "!!! The following are listed in SRC_URI for ${PN}:" > for MYFILE in `echo ${SRC_URI}`; do > echo "!!! $MYFILE" > done >} > >src_unpack() { > if [ "${A}" != "" ]; then > unpack ${A} > fi >} > >src_compile() { > if [ -x ./configure ]; then > econf > fi > if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then > emake || die "emake failed" > fi >} > >src_test() >{ > if hasq maketest $RESTRICT; then > ewarn "Skipping make test/check due to ebuild restriction." > echo ">>> Test phase [explicitly disabled]: ${CATEGORY}/${PF}" > return > fi > if ! hasq maketest $FEATURES; then > echo ">>> Test phase [not enabled]: ${CATEGORY}/${PF}" > return > fi > > addpredict / > if make check -n &> /dev/null; then > echo ">>> Test phase [check]: ${CATEGORY}/${PF}" > if ! make check; then > hasq maketest $FEATURES && die "Make check failed. See above for details." > hasq maketest $FEATURES || eerror "Make check failed. See above for details." > fi > elif make test -n &> /dev/null; then > echo ">>> Test phase [test]: ${CATEGORY}/${PF}" > if ! make test; then > hasq maketest $FEATURES && die "Make test failed. See above for details." > hasq maketest $FEATURES || eerror "Make test failed. See above for details." > fi > else > echo ">>> Test phase [none]: ${CATEGORY}/${PF}" > fi > SANDBOX_PREDICT="${SANDBOX_PREDICT%:/}" >} > >src_install() >{ > return >} > >pkg_preinst() >{ > return >} > >pkg_postinst() >{ > return >} > >pkg_prerm() >{ > return >} > >pkg_postrm() >{ > return >} > >into() { > if [ $1 == "/" ]; then > export DESTTREE="" > else > export DESTTREE=$1 > if [ ! -d "${D}${DESTTREE}" ]; then > install -d "${D}${DESTTREE}" > fi > fi >} > >insinto() { > if [ "$1" == "/" ]; then > export INSDESTTREE="" > else > export INSDESTTREE=$1 > if [ ! -d "${D}${INSDESTTREE}" ]; then > install -d "${D}${INSDESTTREE}" > fi > fi >} > >exeinto() { > if [ "$1" == "/" ]; then > export EXEDESTTREE="" > else > export EXEDESTTREE="$1" > if [ ! -d "${D}${EXEDESTTREE}" ]; then > install -d "${D}${EXEDESTTREE}" > fi > fi >} > >docinto() { > if [ "$1" == "/" ]; then > export DOCDESTTREE="" > else > export DOCDESTTREE="$1" > if [ ! -d "${D}usr/share/doc/${PF}/${DOCDESTTREE}" ]; then > install -d "${D}usr/share/doc/${PF}/${DOCDESTTREE}" > fi > fi >} > >true
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 56408
:
34978
|
34979
|
34980
| 34981 |
35014
|
35262