Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 41835 Details for
Bug 67606
Compilation of X.org 6.8.0-r1 fails
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
environment file from /var/tmp/portage/xorg-x11-6.8.0-r1/temp
environment (text/plain), 125.60 KB, created by
Christopher Park
on 2004-10-14 17:51:36 UTC
(
hide
)
Description:
environment file from /var/tmp/portage/xorg-x11-6.8.0-r1/temp
Filename:
MIME Type:
Creator:
Christopher Park
Created:
2004-10-14 17:51:36 UTC
Size:
125.60 KB
patch
obsolete
>A='eurofonts-X11.tar.bz2 xfsft-encodings-0.1.tar.bz2 gentoo-cursors-tad-0.3.1.tar.bz2 gemini-koi8-u.tar.bz2 xorg-x11-6.8.0-files-0.4.tar.bz2 xorg-x11-6.8.0-patches-0.2.2.1.tar.bz2 X11R6.8.0-src1.tar.gz X11R6.8.0-src2.tar.gz X11R6.8.0-src3.tar.gz X11R6.8.0-src4.tar.gz X11R6.8.0-src5.tar.gz' >AA='eurofonts-X11.tar.bz2 xfsft-encodings-0.1.tar.bz2 gentoo-cursors-tad-0.3.1.tar.bz2 gemini-koi8-u.tar.bz2 xorg-x11-6.8.0-files-0.4.tar.bz2 xorg-x11-6.8.0-patches-0.2.2.1.tar.bz2 X11R6.8.0-src1.tar.gz X11R6.8.0-src2.tar.gz X11R6.8.0-src3.tar.gz X11R6.8.0-src4.tar.gz X11R6.8.0-src5.tar.gz X11R6.8.0-src6.tar.gz X11R6.8.0-src7.tar.gz' >ACCEPT_KEYWORDS=x86 >ACCEPT_LICENSE= >ALLOWED_FLAGS='-fstack-protector -march -mcpu -O -O1 -O2 -O3 -pipe -fomit-frame-pointer -g -gstabs+ -gstabs -ggdb -fno-stack-protector -fno-stack-protector-all -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -mregparm -mno-app-regs -mapp-regs -msoft-float -mflat -mno-faster-structs -mfaster-structs -mlittle-endian -mbig-endian -mlive-g0 -mcmodel -mno-stack-bias -mstack-bias' >ARCH=x86 >ARGS=unpack >AUTOCLEAN=yes >BAD=$'\E[31;01m' >BASH=/bin/bash >BASH_ENV=/etc/portage/bashrc >BASH_VERSINFO=([0]="2" [1]="05b" [2]="0" [3]="1" [4]="release" [5]="i686-pc-linux-gnu") >BASH_VERSION='2.05b.0(1)-release' >BRACKET=$'\E[34;01m' >BUILDDIR=/var/tmp/portage/xorg-x11-6.8.0-r1 >BUILD_PREFIX=/var/tmp/portage >CATEGORY=x11-base >CC=gcc >CCACHE_DIR=/root/.ccache >CCACHE_SIZE=2G >CDEPEND=' ' >CFLAGS=-mcpu=i686 >CHOST=i686-pc-linux-gnu >CLASSPATH=. >CLEAN_DELAY=5 >COLS=100 >CONFIG_PROTECT='/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control' >CONFIG_PROTECT_MASK=/etc/terminfo >CVS_RSH=ssh >CXX=g++ >CXXFLAGS=-mcpu=i686 >D=/var/tmp/portage/xorg-x11-6.8.0-r1/image/ >DEPEND=$'>=sys-libs/ncurses-5.1\n\t>=sys-libs/zlib-1.1.3-r2\n\t>=sys-devel/flex-2.5.4a-r5\n\t>=dev-libs/expat-1.95.3\n\t>=media-libs/freetype-2.1.4\n\t>=media-libs/fontconfig-2.1-r1\n\t>=x11-base/opengl-update-1.7.2\n\t>=x11-misc/ttmkfdir-3.0.9-r2\n\t>=sys-apps/sed-4\n\tsys-apps/util-linux\n\tdev-lang/perl\n\tmedia-libs/libpng\n\t>=sys-apps/portage-2.0.50_pre9\n\t!x11-base/xfree\n\t!virtual/xft\n\t!virtual/x11 !bootstrap? ( sys-devel/patch ) !bootstrap? ( sys-devel/patch ) !bootstrap? ( sys-devel/patch ) sys-devel/gcc' >DESCRIPTION='An X11 implementation maintained by the X.Org Foundation' >DESTTREE=/usr >DIROPTIONS=-m0755 >DIRSTACK=() >DISTDIR=/usr/portage/distfiles >DOCDESTTREE= >EBUILD=/usr/portage/x11-base/xorg-x11/xorg-x11-6.8.0-r1.ebuild >EBUILD_PHASE=unpack >ECLASS= >ECLASSDIR=/usr/portage/eclass >ECLASS_DEPTH=0 >EDITOR=/usr/bin/vim >EMERGE_FROM=ebuild >ENDCOL=$'\E[A\E[100G' >EPATCH_EXCLUDE= >EPATCH_FORCE=no >EPATCH_OPTS=-g0 >EPATCH_SINGLE_MSG= >EPATCH_SOURCE=/var/tmp/portage/xorg-x11-6.8.0-r1/work/patch >EPATCH_SUFFIX=patch.bz2 >EUID=0 >EXCLUDED=/var/tmp/portage/xorg-x11-6.8.0-r1/work/patch/excluded >EXEDESTTREE= >EXEOPTIONS=-m0755 >E_DEPEND=' !bootstrap? ( sys-devel/patch ) !bootstrap? ( sys-devel/patch ) !bootstrap? ( sys-devel/patch ) sys-devel/gcc' >E_IUSE=' debug' >FEATURES='autoaddcvs ccache sandbox' >FETCHCOMMAND='/usr/bin/wget -t 5 --passive-ftp -P ${DISTDIR} ${URI}' >FILESDIR=/usr/portage/x11-base/xorg-x11/files >FILES_DIR=/var/tmp/portage/xorg-x11-6.8.0-r1/work/files >FILES_VER=0.4 >GENTOO_FILES=$'mirror://gentoo/xorg-x11-6.8.0-files-0.4.tar.bz2\n\thttp://dev.gentoo.org/~spyderous/xorg-x11/patchsets/6.8.0/xorg-x11-6.8.0-files-0.4.tar.bz2\n\thttp://dev.gentoo.org/~cyfred/distfiles/xorg-x11-6.8.0-files-0.4.tar.bz2' >GENTOO_MIRRORS='ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp-mirror.internap.com/pub/gentoo/ ftp://ftp-mirror.internap.com/pub/gentoo/ http://gentoo.binarycompass.org' >GLIBC_SSP_CHECKED=1 >GOOD=$'\E[32;01m' >GROUPS=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4" [5]="6" [6]="10" [7]="11" [8]="20" [9]="26" [10]="27") >GRP_STAGE23_USE='ipv6 pam tcpd readline nls ssl gpm perl python berkdb acl ncurses' >HILITE=$'\E[36;01m' >HOME=/root >HOMEPAGE=http://freedesktop.org/XOrg >HOSTCONF=config/cf/host.def >HOSTNAME=arthur >HOSTTYPE=i686 >IFS=$' \t\n' >INFODIR=/usr/share/info >INFOPATH=/usr/share/info:/usr/share/gcc-data/i686-pc-linux-gnu/3.3/info >INHERITED=' eutils flag-o-matic eutils eutils gcc xfree eutils flag-o-matic eutils eutils gcc xfree' >INPUTRC=/etc/inputrc >INSDESTTREE= >INSOPTIONS=-m0644 >IUSE=$'3dfx 3dnow bitmap-fonts cjk debug dlloader dmx doc hardened\n\tinsecure-drivers ipv6 mmx nls pam sdk sse static xprint debug' >JAVAC=/opt/blackdown-jdk-1.4.1/bin/javac >JAVA_HOME=/opt/blackdown-jdk-1.4.1 >JDK_HOME=/opt/blackdown-jdk-1.4.1 >KEYWORDS='arm ~alpha amd64 hppa ~ia64 ~mips ~ppc sparc x86' >KV=2.6.8.1 >KVERS=. >LD_PRELOAD=/lib/libsandbox.so >LESS=-R >LESSOPEN='|lesspipe.sh %s' >LIBOPTIONS=-m0644 >LICENSE=$'Adobe-X CID DEC DEC-2 IBM-X NVIDIA-X NetBSD SGI UCB-LBL XC-2\n\tbigelow-holmes-urw-gmbh-luxi christopher-g-demetriou national-semiconductor\n\tnokia tektronix the-open-group todd-c-miller x-truetype xfree86-1.0\n\tMIT SGI-B BSD FTL GPL-2' >LOGNAME=root >MACHTYPE=i686-pc-linux-gnu >MAIL=/var/mail/root >MAKEOPTS=-j2 >MANPATH=/usr/share/man:/usr/local/share/man:/usr/share/gcc-data/i686-pc-linux-gnu/3.3/man::/opt/blackdown-jdk-1.4.1/man >MOPREFIX=xorg-x11 >NOCOLOR=false >NORMAL=$'\E[0m' >O=/usr/portage/x11-base/xorg-x11 >OCC=gcc >OCXX=g++ >OLDPWD=/var/tmp/portage/xorg-x11-6.8.0-r1/work/xc >OPTERR=1 >OPTIND=1 >OSTYPE=linux-gnu >P=xorg-x11-6.8.0 >PAGER=/usr/bin/less >PATCH=/var/tmp/portage/xorg-x11-6.8.0-r1/work/patch/5851_all_6.7.99.1-tdfx-dri-fix-low-texmem-hang.patch >PATCHDIR=/var/tmp/portage/xorg-x11-6.8.0-r1/work/patch >PATCH_GROUP=5851 >PATCH_VER=0.2.2.1 >PATH=/sbin:/usr/sbin:/usr/lib/portage/bin:/bin:/usr/bin:/usr/local/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.3:/opt/blackdown-jdk-1.4.1/bin:/opt/blackdown-jdk-1.4.1/jre/bin >PDEPEND=$'x86? (\n\t\t\t3dfx? ( >=media-libs/glide-v3-3.10 )\n\t\t\tinput_devices_synaptics? ( x11-misc/synaptics )\n\t\t\tinput_devices_wacom? ( x11-misc/linuxwacom )\n\t\t)\n\t\talpha? (\n\t\t\t3dfx? ( >=media-libs/glide-v3-3.10 )\n\t\t)\n\t\tx11-terms/xterm ' >PF=xorg-x11-6.8.0-r1 >PIPESTATUS=([0]="0") >PKGDIR=/usr/portage/packages >PKGUSE= >PKG_TMPDIR=/var/tmp/portage-pkg >PN=xorg-x11 >PORTAGE_BINHOST_CHUNKSIZE=3000 >PORTAGE_CACHEDIR=/var/cache/edb/dep/ >PORTAGE_CALLER=emerge >PORTAGE_GID=250 >PORTAGE_MASTER_PID=2345 >PORTAGE_TMPDIR=/var/tmp >PORTDIR=/usr/portage >PPID=2414 >PR=r1 >PRELINK_PATH= >PRELINK_PATH_MASK= >PROVIDE=$'virtual/x11\n\tvirtual/opengl\n\tvirtual/glu\n\tvirtual/xft' >PS4='+ ' >PV=6.8.0 >PVR=6.8.0-r1 >PWD=/var/tmp/portage/xorg-x11-6.8.0-r1 >RC_DEVFSD_STARTUP=yes >RC_DEVICE_TARBALL=yes >RC_FAIL_ON_ZOMBIE=no >RC_GOT_FUNCTIONS=yes >RC_NET_STRICT_CHECKING=no >RC_NOCOLOR=false >RC_PARALLEL_STARTUP=no >RC_QUIET_STDOUT=no >RC_RETRY_COUNT=5 >RC_RETRY_KILL=yes >RC_RETRY_TIMEOUT=1 >RC_TTY_NUMBER=11 >RC_USE_CONFIG_PROFILE=yes >RDEPEND=$'>=sys-libs/ncurses-5.1\n\t>=sys-libs/zlib-1.1.3-r2\n\t>=sys-devel/flex-2.5.4a-r5\n\t>=dev-libs/expat-1.95.3\n\t>=media-libs/freetype-2.1.4\n\t>=media-libs/fontconfig-2.1-r1\n\t>=x11-base/opengl-update-1.7.2\n\t>=x11-misc/ttmkfdir-3.0.9-r2\n\t>=sys-apps/sed-4\n\tsys-apps/util-linux\n\tdev-lang/perl\n\tmedia-libs/libpng\n\t>=sys-apps/portage-2.0.50_pre9\n\t!x11-base/xfree\n\t!virtual/xft\n\t!virtual/x11 ' >RESTRICT=nostrip >RESUMECOMMAND='/usr/bin/wget -c -t 5 --passive-ftp -P ${DISTDIR} ${URI}' >ROOT=/ >ROOTPATH=/usr/local/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.3:/opt/blackdown-jdk-1.4.1/bin:/opt/blackdown-jdk-1.4.1/jre/bin >RPMDIR=/usr/portage/rpm >RSYNC_RETRIES=3 >RSYNC_TIMEOUT=180 >S=/var/tmp/portage/xorg-x11-6.8.0-r1/work/xc >SHELL=/bin/bash >SHELLOPTS=braceexpand:hashall:interactive-comments >SHLVL=3 >SLOT=0 >SRC_URI=$'mirror://gentoo/eurofonts-X11.tar.bz2\n\thttp://dev.gentoo.org/~cyfred/xorg/xorg-x11/patchsets/6.8.0/xfsft-encodings-0.1.tar.bz2\n\tmirror://gentoo/gentoo-cursors-tad-0.3.1.tar.bz2\n\tnls? ( mirror://gentoo/gemini-koi8-u.tar.bz2 )\n\tmirror://gentoo/xorg-x11-6.8.0-files-0.4.tar.bz2\n\thttp://dev.gentoo.org/~spyderous/xorg-x11/patchsets/6.8.0/xorg-x11-6.8.0-files-0.4.tar.bz2\n\thttp://dev.gentoo.org/~cyfred/distfiles/xorg-x11-6.8.0-files-0.4.tar.bz2\n\t\n\tmirror://gentoo/xorg-x11-6.8.0-patches-0.2.2.1.tar.bz2\n\thttp://dev.gentoo.org/~spyderous/xorg-x11/patchsets/6.8.0/xorg-x11-6.8.0-patches-0.2.2.1.tar.bz2\n\thttp://dev.gentoo.org/~cyfred/distfiles/xorg-x11-6.8.0-patches-0.2.2.1.tar.bz2\n\thttp://freedesktop.org/~xorg/X11R6.8.0/src/X11R6.8.0-src1.tar.gz\n\thttp://freedesktop.org/~xorg/X11R6.8.0/src//X11R6.8.0-src2.tar.gz\n\thttp://freedesktop.org/~xorg/X11R6.8.0/src//X11R6.8.0-src3.tar.gz\n\thttp://freedesktop.org/~xorg/X11R6.8.0/src//X11R6.8.0-src4.tar.gz\n\thttp://freedesktop.org/~xorg/X11R6.8.0/src//X11R6.8.0-src5.tar.gz\n\tdoc? (\n\t\thttp://freedesktop.org/~xorg/X11R6.8.0/src//X11R6.8.0-src6.tar.gz\n\t\thttp://freedesktop.org/~xorg/X11R6.8.0/src//X11R6.8.0-src7.tar.gz\n\t)' >SSH_CLIENT='192.168.1.96 2231 22' >SSH_CONNECTION='192.168.1.96 2231 192.168.1.110 22' >SSH_TTY=/dev/pts/0 >STARTDIR=/root >SVCDIR=/var/lib/supervise >SYNC=rsync://rsync.gentoo.org/gentoo-portage >T=/var/tmp/portage/xorg-x11-6.8.0-r1/temp >TERM=xterm >TMP=/var/tmp/portage/xorg-x11-6.8.0-r1/temp >TMPDIR=/var/tmp/portage/xorg-x11-6.8.0-r1/temp >UID=0 >UNSTABLE_FLAGS='-Os -O3 -freorder-blocks -fprefetch-loop-arrays' >USE='X apm arts avi berkdb bitmap-fonts crypt cups encode f77 foomaticdb gdbm gif gnome gpm gtk gtk2 imlib java jpeg kde libg++ libwww mad mikmod motif mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline ruby sdl slang spell ssl svga tcpd truetype x86 xml2 xmms xprint xv zlib' >USER=root >USERLAND=GNU >USE_EXPAND='VIDEO_CARDS INPUT_DEVICES LINGUAS' >WANT_GCC_3=no >WARN=$'\E[33;01m' >WORKDIR=/var/tmp/portage/xorg-x11-6.8.0-r1/work >XARGS='xargs -r' >XCUR_VER=0.3.1 >XFSFT_ENC_VER=0.1 >X_DRIVERS= >X_PATCHES=$'mirror://gentoo/xorg-x11-6.8.0-patches-0.2.2.1.tar.bz2\n\thttp://dev.gentoo.org/~spyderous/xorg-x11/patchsets/6.8.0/xorg-x11-6.8.0-patches-0.2.2.1.tar.bz2\n\thttp://dev.gentoo.org/~cyfred/distfiles/xorg-x11-6.8.0-patches-0.2.2.1.tar.bz2' >_=002 >deptypes='need use' >myarg=unpack >ordtypes='before after' >svcdir=/var/lib/init.d >svcfstype=tmpfs >svclib=/lib/rcscripts >svcmount=no >svcsize=2048 >EXPORT_FUNCTIONS () >{ > if [ -z "$ECLASS" ]; then > echo "EXPORT_FUNCTIONS without a defined ECLASS" 1>&2; > exit 1; > fi; > while [ "$1" ]; do > debug-print "EXPORT_FUNCTIONS: ${1} -> ${ECLASS}_${1}"; > eval "$1() { ${ECLASS}_$1 "\$@" ; }" >/dev/null; > shift; > done >} >KV_major () >{ > local KV=; > [ -z "$1" ] && return 1; > KV="$(echo "$1" | awk '{ tmp = $0; gsub(/^[0-9\.]*/, "", tmp); sub(tmp, ""); print }')"; > echo "${KV}" | awk -- 'BEGIN { FS = "." } { print $1 }'; > return 0 >} >KV_micro () >{ > local KV=; > [ -z "$1" ] && return 1; > KV="$(echo "$1" | awk '{ tmp = $0; gsub(/^[0-9\.]*/, "", tmp); sub(tmp, ""); print }')"; > echo "${KV}" | awk -- 'BEGIN { FS = "." } { print $3 }'; > return 0 >} >KV_minor () >{ > local KV=; > [ -z "$1" ] && return 1; > KV="$(echo "$1" | awk '{ tmp = $0; gsub(/^[0-9\.]*/, "", tmp); sub(tmp, ""); print }')"; > echo "${KV}" | awk -- 'BEGIN { FS = "." } { print $2 }'; > return 0 >} >KV_to_int () >{ > local KV_MAJOR=; > local KV_MINOR=; > local KV_MICRO=; > local KV_int=; > [ -z "$1" ] && return 1; > KV_MAJOR="$(KV_major "$1")"; > KV_MINOR="$(KV_minor "$1")"; > KV_MICRO="$(KV_micro "$1")"; > KV_int="$((KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO))"; > if [ "${KV_int}" -ge 131584 ]; then > echo "${KV_int}"; > return 0; > fi; > return 1 >} >abort_compile () >{ > abort_handler "src_compile" $1; > rm -f "${BUILDDIR}/.compiled"; > exit 1 >} >abort_handler () >{ > local msg; > if [ "$2" != "fail" ]; then > msg="${EBUILD}: ${1} aborted; exiting."; > else > msg="${EBUILD}: ${1} failed; exiting."; > fi; > echo; > echo "$msg"; > echo; > eval ${3}; > trap SIGINT SIGQUIT >} >abort_install () >{ > abort_handler "src_install" $1; > rm -rf "${BUILDDIR}/image"; > exit 1 >} >abort_package () >{ > abort_handler "dyn_package" $1; > rm -f "${BUILDDIR}/.packaged"; > rm -f "${PKGDIR}"/All/${PF}.t*; > exit 1 >} >abort_unpack () >{ > abort_handler "src_unpack" $1; > rm -f "${BUILDDIR}/.unpacked"; > rm -rf "${BUILDDIR}/work"; > exit 1 >} >add_suffix () >{ > if [ "${RC_USE_CONFIG_PROFILE}" = "yes" -a -e "$1.${DEFAULTLEVEL}" ]; then > echo "$1.${DEFAULTLEVEL}"; > else > echo "$1"; > fi; > return 0 >} >adddeny () >{ > export SANDBOX_DENY="$SANDBOX_DENY:$1" >} >addpredict () >{ > export SANDBOX_PREDICT="$SANDBOX_PREDICT:$1" >} >addread () >{ > export SANDBOX_READ="$SANDBOX_READ:$1" >} >addwrite () >{ > export SANDBOX_WRITE="$SANDBOX_WRITE:$1" >} >append-flags () >{ > export CFLAGS="${CFLAGS} $*"; > export CXXFLAGS="${CXXFLAGS} $*"; > [ -n "`is-flag -fno-stack-protector`" -o -n "`is-flag -fno-stack-protector-all`" ] && fstack-flags; > return 0 >} >append-ldflags () >{ > export LDFLAGS="${LDFLAGS} $*"; > return 0 >} >append-lfs-flags () >{ > append-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE >} >arch () >{ > if archq ${1}; then > echo "${1}"; > return 0; > fi; > return 1 >} >archq () >{ > local u="${1}"; > local neg=0; > if [ "${u:0:1}" == "!" ]; then > u="${u:1}"; > neg=1; > fi; > local x; > for x in ${ARCH}; > do > if [ "${x}" == "${u}" ]; then > if [ ${neg} -eq 1 ]; then > return 1; > else > return 0; > fi; > fi; > done; > if [ ${neg} -eq 1 ]; then > return 0; > else > return 1; > fi >} >backward_compat_setup () >{ > G_FONTDIRS="CID Speedo TTF Type1 encodings local misc util"; > if use bitmap-fonts; then > G_FONTDIRS="${G_FONTDIRS} 75dpi 100dpi"; > fi; > dodir /usr/X11R6/$(get_libdir)/X11/fonts/; > for G_FONTDIR in ${G_FONTDIRS}; > do > dosym ${ROOT}/usr/share/fonts/${G_FONTDIR} /usr/X11R6/$(get_libdir)/X11/fonts/${G_FONTDIR}; > done; > dosym ${ROOT}/usr/share/man /usr/X11R6/man; > dosym ${ROOT}/usr/share/doc/${PF} /usr/X11R6/$(get_libdir)/X11/doc >} >best_version () >{ > [ "${EBUILD_PHASE}" == "depend" ] && echo "best_version() in global scope: ${CATEGORY}/$PF" 1>&2; > /usr/lib/portage/bin/portageq 'best_version' "${ROOT}" "$1" >} >cdrom_get_cds () >{ > local cdcnt=0; > local f=; > for f in "$@"; > do > cdcnt=$((cdcnt + 1)); > export CDROM_CHECK_${cdcnt}="$f"; > done; > export CDROM_TOTAL_CDS=${cdcnt}; > export CDROM_CURRENT_CD=1; > if [ ! -z "${CD_ROOT}" ]; then > export CDROM_ROOT="${CD_ROOT}"; > einfo "Found CD #${CDROM_CURRENT_CD} root at ${CDROM_ROOT}"; > return; > fi; > if [ ! -z "${CD_ROOT_1}" ]; then > local var=; > cdcnt=0; > while [ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]; do > cdcnt=$((cdcnt + 1)); > var="CD_ROOT_${cdcnt}"; > if [ -z "${!var}" ]; then > eerror "You must either use just the CD_ROOT"; > eerror "or specify ALL the CD_ROOT_X variables."; > eerror "In this case, you will need ${CDROM_TOTAL_CDS} CD_ROOT_X variables."; > diefunc "$FUNCNAME" "$LINENO" "$?" "could not locate CD_ROOT_${cdcnt}"; > fi; > export CDROM_ROOTS_${cdcnt}="${!var}"; > done; > export CDROM_ROOT=${CDROM_ROOTS_1}; > einfo "Found CD #${CDROM_CURRENT_CD} root at ${CDROM_ROOT}"; > return; > fi; > if [ ${CDROM_TOTAL_CDS} -eq 1 ]; then > einfon "This ebuild will need the "; > if [ -z "${CDROM_NAME}" ]; then > echo "cdrom for ${PN}."; > else > echo "${CDROM_NAME}."; > fi; > echo; > einfo "If you do not have the CD, but have the data files"; > einfo "mounted somewhere on your filesystem, just export"; > einfo "the variable CD_ROOT so that it points to the"; > einfo "directory containing the files."; > echo; > else > einfo "This package will need access to ${CDROM_TOTAL_CDS} cds."; > cdcnt=0; > while [ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]; do > cdcnt=$((cdcnt + 1)); > var="CDROM_NAME_${cdcnt}"; > [ ! -z "${!var}" ] && einfo " CD ${cdcnt}: ${!var}"; > done; > echo; > einfo "If you do not have the CDs, but have the data files"; > einfo "mounted somewhere on your filesystem, just export"; > einfo "the following variables so they point to the right place:"; > einfon ""; > cdcnt=0; > while [ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]; do > cdcnt=$((cdcnt + 1)); > echo -n " CD_ROOT_${cdcnt}"; > done; > echo; > einfo "Or, if you have all the files in the same place, or"; > einfo "you only have one cdrom, you can export CD_ROOT"; > einfo "and that place will be used as the same data source"; > einfo "for all the CDs."; > echo; > fi; > export CDROM_CURRENT_CD=0; > cdrom_load_next_cd >} >cdrom_load_next_cd () >{ > export CDROM_CURRENT_CD=$((CDROM_CURRENT_CD + 1)); > local var=; > if [ ! -z "${CD_ROOT}" ]; then > einfo "Using same root as before for CD #${CDROM_CURRENT_CD}"; > return; > fi; > unset CDROM_ROOT; > var=CDROM_ROOTS_${CDROM_CURRENT_CD}; > if [ -z "${!var}" ]; then > var="CDROM_CHECK_${CDROM_CURRENT_CD}"; > cdrom_locate_file_on_cd ${!var}; > else > export CDROM_ROOT="${!var}"; > fi; > einfo "Found CD #${CDROM_CURRENT_CD} root at ${CDROM_ROOT}" >} >cdrom_locate_file_on_cd () >{ > while [ -z "${CDROM_ROOT}" ]; do > local dir="$(dirname ${@})"; > local file="$(basename ${@})"; > local mline=""; > local showedmsg=0; > for mline in `mount | egrep -e '(iso|cdrom)' | awk '{print $3}'`; > do > [ -d "${mline}/${dir}" ] || continue; > [ ! -z "$(find ${mline}/${dir} -iname ${file} -maxdepth 1)" ] && export CDROM_ROOT=${mline}; > done; > if [ -z "${CDROM_ROOT}" ]; then > echo; > if [ ${showedmsg} -eq 0 ]; then > if [ ${CDROM_TOTAL_CDS} -eq 1 ]; then > if [ -z "${CDROM_NAME}" ]; then > einfo "Please insert the cdrom for ${PN} now !"; > else > einfo "Please insert the ${CDROM_NAME} cdrom now !"; > fi; > else > if [ -z "${CDROM_NAME_1}" ]; then > einfo "Please insert cd #${CDROM_CURRENT_CD} for ${PN} now !"; > else > local var="CDROM_NAME_${CDROM_CURRENT_CD}"; > einfo "Please insert+mount the ${!var} cdrom now !"; > fi; > fi; > showedmsg=1; > fi; > einfo "Press return to scan for the cd again"; > einfo "or hit CTRL+C to abort the emerge."; > read; > fi; > done >} >cflag_setup () >{ > filter-flags "-funroll-loops"; > ALLOWED_FLAGS="-fstack-protector -march -mcpu -O -O1 -O2 -O3 -pipe -fomit-frame-pointer -g -gstabs+ -gstabs -ggdb"; > case "${ARCH}" in > mips) > ALLOWED_FLAGS="${ALLOWED_FLAGS} -mtune -mips1 -mips2 -mips3 -mips4 -mabi" > ;; > sparc) > filter-flags "-fomit-frame-pointer"; > if use hardened; then > einfo "Softening gcc for sparc"; > ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-pie -fno-PIE"; > append-flags "-fno-pie -fno-PIE"; > fi > ;; > hppa) > replace-cpu-flags 2.0 1.0 > ;; > esac; > strip-flags >} >check_KV () >{ > if [ -z "${KV}" ]; then > eerror ""; > eerror "Could not determine your kernel version."; > eerror "Make sure that you have /usr/src/linux symlink."; > eerror "And that said kernel has been configured."; > eerror "You can also simply run the following command"; > eerror "in the kernel referenced by /usr/src/linux:"; > eerror " make include/linux/version.h"; > eerror ""; > diefunc "$FUNCNAME" "$LINENO" "$?"; > fi >} >check_license () >{ > local lic=$1; > if [ -z "${lic}" ]; then > lic="${PORTDIR}/licenses/${LICENSE}"; > else > if [ -e "${PORTDIR}/licenses/${src}" ]; then > lic="${PORTDIR}/licenses/${src}"; > else > if [ -e "${PWD}/${src}" ]; then > lic="${PWD}/${src}"; > else > if [ -e "${src}" ]; then > lic="${src}"; > fi; > fi; > fi; > fi; > [ ! -f "${lic}" ] && diefunc "$FUNCNAME" "$LINENO" "$?" "Could not find requested license ${src}"; > local l="`basename ${lic}`"; > local shopts=$-; > local alic; > set -o noglob; > for alic in ${ACCEPT_LICENSE}; > do > if [[ ${alic} == * || ${alic} == ${l} ]]; then > set +o noglob; > set -${shopts}; > return 0; > fi; > done; > set +o noglob; > set -$shopts; > local licmsg="$(emktemp)"; > cat >${licmsg} <<EOF >********************************************************** >The following license outlines the terms of use of this >package. You MUST accept this license for installation to >continue. When you are done viewing, hit 'q'. If you >CTRL+C out of this, the install will not run! >********************************************************** > >EOF > > cat ${lic} >>${licmsg}; > ${PAGER:-less} ${licmsg} || diefunc "$FUNCNAME" "$LINENO" "$?" "Could not execute pager (${PAGER}) to accept ${lic}"; > einfon "Do you accept the terms of this license (${l})? [yes/no] "; > read alic; > case ${alic} in > yes | Yes | y | Y) > return 0 > ;; > *) > echo; > echo; > echo; > eerror "You MUST accept the license to continue! Exiting!"; > diefunc "$FUNCNAME" "$LINENO" "$?" "Failed to accept license" > ;; > esac >} >check_version_h () >{ > if [ ! -f "${ROOT}/usr/src/linux/include/linux/version.h" ]; then > eerror "Please verify that your /usr/src/linux symlink is pointing"; > eerror "to your current kernel sources, and that you did run:"; > eerror; > eerror " # make dep"; > diefunc "$FUNCNAME" "$LINENO" "$?" "/usr/src/linux symlink not setup!"; > fi >} >compose_files_setup () >{ > for x in $(find ${D}/usr/X11R6/$(get_libdir)/X11/locale/ -mindepth 1 -type d); > do > case `basename ${x}` in > C | microsoft-* | iso8859-* | koi8-*) > if [ ! -f ${x}/Compose ]; then > touch ${x}/Compose; > fi > ;; > ja* | ko* | zh*) > if [ -r ${x}/Compose ]; then > rm -f ${x}/Compose; > fi > ;; > esac; > done; > for i in ${D}/usr/X11R6/$(get_libdir)/X11/locale/*/Compose; > do > sed -i -e 's/\(<dead_diaeresis> <space>\).*$/\1 : "\\"" quotedbl/' -e "s/\(<dead_acute> <space>\).*$/\1 : \"'\" apostrophe/" ${i}; > done >} >debug-print () >{ > [ -z "$T" ] && return 0; > while [ "$1" ]; do > if [ "$ECLASS_DEBUG_OUTPUT" == "on" ]; then > echo "debug: $1"; > else > if [ -n "$ECLASS_DEBUG_OUTPUT" ]; then > echo "debug: $1" >>$ECLASS_DEBUG_OUTPUT; > fi; > fi; > echo "$1" >>"${T}/eclass-debug.log"; > chmod g+w "${T}/eclass-debug.log" >&/dev/null; > shift; > done >} >debug-print-function () >{ > str="$1: entering function"; > shift; > debug-print "$str, parameters: $*" >} >debug-print-section () >{ > debug-print "now in section $*" >} >diefunc () >{ > local funcname="$1" lineno="$2" exitcode="$3"; > shift 3; > echo 1>&2; > echo "!!! ERROR: $CATEGORY/$PF failed." 1>&2; > echo "!!! Function $funcname, Line $lineno, Exitcode $exitcode" 1>&2; > echo "!!! ${*:-(no error message)}" 1>&2; > echo 1>&2; > exit 1 >} >diropts () >{ > DIROPTIONS=""; > for x in $*; > do > DIROPTIONS="${DIROPTIONS} $x"; > done; > export DIROPTIONS >} >do_newdepend () >{ > debug-print-function do_newdepend $*; > [ -z "$1" ] && diefunc "$FUNCNAME" "$LINENO" "$?" "do_newdepend without arguments"; > [[ ${ECLASS_DEPTH} > 0 ]] && TARGET="E_$1"; > [[ ${ECLASS_DEPTH} > 0 ]] || TARGET="$1"; > shift; > while [ -n "$1" ]; do > eval export ${TARGET}=\"\${${TARGET}} $1\"; > shift; > done >} >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 >} >dolisting () >{ > local x=; > local y=; > local tmpstr=; > local mylist=; > local mypath="${*}"; > if [ "${mypath%/\*}" != "${mypath}" ]; then > mypath="${mypath%/\*}"; > fi; > for x in ${mypath}; > do > [ ! -e "${x}" ] && continue; > if [ ! -d "${x}" ] && ( [ -L "${x}" -o -f "${x}" ] ); then > mylist="${mylist} $(ls "${x}" 2> /dev/null)"; > else > [ "${x%/}" != "${x}" ] && x="${x%/}"; > cd "${x}"; > tmpstr="$(ls)"; > for y in ${tmpstr}; > do > mylist="${mylist} ${x}/${y}"; > done; > fi; > done; > echo "${mylist}" >} >draw_line () >{ > local i=0; > local str_length=""; > if [ -z "$1" -o ! -x "$(which wc 2>/dev/null)" ]; then > echo "==============================================================="; > return 0; > fi; > str_length="$(echo -n "$*" | wc -m)"; > while [ "$i" -lt "${str_length}" ]; do > echo -n "="; > i=$((i + 1)); > done; > echo; > return 0 >} >dyn_clean () >{ > rm -rf "${BUILDDIR}/image"; > rm -rf "${BUILDDIR}/build-info"; > if ! has keeptemp $FEATURES; then > rm -rf "${T}"/*; > else > mv "${T}/environment" "${T}/environment.keeptemp"; > fi; > if ! has keepwork $FEATURES; then > rm -rf "${BUILDDIR}/.compiled"; > rm -rf "${BUILDDIR}/.unpacked"; > rm -rf "${WORKDIR}"; > fi; > if [ -f "${BUILDDIR}/.unpacked" ]; then > find "${BUILDDIR}" -type d ! -regex "^${WORKDIR}" | sort -r | tr "\n" "\0" | $XARGS -0 rmdir >&/dev/null; > fi; > true >} >dyn_compile () >{ > trap "abort_compile" SIGINT SIGQUIT; > [ "${CFLAGS-unset}" != "unset" ] && export CFLAGS; > [ "${CXXFLAGS-unset}" != "unset" ] && export CXXFLAGS; > [ "${LIBCFLAGS-unset}" != "unset" ] && export LIBCFLAGS; > [ "${LIBCXXFLAGS-unset}" != "unset" ] && export LIBCXXFLAGS; > [ "${LDFLAGS-unset}" != "unset" ] && export LDFLAGS; > [ "${ASFLAGS-unset}" != "unset" ] && export ASFLAGS; > [ "${DISTCC_DIR-unset}" == "unset" ] && export DISTCC_DIR="${PORTAGE_TMPDIR}/.distcc"; > [ ! -z "${DISTCC_DIR}" ] && addwrite "${DISTCC_DIR}"; > if has noauto $FEATURES >&/dev/null && [ ! -f ${BUILDDIR}/.unpacked ]; then > echo; > echo "!!! We apparently haven't unpacked... This is probably not what you"; > echo "!!! want to be doing... You are using FEATURES=noauto so I'll assume"; > echo "!!! that you know what you are doing... You have 5 seconds to abort..."; > echo; > echo -ne "\a"; > sleep 0.25 >&/dev/null; > echo -ne "\a"; > sleep 0.25 >&/dev/null; > echo -ne "\a"; > sleep 0.25 >&/dev/null; > echo -ne "\a"; > sleep 0.25 >&/dev/null; > echo -ne "\a"; > sleep 0.25 >&/dev/null; > echo -ne "\a"; > sleep 0.25 >&/dev/null; > echo -ne "\a"; > sleep 0.25 >&/dev/null; > echo -ne "\a"; > sleep 0.25 >&/dev/null; > echo -ne "\a"; > sleep 0,25 >&/dev/null; > echo -ne "\a"; > sleep 0,25 >&/dev/null; > echo -ne "\a"; > sleep 0,25 >&/dev/null; > echo -ne "\a"; > sleep 0,25 >&/dev/null; > echo -ne "\a"; > sleep 0,25 >&/dev/null; > echo -ne "\a"; > sleep 0,25 >&/dev/null; > echo -ne "\a"; > sleep 0,25 >&/dev/null; > echo -ne "\a"; > sleep 0,25 >&/dev/null; > sleep 3; > fi; > cd "${BUILDDIR}"; > if [ ! -e "build-info" ]; then > mkdir build-info; > fi; > cp "${EBUILD}" "build-info/${PF}.ebuild"; > if [ ${BUILDDIR}/.compiled -nt "${WORKDIR}" ]; then > echo ">>> It appears that ${PN} is already compiled; skipping."; > echo ">>> (clean to force compilation)"; > trap SIGINT SIGQUIT; > return; > fi; > if [ -d "${S}" ]; then > cd "${S}"; > fi; > export S D; > export PWORKDIR="$WORKDIR"; > src_compile; > cd "${BUILDDIR}"; > touch .compiled; > cd build-info; > echo "$CBUILD" >CBUILD; > echo "$CC" >CC; > echo "$CDEPEND" >CDEPEND; > echo "$CFLAGS" >CFLAGS; > echo "$CHOST" >CHOST; > echo "$CXX" >CXX; > echo "$CXXFLAGS" >CXXFLAGS; > echo "$DEPEND" >DEPEND; > echo "$IUSE" >IUSE; > echo "$PKGUSE" >PKGUSE; > echo "$LICENSE" >LICENSE; > echo "$CATEGORY" >CATEGORY; > echo "$PDEPEND" >PDEPEND; > echo "$PF" >PF; > echo "$PROVIDE" >PROVIDE; > echo "$RDEPEND" >RDEPEND; > echo "$SLOT" >SLOT; > echo "$USE" >USE; > set | bzip2 -9 - >environment.bz2; > cp "${EBUILD}" "${PF}.ebuild"; > if has nostrip $FEATURES $RESTRICT; then > touch DEBUGBUILD; > fi; > trap SIGINT SIGQUIT >} >dyn_help () >{ > echo; > echo "Portage"; > echo "Copyright 2002 Gentoo Technologies, Inc."; > echo; > echo "How to use the ebuild command:"; > echo; > echo "The first argument to ebuild should be an existing .ebuild file."; > echo; > echo "One or more of the following options can then be specified. If more"; > echo "than one option is specified, each will be executed in order."; > echo; > echo " setup : execute package specific setup actions"; > echo " fetch : download source archive(s) and patches"; > echo " unpack : unpack/patch sources (auto-fetch if needed)"; > echo " compile : compile sources (auto-fetch/unpack if needed)"; > echo " merge : merge image into live filesystem, recording files in db"; > echo " (auto-fetch/unpack/compile if needed)"; > echo " unmerge : remove package from live filesystem"; > echo " package : create tarball package of type ${PACKAGE}"; > echo " (will be stored in ${PKGDIR}/All)"; > echo " clean : clean up all source and temporary files"; > echo; > echo "The following settings will be used for the ebuild process:"; > echo; > echo " package : ${PF}"; > echo " slot : ${SLOT}"; > echo " category : ${CATEGORY}"; > echo " description : ${DESCRIPTION}"; > echo " system : ${CHOST}"; > echo " c flags : ${CFLAGS}"; > echo " c++ flags : ${CXXFLAGS}"; > echo " make flags : ${MAKEOPTS}"; > echo -n " build mode : "; > if has nostrip $FEATURES $RESTRICT; then > echo "debug (large)"; > else > echo "production (stripped)"; > fi; > echo " merge to : ${ROOT}"; > echo; > if [ -n "$USE" ]; then > echo "Additionally, support for the following optional features will be enabled:"; > echo; > echo " ${USE}"; > fi; > echo >} >dyn_install () >{ > trap "abort_install" SIGINT SIGQUIT; > rm -rf "${BUILDDIR}/image"; > mkdir "${BUILDDIR}/image"; > if [ -d "${S}" ]; then > cd "${S}"; > fi; > echo; > echo ">>> Install ${PF} into ${D} category ${CATEGORY}"; > export S D; > export PWORKDIR="$WORKDIR"; > src_install; > prepall; > cd "${D}"; > declare -i UNSAFE=0; > for i in $(find "${D}/" -type f -perm -2002); > do > UNSAFE=$(($UNSAFE + 1)); > echo "UNSAFE SetGID: $i"; > done; > for i in $(find "${D}/" -type f -perm -4002); > do > UNSAFE=$(($UNSAFE + 1)); > echo "UNSAFE SetUID: $i"; > done; > if [[ $UNSAFE > 0 ]]; then > diefunc "$FUNCNAME" "$LINENO" "$?" "There are ${UNSAFE} unsafe files. Portage will not install them."; > fi; > find "${D}/" -user portage -print0 | $XARGS -0 -n100 chown root; > if [ "$USERLAND" == "BSD" ]; then > find "${D}/" -group portage -print0 | $XARGS -0 -n100 chgrp wheel; > else > find "${D}/" -group portage -print0 | $XARGS -0 -n100 chgrp root; > fi; > echo ">>> Completed installing into ${D}"; > echo; > cd ${BUILDDIR}; > trap SIGINT SIGQUIT >} >dyn_package () >{ > trap "abort_package" SIGINT SIGQUIT; > cd "${BUILDDIR}/image"; > tar cpvf - ./ | bzip2 -f >../bin.tar.bz2 || diefunc "$FUNCNAME" "$LINENO" "$?" "Failed to create tarball"; > cd ..; > xpak build-info inf.xpak; > tbz2tool join bin.tar.bz2 inf.xpak "${PF}.tbz2"; > mv "${PF}.tbz2" "${PKGDIR}/All" || diefunc "$FUNCNAME" "$LINENO" "$?" "Failed to move tbz2 to ${PKGDIR}/All"; > rm -f inf.xpak bin.tar.bz2; > if [ ! -d "${PKGDIR}/${CATEGORY}" ]; then > install -d "${PKGDIR}/${CATEGORY}"; > fi; > ln -sf "../All/${PF}.tbz2" "${PKGDIR}/${CATEGORY}/${PF}.tbz2" || diefunc "$FUNCNAME" "$LINENO" "$?" "Failed to create symlink in ${PKGDIR}/${CATEGORY}"; > echo ">>> Done."; > cd "${BUILDDIR}"; > touch .packaged || diefunc "$FUNCNAME" "$LINENO" "$?" "Failed to 'touch .packaged' in ${BUILDDIR}"; > trap SIGINT SIGQUIT >} >dyn_preinst () >{ > [ "${EMERGE_FROM}" == "binary" ] && IMAGE=${PKG_TMPDIR}/${PF}/bin || IMAGE=${D}; > pkg_preinst; > if has noman $FEATURES; then > rm -fR "${IMAGE}/usr/share/man"; > fi; > if has noinfo $FEATURES; then > rm -fR "${IMAGE}/usr/share/info"; > fi; > if has nodoc $FEATURES; then > rm -fR "${IMAGE}/usr/share/doc"; > fi; > if has sfperms $FEATURES; then > for i in $(find ${IMAGE}/ -type f -perm -4000); > do > ebegin ">>> SetUID: [chmod go-r] $i "; > chmod go-r "$i"; > eend $?; > done; > for i in $(find ${IMAGE}/ -type f -perm -2000); > do > ebegin ">>> SetGID: [chmod o-r] $i "; > chmod o-r "$i"; > eend $?; > done; > fi; > if has suidctl $FEATURES >/dev/null; then > sfconf=/etc/portage/suidctl.conf; > echo ">>> Preforming suid scan in ${IMAGE}"; > for i in $(find ${IMAGE}/ -type f \( -perm -4000 -o -perm -2000 \) ); > do > if [ -s "${sfconf}" ]; then > suid="`grep ^${i/${IMAGE}/}$ ${sfconf}`"; > if [ "${suid}" = "${i/${IMAGE}/}" ]; then > echo "- ${i/${IMAGE}/} is an approved suid file"; > else > for x in 5 4 3 2 1 0; > do > echo -ne "\a"; > sleep 0.25; > done; > echo ">>> Removing sbit on non registered ${i/${IMAGE}/}"; > echo -ne "\a"; > chmod ugo-s "${i}"; > grep ^#${i/${IMAGE}/}$ ${sfconf} >/dev/null || { > addwrite "${sfconf}"; > echo ">>> Appending commented out entry to ${sfconf} for ${PF}"; > ls -ldh "${i}" | awk '{print "## "$0}' | sed s:"${IMAGE}"::g >>${sfconf}; > echo "#${i/${IMAGE}/}" >>${sfconf} > }; > fi; > else > echo "suidctl feature set but you are lacking a ${sfconf}"; > fi; > done; > fi; > if use selinux; then > if [ -f /selinux/context -a -x /usr/sbin/setfiles ]; then > echo ">>> Setting SELinux security labels"; > if [ -f ${POLICYDIR}/file_contexts/file_contexts ]; then > cp -f "${POLICYDIR}/file_contexts/file_contexts" "${T}"; > else > make -C "${POLICYDIR}" FC=${T}/file_contexts "${T}/file_contexts"; > fi; > addwrite /selinux/context; > /usr/sbin/setfiles -r "${IMAGE}" "${T}/file_contexts" "${IMAGE}" || diefunc "$FUNCNAME" "$LINENO" "$?" "Failed to set SELinux security labels."; > else > echo "!!! Unable to set SELinux security labels"; > fi; > fi; > trap SIGINT SIGQUIT >} >dyn_rpm () >{ > dyn_spec; > rpm -bb "${PF}.spec" || diefunc "$FUNCNAME" "$LINENO" "$?" "Failed to integrate rpm spec file"; > install -D "/usr/src/redhat/RPMS/i386/${PN}-${PV}-${PR}.i386.rpm" "${RPMDIR}/${CATEGORY}/${PN}-${PV}-${PR}.rpm" || diefunc "$FUNCNAME" "$LINENO" "$?" "Failed to move rpm" >} >dyn_setup () >{ > if [ "$USERLAND" == "Linux" ]; then > if [ "${DISABLE_GEN_GCC_WRAPPERS}" != "yes" ]; then > if [ -L /lib/cpp -o ! -e /lib/cpp ]; then > [ -L /lib/cpp ] && rm -f /lib/cpp; > gen_wrapper /lib/cpp cpp; > fi; > if [ -L /usr/bin/cc -o ! -e /usr/bin/cc ]; then > [ -L /usr/bin/cc ] && rm -f /usr/bin/cc; > gen_wrapper /usr/bin/cc gcc; > fi; > fi; > fi; > pkg_setup >} >dyn_spec () >{ > tar czf "/usr/src/redhat/SOURCES/${PF}.tar.gz" "${O}/${PF}.ebuild" "${O}/files" || diefunc "$FUNCNAME" "$LINENO" "$?" "Failed to create base rpm tarball."; > cat >${PF}.spec <<__END1__ >Summary: ${DESCRIPTION} >Name: ${PN} >Version: ${PV} >Release: ${PR} >Copyright: GPL >Group: portage/${CATEGORY} >Source: ${PF}.tar.gz >Buildroot: ${D} >%description >${DESCRIPTION} > >${HOMEPAGE} > >%prep >%setup -c > >%build > >%install > >%clean > >%files >/ >__END1__ > >} >dyn_unpack () >{ > trap "abort_unpack" SIGINT SIGQUIT; > local newstuff="no"; > if [ -e "${WORKDIR}" ]; then > local x; > local checkme; > for x in ${AA}; > do > echo ">>> Checking ${x}'s mtime..."; > if [ "${DISTDIR}/${x}" -nt "${WORKDIR}" ]; then > echo ">>> ${x} has been updated; recreating WORKDIR..."; > newstuff="yes"; > rm -rf "${WORKDIR}"; > break; > fi; > done; > if [ "${EBUILD}" -nt "${WORKDIR}" ]; then > echo ">>> ${EBUILD} has been updated; recreating WORKDIR..."; > newstuff="yes"; > rm -rf "${WORKDIR}"; > else > if [ ! -f "${BUILDDIR}/.unpacked" ]; then > echo ">>> Not marked as unpacked; recreating WORKDIR..."; > newstuff="yes"; > rm -rf "${WORKDIR}"; > fi; > fi; > fi; > if [ -e "${WORKDIR}" ]; then > if [ "$newstuff" == "no" ]; then > echo ">>> WORKDIR is up-to-date, keeping..."; > return 0; > fi; > fi; > install -m0700 -d "${WORKDIR}" || diefunc "$FUNCNAME" "$LINENO" "$?" "Failed to create dir '${WORKDIR}'"; > [ -d "$WORKDIR" ] && cd "${WORKDIR}"; > echo ">>> Unpacking source..."; > src_unpack; > touch "${BUILDDIR}/.unpacked" || diefunc "$FUNCNAME" "$LINENO" "$?" "IO Failure -- Failed 'touch .unpacked' in BUILDIR"; > echo ">>> Source unpacked."; > cd "$BUILDDIR"; > trap SIGINT SIGQUIT >} >ebeep () >{ > local n; > if [ -z "$EBEEP_IGNORE" ] && [ -t 1 ]; then > for (( n=1 ; n <= ${1:-5} ; n++ )) > do > echo -ne "\a"; > sleep 0.1 >&/dev/null; > sleep 0,1 >&/dev/null; > echo -ne "\a"; > sleep 1; > done; > fi >} >ebegin () >{ > if [ "${RC_QUIET_STDOUT}" != "yes" ]; then > if [ "${RC_NOCOLOR}" = "yes" ]; then > echo -ne " ${GOOD}*${NORMAL} ${*}..."; > else > echo -e " ${GOOD}*${NORMAL} ${*}..."; > fi; > fi; > return 0 >} >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} "$@" || diefunc "$FUNCNAME" "$LINENO" "$?" "econf failed"; > else > diefunc "$FUNCNAME" "$LINENO" "$?" "no configure script found"; > fi >} >edos2unix () >{ > for f in "$@"; > do > cp "${f}" ${T}/edos2unix; > sed 's/\r$//' ${T}/edos2unix >"${f}"; > done >} >eend () >{ > local retval=; > if [ "$#" -eq 0 ] || ( [ -n "$1" ] && [ "$1" -eq 0 ] ); then > if [ "${RC_QUIET_STDOUT}" != "yes" ]; then > echo -e "${ENDCOL} ${BRACKET}[ ${GOOD}ok${BRACKET} ]${NORMAL}"; > fi; > else > retval="$1"; > if [ -c /dev/null ]; then > rc_splash "stop" >&/dev/null & > else > rc_splash "stop" & > fi; > if [ "$#" -ge 2 ]; then > shift; > eerror "${*}"; > fi; > if [ "${RC_QUIET_STDOUT}" != "yes" ]; then > echo -e "${ENDCOL} ${BRACKET}[ ${BAD}!!${BRACKET} ]${NORMAL}"; > echo; > fi; > return ${retval}; > fi; > return 0 >} >eerror () >{ > if [ "${RC_QUIET_STDOUT}" = "yes" ]; then > echo " ${*}" >/dev/stderr; > else > echo -e " ${BAD}*${NORMAL} ${*}"; > fi; > esyslog "daemon.err" "rc-scripts" "${*}"; > return 0 >} >egetent () >{ > if useq macos || useq ppc-macos; then > case "$2" in > *[!0-9]*) > nidump $1 . | awk -F":" "{ if (\$1 ~ /^$2$/) {print \$0;exit;} }" > ;; > *) > nidump $1 . | awk -F":" "{ if (\$3 == $2) {print \$0;exit;} }" > ;; > esac; > else > if useq x86-fbsd; then > local action; > if [ "$1" == "passwd" ]; then > action="user"; > else > action="group"; > fi; > pw show "${action}" "$2" -q; > else > which nscd 1>&/dev/null && nscd -i "$1"; > getent "$1" "$2"; > fi; > fi >} >einfo () >{ > if [ "${RC_QUIET_STDOUT}" != "yes" ]; then > echo -e " ${GOOD}*${NORMAL} ${*}"; > fi; > return 0 >} >einfon () >{ > if [ "${RC_QUIET_STDOUT}" != "yes" ]; then > echo -ne " ${GOOD}*${NORMAL} ${*}"; > fi; > return 0 >} >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 || diefunc "$FUNCNAME" "$LINENO" "$?" "einstall failed"; > else > diefunc "$FUNCNAME" "$LINENO" "$?" "no Makefile found"; > fi >} >emktemp () >{ > local topdir="$1"; > if [ -z "${topdir}" ]; then > [ -z "${T}" ] && topdir="/tmp" || topdir="${T}"; > fi; > if [ -z "$(type -p mktemp)" ]; then > local tmp=/; > while [ -e "${tmp}" ]; do > tmp="${topdir}/tmp.${RANDOM}.${RANDOM}.${RANDOM}"; > done; > touch "${tmp}"; > echo "${tmp}"; > else > mktemp -p "${topdir}"; > fi >} >enewgroup () >{ > local egroup="$1"; > shift; > if [ -z "${egroup}" ]; then > eerror "No group specified !"; > diefunc "$FUNCNAME" "$LINENO" "$?" "Cannot call enewgroup without a group"; > fi; > if [ "${egroup}" == "`egetent group \"${egroup}\" | cut -d: -f1`" ]; then > return 0; > fi; > einfo "Adding group '${egroup}' to your system ..."; > local opts=; > local egid="$1"; > shift; > if [ ! -z "${egid}" ]; then > if [ "${egid}" -gt 0 ]; then > if [ -z "`egetent group ${egid}`" ]; then > if useq macos || useq ppc-macos; then > opts="${opts} ${egid}"; > else > opts="${opts} -g ${egid}"; > fi; > else > egid="next available; requested gid taken"; > fi; > else > eerror "Groupid given but is not greater than 0 !"; > diefunc "$FUNCNAME" "$LINENO" "$?" "${egid} is not a valid GID"; > fi; > else > egid="next available"; > fi; > einfo " - Groupid: ${egid}"; > local eextra="$@"; > opts="${opts} ${eextra}"; > local oldsandbox="${SANDBOX_ON}"; > export SANDBOX_ON="0"; > if useq macos || useq ppc-macos; then > if [ ! -z "${eextra}" ]; then > einfo "Extra options are not supported on macos yet"; > einfo "Please report the ebuild along with the info below"; > einfo "eextra: ${eextra}"; > diefunc "$FUNCNAME" "$LINENO" "$?" "Required function missing"; > fi; > case ${egid} in > *[!0-9]*) > for egid in `jot 898 101`; > do > [ -z "`egetent group ${egid}`" ] && break; > done > ;; > esac; > dscl . create /groups/${egroup} gid ${egid}; > dscl . create /groups/${egroup} passwd '*'; > else > if use x86-fbsd; then > case ${egid} in > *[!0-9]*) > for egid in `jot 898 101`; > do > [ -z "`egetent group ${egid}`" ] && break; > done > ;; > esac; > pw groupadd ${egroup} -g ${egid} || diefunc "$FUNCNAME" "$LINENO" "$?" "enewgroup failed"; > else > groupadd ${opts} ${egroup} || diefunc "$FUNCNAME" "$LINENO" "$?" "enewgroup failed"; > fi; > fi; > export SANDBOX_ON="${oldsandbox}" >} >enewuser () >{ > local euser="$1"; > shift; > if [ -z "${euser}" ]; then > eerror "No username specified !"; > diefunc "$FUNCNAME" "$LINENO" "$?" "Cannot call enewuser without a username"; > fi; > if [ "${euser}" == "`egetent passwd \"${euser}\" | cut -d: -f1`" ]; then > return 0; > fi; > einfo "Adding user '${euser}' to your system ..."; > local opts=; > local euid="$1"; > shift; > if [ ! -z "${euid}" ] && [ "${euid}" != "-1" ]; then > if [ "${euid}" -gt 0 ]; then > if [ ! -z "`egetent passwd ${euid}`" ]; then > euid="next"; > fi; > else > eerror "Userid given but is not greater than 0 !"; > diefunc "$FUNCNAME" "$LINENO" "$?" "${euid} is not a valid UID"; > fi; > else > euid="next"; > fi; > if [ "${euid}" == "next" ]; then > local pwrange; > if [ "${USERLAND}" == "BSD" ]; then > pwrange="`jot 898 101`"; > else > pwrange="`seq 101 999`"; > fi; > for euid in ${pwrange}; > do > [ -z "`egetent passwd ${euid}`" ] && break; > done; > fi; > opts="${opts} -u ${euid}"; > einfo " - Userid: ${euid}"; > local eshell="$1"; > shift; > if [ ! -z "${eshell}" ] && [ "${eshell}" != "-1" ]; then > if [ ! -e "${eshell}" ]; then > eerror "A shell was specified but it does not exist !"; > diefunc "$FUNCNAME" "$LINENO" "$?" "${eshell} does not exist"; > fi; > else > if [ "${USERLAND}" == "BSD" ]; then > eshell="/usr/bin/false"; > else > eshell="/bin/false"; > fi; > fi; > einfo " - Shell: ${eshell}"; > opts="${opts} -s ${eshell}"; > local ehome="$1"; > shift; > if [ -z "${ehome}" ] && [ "${eshell}" != "-1" ]; then > ehome="/dev/null"; > fi; > einfo " - Home: ${ehome}"; > opts="${opts} -d ${ehome}"; > local egroups="$1"; > shift; > if [ ! -z "${egroups}" ]; then > local oldifs="${IFS}"; > local defgroup="" exgroups=""; > export IFS=","; > for g in ${egroups}; > do > export IFS="${oldifs}"; > if [ -z "`egetent group \"${g}\"`" ]; then > eerror "You must add group ${g} to the system first"; > diefunc "$FUNCNAME" "$LINENO" "$?" "${g} is not a valid GID"; > fi; > if [ -z "${defgroup}" ]; then > defgroup="${g}"; > else > exgroups="${exgroups},${g}"; > fi; > export IFS=","; > done; > export IFS="${oldifs}"; > opts="${opts} -g ${defgroup}"; > if [ ! -z "${exgroups}" ]; then > opts="${opts} -G ${exgroups:1}"; > fi; > else > egroups="(none)"; > fi; > einfo " - Groups: ${egroups}"; > local eextra="$@"; > local oldsandbox="${SANDBOX_ON}"; > export SANDBOX_ON="0"; > if useq macos || useq ppc-macos; then > if [ -z "${eextra}" ]; then > dscl . create /users/${euser} uid ${euid}; > dscl . create /users/${euser} shell ${eshell}; > dscl . create /users/${euser} home ${ehome}; > dscl . create /users/${euser} realname "added by portage for ${PN}"; > local oldifs="${IFS}"; > export IFS=","; > for g in ${egroups}; > do > dscl . merge /groups/${g} users ${euser}; > done; > export IFS="${oldifs}"; > else > einfo "Extra options are not supported on macos yet"; > einfo "Please report the ebuild along with the info below"; > einfo "eextra: ${eextra}"; > diefunc "$FUNCNAME" "$LINENO" "$?" "Required function missing"; > fi; > else > if use x86-fbsd; then > if [ -z "${eextra}" ]; then > pw useradd ${euser} ${opts} -c "added by portage for ${PN}" die "enewuser failed"; > else > einfo " - Extra: ${eextra}"; > pw useradd ${euser} ${opts} -c ${eextra} || diefunc "$FUNCNAME" "$LINENO" "$?" "enewuser failed"; > fi; > else > if [ -z "${eextra}" ]; then > useradd ${opts} ${euser} -c "added by portage for ${PN}" || diefunc "$FUNCNAME" "$LINENO" "$?" "enewuser failed"; > else > einfo " - Extra: ${eextra}"; > useradd ${opts} ${euser} ${eextra} || diefunc "$FUNCNAME" "$LINENO" "$?" "enewuser failed"; > fi; > fi; > fi; > export SANDBOX_ON="${oldsandbox}"; > if [ ! -e "${ehome}" ] && [ ! -e "${D}/${ehome}" ]; then > einfo " - Creating ${ehome} in ${D}"; > dodir ${ehome}; > fowners ${euser} ${ehome}; > fperms 755 ${ehome}; > fi >} >epatch () >{ > local PIPE_CMD=""; > local STDERR_TARGET="${T}/$$.out"; > local PATCH_TARGET="${T}/$$.patch"; > local PATCH_SUFFIX=""; > local SINGLE_PATCH="no"; > local x=""; > if [ "$#" -gt 1 ]; then > local m=""; > einfo "${#} patches to apply..."; > for m in "$@"; > do > epatch "${m}"; > done; > return 0; > fi; > if [ -n "$1" -a -f "$1" ]; then > SINGLE_PATCH="yes"; > local EPATCH_SOURCE="$1"; > local EPATCH_SUFFIX="${1##*\.}"; > else > if [ -n "$1" -a -d "$1" ]; then > if [ "${EPATCH_FORCE}" = "yes" ] && [ -z "${EPATCH_SUFFIX}" ]; then > local EPATCH_SOURCE="$1/*"; > else > local EPATCH_SOURCE="$1/*.${EPATCH_SUFFIX}"; > fi; > else > if [ ! -d ${EPATCH_SOURCE} ]; then > if [ -n "$1" -a "${EPATCH_SOURCE}" = "${WORKDIR}/patch" ]; then > EPATCH_SOURCE="$1"; > fi; > echo; > eerror "Cannot find \$EPATCH_SOURCE! Value for \$EPATCH_SOURCE is:"; > eerror; > eerror " ${EPATCH_SOURCE}"; > echo; > diefunc "$FUNCNAME" "$LINENO" "$?" "Cannot find \$EPATCH_SOURCE!"; > fi; > local EPATCH_SOURCE="${EPATCH_SOURCE}/*.${EPATCH_SUFFIX}"; > fi; > fi; > case ${EPATCH_SUFFIX##*\.} in > bz2) > PIPE_CMD="bzip2 -dc"; > PATCH_SUFFIX="bz2" > ;; > gz | Z | z) > PIPE_CMD="gzip -dc"; > PATCH_SUFFIX="gz" > ;; > ZIP | zip) > PIPE_CMD="unzip -p"; > PATCH_SUFFIX="zip" > ;; > *) > PIPE_CMD="cat"; > PATCH_SUFFIX="patch" > ;; > esac; > if [ "${SINGLE_PATCH}" = "no" ]; then > einfo "Applying various patches (bugfixes/updates)..."; > fi; > for x in ${EPATCH_SOURCE}; > do > if [ -f ${x} ] && ( [ "${SINGLE_PATCH}" = "yes" -o "${x/_all_}" != "${x}" -o "`eval echo \$\{x/_${ARCH}_\}`" != "${x}" ] || [ "${EPATCH_FORCE}" = "yes" ] ); then > local count=0; > local popts="${EPATCH_OPTS}"; > if [ -n "${EPATCH_EXCLUDE}" ]; then > if [ "`eval echo \$\{EPATCH_EXCLUDE/${x##*/}\}`" != "${EPATCH_EXCLUDE}" ]; then > continue; > fi; > fi; > if [ "${SINGLE_PATCH}" = "yes" ]; then > if [ -n "${EPATCH_SINGLE_MSG}" ]; then > einfo "${EPATCH_SINGLE_MSG}"; > else > einfo "Applying ${x##*/}..."; > fi; > else > einfo " ${x##*/}..."; > fi; > echo "***** ${x##*/} *****" >${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}; > echo >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}; > while [ "${count}" -lt 5 ]; do > draw_line "***** ${x##*/} *****" >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}; > echo >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}; > if [ "${PATCH_SUFFIX}" != "patch" ]; then > echo -n "PIPE_COMMAND: " >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}; > echo "${PIPE_CMD} ${x} > ${PATCH_TARGET}" >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}; > else > PATCH_TARGET="${x}"; > fi; > echo -n "PATCH COMMAND: " >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}; > echo "patch -p${count} ${popts} < ${PATCH_TARGET}" >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}; > echo >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}; > draw_line "***** ${x##*/} *****" >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}; > if [ "${PATCH_SUFFIX}" != "patch" ]; then > if ! ( ${PIPE_CMD} ${x} >${PATCH_TARGET} ) >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/} 2>&1; then > echo; > eerror "Could not extract patch!"; > count=5; > break; > fi; > fi; > if ( cat ${PATCH_TARGET} | patch -p${count} ${popts} --dry-run -f ) >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/} 2>&1; then > draw_line "***** ${x##*/} *****" >${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real; > echo >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real; > echo "ACTUALLY APPLYING ${x##*/}..." >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real; > echo >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real; > draw_line "***** ${x##*/} *****" >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real; > cat ${PATCH_TARGET} | patch -p${count} ${popts} >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real 2>&1; > if [ "$?" -ne 0 ]; then > cat ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real >>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}; > echo; > eerror "A dry-run of patch command succeeded, but actually"; > eerror "applying the patch failed!"; > count=5; > fi; > rm -f ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real; > break; > fi; > count=$((count + 1)); > done; > if [ "${PATCH_SUFFIX}" != "patch" ]; then > rm -f ${PATCH_TARGET}; > fi; > if [ "${count}" -eq 5 ]; then > echo; > eerror "Failed Patch: ${x##*/}!"; > eerror; > eerror "Include in your bugreport the contents of:"; > eerror; > eerror " ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}"; > echo; > diefunc "$FUNCNAME" "$LINENO" "$?" "Failed Patch: ${x##*/}!"; > fi; > rm -f ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}; > eend 0; > fi; > done; > if [ "${SINGLE_PATCH}" = "no" ]; then > einfo "Done with patching"; > fi >} >epause () >{ > if [ -z "$EPAUSE_IGNORE" ] && [ -t 1 ]; then > sleep ${1:-5}; > fi >} >esyslog () >{ > return 0 >} >etc_files_install () >{ > insinto /etc/X11; > newins ${S}/programs/Xserver/hw/xfree86/xorg.conf xorg.conf.example; > exeinto /etc/X11; > doexe ${FILES_DIR}/chooser.sh; > doexe ${FILES_DIR}/startDM.sh; > exeinto /etc/X11/Sessions; > for x in ${FILES_DIR}/Sessions/*; > do > [ -f ${x} ] && doexe ${x}; > done; > insinto /etc/env.d; > doins ${FILES_DIR}/10xorg; > insinto /etc/X11/xinit; > doins ${FILES_DIR}/xinitrc; > exeinto /etc/X11/xdm; > doexe ${FILES_DIR}/Xsession ${FILES_DIR}/Xsetup_0; > insinto /etc/X11/fs; > newins ${FILES_DIR}/xfs.config config; > if use pam; then > insinto /etc/pam.d; > newins ${FILES_DIR}/xdm.pamd xdm; > newins ${FILES_DIR}/xserver.pamd xserver; > fi; > exeinto /etc/init.d; > newexe ${FILES_DIR}/xdm.start xdm; > newexe ${FILES_DIR}/xfs.start xfs; > insinto /etc/conf.d; > newins ${FILES_DIR}/xfs.conf.d xfs >} >etexec-flags () >{ > has_hardened || return 0; > use amd64 && return 0; > if has_pie || has_pic; then > [ -z "`is-flag -fno-pic`" ] && export CFLAGS="${CFLAGS} `test_flag -fno-pic`"; > [ -z "`is-flag -nopie`" ] && export CFLAGS="${CFLAGS} `test_flag -nopie`"; > fi; > return 0 >} >ewarn () >{ > if [ "${RC_QUIET_STDOUT}" = "yes" ]; then > echo " ${*}"; > else > echo -e " ${WARN}*${NORMAL} ${*}"; > fi; > esyslog "daemon.warning" "rc-scripts" "${*}"; > return 0 >} >ewend () >{ > local retval=; > if [ "$#" -eq 0 ] || ( [ -n "$1" ] && [ "$1" -eq 0 ] ); then > if [ "${RC_QUIET_STDOUT}" != "yes" ]; then > echo -e "${ENDCOL} ${BRACKET}[ ${GOOD}ok${BRACKET} ]${NORMAL}"; > fi; > else > retval="$1"; > if [ "$#" -ge 2 ]; then > shift; > ewarn "${*}"; > fi; > if [ "${RC_QUIET_STDOUT}" != "yes" ]; then > echo -e "${ENDCOL} ${BRACKET}[ ${WARN}!!${BRACKET} ]${NORMAL}"; > echo; > fi; > return "${retval}"; > fi; > return 0 >} >exeinto () >{ > if [ "$1" == "/" ]; then > export EXEDESTTREE=""; > else > export EXEDESTTREE="$1"; > if [ ! -d "${D}${EXEDESTTREE}" ]; then > install -d "${D}${EXEDESTTREE}"; > fi; > fi >} >exeopts () >{ > EXEOPTIONS=""; > for x in $*; > do > if has nostrip $FEATURES $RESTRICT && [ "$x" == "-s" ]; then > continue; > else > EXEOPTIONS="$EXEOPTIONS $x"; > fi; > done; > export EXEOPTIONS >} >filter-flags () >{ > local x f fset; > declare -a new_CFLAGS new_CXXFLAGS; > for x in "$@"; > do > case "${x}" in > -fPIC | -fpic | -fPIE | -fpie | -pie) > etexec-flags > ;; > -fstack-protector | -fstack-protector-all) > fstack-flags > ;; > esac; > done; > for fset in CFLAGS CXXFLAGS; > do > for f in ${!fset}; > do > for x in "$@"; > do > [[ ${f} == ${x} ]] && continue 2; > done; > eval new_${fset}\[\${\#new_${fset}\[@]}]=\${f}; > done; > eval export ${fset}=\${new_${fset}\[*]}; > done; > return 0 >} >filter-ldflags () >{ > local x; > LDFLAGS=" ${LDFLAGS} "; > for x in "$@"; > do > LDFLAGS="${LDFLAGS// ${x} / }"; > done; > LDFLAGS="${LDFLAGS:1:${#LDFLAGS}-2}"; > export LDFLAGS; > return 0 >} >filter-lfs-flags () >{ > filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE >} >filter-mfpmath () >{ > local orig_mfpmath new_math prune_math; > orig_mfpmath="`get-flag -mfpmath`"; > new_math=" `get-flag mfpmath | tr , ' '` "; > prune_math=""; > for prune_math in "$@"; > do > new_math="${new_math/ ${prune_math} / }"; > done; > new_math="`echo ${new_math:1:${#new_math}-2} | tr ' ' ,`"; > if [ -z "${new_math}" ]; then > filter-flags ${orig_mfpmath}; > else > replace-flags ${orig_mfpmath} -mfpmath=${new_math}; > fi; > return 0 >} >filter-patch () >{ > mv ${PATCH_DIR}/"*${1}*" ${PATCH_DIR}/excluded >} >find_unpackable_file () >{ > local src="$1"; > if [ -z "${src}" ]; then > src="${DISTDIR}/${A}"; > else > if [ -e "${DISTDIR}/${src}" ]; then > src="${DISTDIR}/${src}"; > else > if [ -e "${PWD}/${src}" ]; then > src="${PWD}/${src}"; > else > if [ -e "${src}" ]; then > src="${src}"; > fi; > fi; > fi; > fi; > [ ! -e "${src}" ] && diefunc "$FUNCNAME" "$LINENO" "$?" "Could not find requested archive ${src}"; > echo "${src}" >} >font_setup () >{ > rm -f ${ROOT}/usr/share/fonts/encodings/iso8859-6.8x.enc.gz; > rm -f ${ROOT}/usr/share/fonts/encodings/iso8859-6.16.enc.gz; > ebegin "Generating encodings.dir..."; > LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ROOT}/usr/X11R6/$(get_libdir)" ${ROOT}/usr/X11R6/bin/mkfontdir -n -e ${ROOT}/usr/share/fonts/encodings -e ${ROOT}/usr/share/fonts/encodings/large -- ${ROOT}/usr/share/fonts/encodings; > eend 0; > if [ -x ${ROOT}/usr/X11R6/bin/ttmkfdir ]; then > ebegin "Creating fonts.scale files..."; > for x in $(find ${ROOT}/usr/share/fonts/* -type d -maxdepth 1); > do > [ -z "$(ls ${x}/)" ] && continue; > [ "$(ls ${x}/)" = "fonts.cache-1" ] && continue; > if [ "${x/encodings}" = "${x}" -a -n "$(find ${x} -iname '*.tt[cf]' -print)" ]; then > LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ROOT}/usr/X11R6/$(get_libdir)" ${ROOT}/usr/X11R6/bin/ttmkfdir -x 2 -e ${ROOT}/usr/share/fonts/encodings/encodings.dir -o ${x}/fonts.scale -d ${x}; > else > if [ "${x/encodings}" = "${x}" -a -n "$(find ${x} -iname '*.[po][ft][abcf]' -print)" ]; then > LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ROOT}/usr/X11R6/$(get_libdir)" ${ROOT}/usr/X11R6/bin/mkfontscale -a ${ROOT}/usr/share/fonts/encodings/encodings.dir -- ${x}; > fi; > fi; > done; > eend 0; > fi; > ebegin "Generating fonts.dir files..."; > for x in $(find ${ROOT}/usr/share/fonts/* -type d -maxdepth 1); > do > [ -z "$(ls ${x}/)" ] && continue; > [ "$(ls ${x}/)" = "fonts.cache-1" ] && continue; > if [ "${x/encodings}" = "${x}" ]; then > LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ROOT}/usr/X11R6/$(get_libdir)" ${ROOT}/usr/X11R6/bin/mkfontdir -e ${ROOT}/usr/share/fonts/encodings -e ${ROOT}/usr/share/fonts/encodings/large -- ${x}; > fi; > done; > eend 0; > ebegin "Generating Xft cache..."; > for x in $(find ${ROOT}/usr/share/fonts/* -type d -maxdepth 1); > do > [ -z "$(ls ${x}/)" ] && continue; > [ "$(ls ${x}/)" = "fonts.cache-1" ] && continue; > if [ "${x/encodings}" = "${x}" -a -n "$(find ${x} -iname '*.[otps][pft][cfad]' -print)" ]; then > LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${ROOT}/usr/X11R6/$(get_libdir)" ${ROOT}/usr/X11R6/bin/xftcache ${x} >&/dev/null; > fi; > done; > eend 0; > ebegin "Fixing permissions..."; > find ${ROOT}/usr/share/fonts/ -type f -name 'font.*' -exec chmod 0644 {} \;; > eend 0; > if [ -x ${ROOT}/usr/bin/fc-cache ]; then > ebegin "Creating FC font cache..."; > HOME="/root" ${ROOT}/usr/bin/fc-cache; > eend 0; > fi >} >fstack-flags () >{ > if has_ssp; then > [ -z "`is-flag -fno-stack-protector`" ] && export CFLAGS="${CFLAGS} `test_flag -fno-stack-protector`"; > fi; > return 0 >} >gcc-fullversion () >{ > echo "$($(gcc-getCC) -dumpversion)" >} >gcc-getCC () >{ > if [ "${WANT_GCC_3}" = "yes" -o -z "${CC}" ]; then > local CC="gcc"; > if [ "$(${CC} -dumpversion | cut -f1 -d.)" -ne 3 ] && [ "${WANT_GCC_3}" = "yes" ]; then > if [ -x /usr/bin/gcc-3.2 ]; then > CC="gcc-3.2"; > else > if [ -x /usr/bin/gcc-3.1 ]; then > CC="gcc-3.1"; > else > if [ -x /usr/bin/gcc-3.0 ]; then > CC="gcc-3.0"; > fi; > fi; > fi; > fi; > fi; > echo "${CC}" >} >gcc-getCXX () >{ > if [ "${WANT_GCC_3}" = "yes" -o -z "${CXX}" ]; then > local CC="$(gcc-getCC)"; > if [ "$(${CC} -dumpversion | cut -f1 -d.)" -ge 3 ]; then > echo "${CC/gcc/g++}"; > else > echo "${CC}"; > fi; > else > echo "${CXX}"; > fi >} >gcc-libpath () >{ > echo "/usr/$(get_libdir)/gcc-lib/$($(gcc-getCC) -dumpmachine)/$(gcc-fullversion)" >} >gcc-libstdcxx-major-version () >{ > echo "$(echo $(gcc-libstdcxx-version) | cut -f1 -d.)" >} >gcc-libstdcxx-version () >{ > if [ "$(gcc-major-version)" -ge 3 ]; then > local libstdcxx="$(ls $(gcc-libpath)/libstdc++.so.?.?.?)"; > libstdcxx="${libstdcxx##*/}"; > echo "${libstdcxx/libstdc++.so.}"; > else > echo; > fi >} >gcc-major-version () >{ > echo "$(gcc-version | cut -f1 -d.)" >} >gcc-micro-version () >{ > echo "$(gcc-fullversion | cut -f3 -d.)" >} >gcc-minor-version () >{ > echo "$(gcc-version | cut -f2 -d.)" >} >gcc-version () >{ > echo "$(gcc-fullversion | cut -f1,2 -d.)" >} >gcc2-flags () >{ > CFLAGS=${CFLAGS//pentium-mmx/i586}; > CFLAGS=${CFLAGS//pentium[234]/i686}; > CFLAGS=${CFLAGS//k6-[23]/k6}; > CFLAGS=${CFLAGS//athlon-tbird/i686}; > CFLAGS=${CFLAGS//athlon-4/i686}; > CFLAGS=${CFLAGS//athlon-[xm]p/i686}; > CFLAGS=${CFLAGS//athlon/i686}; > CXXFLAGS=${CXXFLAGS//pentium-mmx/i586}; > CXXFLAGS=${CXXFLAGS//pentium[234]/i686}; > CXXFLAGS=${CXXFLAGS//k6-[23]/k6}; > CXXFLAGS=${CXXFLAGS//athlon-tbird/i686}; > CXXFLAGS=${CXXFLAGS//athlon-4/i686}; > CXXFLAGS=${CXXFLAGS//athlon-[xm]p/i686}; > CXXFLAGS=${CXXFLAGS//athlon/i686}; > if [ "$ARCH" = alpha ]; then > CHOST=${CHOST/#alphaev6[78]/alphaev6}; > CFLAGS=${CFLAGS//ev6[78]/ev6}; > CXXFLAGS=${CXXFLAGS//ev6[78]/ev6}; > fi; > export CFLAGS CXXFLAGS >} >gen_usr_ldscript () >{ > local libdir="$(get_libdir)"; > dodir /usr/${libdir}; > cat >"${D}/usr/${libdir}/${1}" <<END_LDSCRIPT >/* GNU ld script > Because Gentoo have critical dynamic libraries > in /lib, and the static versions in /usr/lib, we > need to have a "fake" dynamic lib in /usr/lib, > otherwise we run into linking problems. > See bug #4411 on http://bugs.gentoo.org/ for > more info. */ >GROUP ( /${libdir}/${1} ) >END_LDSCRIPT > > fperms a+x "/usr/${libdir}/${1}" >} >gen_wrapper () >{ > cat >$1 <<END >#!/bin/sh > >$2 "\$@" >END > > chmod 0755 $1 >} >get-flag () >{ > local f findflag="$1"; > for f in ${CFLAGS} ${CXXFLAGS}; > do > if [ "${f/${findflag}}" != "${f}" ]; then > printf "%s\n" "${f/-${findflag}=}"; > return 0; > fi; > done; > return 1 >} >get_KV () >{ > local KV="$(uname -r)"; > echo "$(KV_to_int "${KV}")"; > return $? >} >get_KV_info () >{ > check_version_h; > export KV_full="$(awk '/UTS_RELEASE/ { gsub("\"", "", $3); print $3 }' "${ROOT}/usr/src/linux/include/linux/version.h")"; > export KV_major="$(echo "${KV_full}" | cut -d. -f1)"; > export KV_minor="$(echo "${KV_full}" | cut -d. -f2)"; > export KV_micro="$(echo "${KV_full}" | cut -d. -f3 | sed -e 's:[^0-9].*::')" >} >get_bootconfig () >{ > local copt=; > local newbootlevel=; > local newsoftlevel=; > for copt in $(< /proc/cmdline); > do > case "${copt%=*}" in > "bootlevel") > newbootlevel="${copt##*=}" > ;; > "softlevel") > newsoftlevel="${copt##*=}" > ;; > esac; > done; > if [ -n "${newbootlevel}" ]; then > export BOOTLEVEL="${newbootlevel}"; > else > export BOOTLEVEL="boot"; > fi; > if [ -n "${newsoftlevel}" ]; then > export DEFAULTLEVEL="${newsoftlevel}"; > else > export DEFAULTLEVEL="default"; > fi; > return 0 >} >get_bootparam () >{ > local x copt params retval=1; > [ ! -e "/proc/cmdline" ] && return 1; > for copt in $(< /proc/cmdline); > do > if [ "${copt%=*}" = "gentoo" ]; then > params="$(gawk -v PARAMS="${copt##*=}" ' > BEGIN { > split(PARAMS, nodes, ",") > for (x in nodes) > print nodes[x] > }')"; > for x in ${params}; > do > if [ "${x}" = "$1" ]; then > retval=0; > fi; > done; > fi; > done; > return ${retval} >} >get_libdir () >{ > LIBDIR_TEST=$(type econf); > if [ ! -z "${CONF_LIBDIR_OVERRIDE}" ]; then > CONF_LIBDIR="${CONF_LIBDIR_OVERRIDE}"; > else > if [ "${LIBDIR_TEST/CONF_LIBDIR}" == "${LIBDIR_TEST}" ]; then > CONF_LIBDIR="lib"; > fi; > fi; > echo ${CONF_LIBDIR:=lib}; > unset LIBDIR_TEST >} >get_libdir_override () >{ > CONF_LIBDIR="$1"; > CONF_LIBDIR_OVERRIDE="$1" >} >get_multilibdir () >{ > echo ${CONF_MULTILIBDIR:=lib32} >} >get_number_of_jobs () >{ > local jobs=0; > if [ ! -r /proc/cpuinfo ]; then > return 1; > fi; > if [ "`egrep "^[[:space:]]*MAKEOPTS=" /etc/make.conf | wc -l`" -gt 0 ]; then > ADMINOPTS="`egrep "^[[:space:]]*MAKEOPTS=" /etc/make.conf | cut -d= -f2 | sed 's/\"//g'`"; > ADMINPARAM="`echo ${ADMINOPTS} | gawk '{match($0, /-j *[0-9]*/, opt); print opt[0]}'`"; > ADMINPARAM="${ADMINPARAM/-j}"; > fi; > export MAKEOPTS="`echo ${MAKEOPTS} | sed -e 's:-j *[0-9]*::g'`"; > if [ "${ARCH}" = "amd64" -o "${ARCH}" = "x86" -o "${ARCH}" = "hppa" -o "${ARCH}" = "arm" -o "${ARCH}" = "mips" -o "${ARCH}" = "ia64" ]; then > jobs="$((`grep -c ^[Pp]rocessor /proc/cpuinfo` * 2))"; > else > if [ "${ARCH}" = "sparc" -o "${ARCH}" = "sparc64" ]; then > jobs="$((`grep "^ncpus active" /proc/cpuinfo | sed -e "s/^.*: //"` * 2))"; > else > if [ "${ARCH}" = "alpha" ]; then > if [ "`grep -c "^cpus active" /proc/cpuinfo`" -eq 1 ]; then > jobs="$((`grep "^cpus active" /proc/cpuinfo | sed -e "s/^.*: //"` * 2))"; > else > jobs=2; > fi; > else > if [ "${ARCH}" = "ppc" -o "${ARCH}" = "ppc64" ]; then > if [ "`grep -c "^processor" /proc/cpuinfo`" -eq 1 ]; then > jobs="$((`grep -c ^processor /proc/cpuinfo` * 2))"; > else > jobs=2; > fi; > else > if [ "${ARCH}" = "s390" ]; then > jobs="$((`grep "^\# processors" /proc/cpuinfo | sed -e "s/^.*: //"` * 2))"; > else > jobs="$((`grep -c ^cpu /proc/cpuinfo` * 2))"; > diefunc "$FUNCNAME" "$LINENO" "$?" "Unknown ARCH -- ${ARCH}!"; > fi; > fi; > fi; > fi; > fi; > if [ "${jobs}" -lt 1 ]; then > jobs=1; > fi; > if [ -n "${ADMINPARAM}" ]; then > if [ "${jobs}" -gt "${ADMINPARAM}" ]; then > einfo "Setting make jobs to \"-j${ADMINPARAM}\" to ensure successful merge..."; > export MAKEOPTS="${MAKEOPTS} -j${ADMINPARAM}"; > else > einfo "Setting make jobs to \"-j${jobs}\" to ensure successful merge..."; > export MAKEOPTS="${MAKEOPTS} -j${jobs}"; > fi; > fi >} >get_options () >{ > if [ -f "${svcdir}/options/${myservice}/$1" ]; then > echo "$(< ${svcdir}/options/${myservice}/$1)"; > fi; > return 0 >} >getcols () >{ > echo "$2" >} >has () >{ > if hasq "$@"; then > echo "${1}"; > return 0; > fi; > return 1 >} >has_hardened () >{ > test_version_info Hardened && return 0; > [ -f "${GCC_SPECS}" -a "${GCC_SPECS}" != "${GCC_SPECS/hardened/}" ] && return 0; > return 1 >} >has_m32 () >{ > local temp="$(emktemp)"; > echo "int main() { return(0); }" >${temp}.c; > ${CC/ .*/} -m32 -o "$(emktemp)" ${temp}.c >/dev/null 2>&1; > local ret=$?; > rm -f ${temp}.c; > [ "$ret" != "1" ] && return 0; > return 1 >} >has_m64 () >{ > local temp="$(emktemp)"; > echo "int main() { return(0); }" >${temp}.c; > ${CC/ .*/} -m64 -o "$(emktemp)" ${temp}.c >/dev/null 2>&1; > local ret=$?; > rm -f ${temp}.c; > [ "$ret" != "1" ] && return 0; > return 1 >} >has_pic () >{ > [ "${CFLAGS/-fPIC}" != "${CFLAGS}" ] && return 0; > [ "${CFLAGS/-fpic}" != "${CFLAGS}" ] && return 0; > test_version_info pie && return 0; > return 1 >} >has_pie () >{ > [ "${CFLAGS/-fPIE}" != "${CFLAGS}" ] && return 0; > [ "${CFLAGS/-fpie}" != "${CFLAGS}" ] && return 0; > test_version_info pie && return 0; > return 1 >} >has_ssp () >{ > [ "${CFLAGS/-fstack-protector}" != "${CFLAGS}" ] && return 0; > test_version_info ssp && return 0; > return 1 >} >has_version () >{ > [ "${EBUILD_PHASE}" == "depend" ] && echo "has_version() in global scope: ${CATEGORY}/$PF" 1>&2; > if /usr/lib/portage/bin/portageq 'has_version' "${ROOT}" "$1"; then > return 0; > else > return 1; > fi >} >hasq () >{ > local x; > local me=$1; > shift; > for x in "$@"; > do > if [ "${x}" == "${me}" ]; then > return 0; > fi; > done; > return 1 >} >have_NPTL () >{ > cat >${T}/test-nptl.c <<-'END' >#define _XOPEN_SOURCE >#include <unistd.h> >#include <stdio.h> > >int main() >{ > char buf[255]; > char *str = buf; > > confstr(_CS_GNU_LIBPTHREAD_VERSION, str, 255); > if (NULL != str) { > printf("%s\n", str); > if (NULL != strstr(str, "NPTL")) > return 0; > } > > return 1; >} >END > > einfon "Checking for _CS_GNU_LIBPTHREAD_VERSION support in glibc ... "; > if gcc -o ${T}/nptl ${T}/test-nptl.c >&/dev/null; then > echo "yes"; > einfon "Checking what PTHREADS implementation we have ... "; > if ${T}/nptl; then > return 0; > else > return 1; > fi; > else > echo "no"; > fi; > return 1 >} >host_def_setup () >{ > HOSTCONF=config/cf/host.def; > ebegin "Setting up ${HOSTCONF}"; > cd ${S}; > cp ${FILES_DIR}/site.def ${HOSTCONF} || diefunc "$FUNCNAME" "$LINENO" "$?"; > echo "#define XVendorString \"Gentoo Linux (The X.Org Foundation ${PV}, revision ${PR}-${PATCH_VER})\"" >>${HOSTCONF}; > echo "#define XF86ExtraCardDrivers i810" >>${HOSTCONF}; > echo "#define ManDirectoryRoot /usr/share/man" >>${HOSTCONF}; > echo "#define DocDir /usr/share/doc/${PF}" >>${HOSTCONF}; > echo "#define FontDir /usr/share/fonts" >>${HOSTCONF}; > echo "#define DriverManDir \$(MANSOURCEPATH)4" >>${HOSTCONF}; > echo "#define DriverManSuffix 4x /* use just one tab or cpp will die */" >>${HOSTCONF}; > echo "#define MiscManDir \$(MANSOURCEPATH)7" >>${HOSTCONF}; > echo "#define MiscManSuffix 7x /* use just one tab or cpp will die */" >>${HOSTCONF}; > echo "#define BuildXterm NO" >>${HOSTCONF}; > echo "#define InstallXserverSetUID YES" >>${HOSTCONF}; > echo "#define BuildServersOnly NO" >>${HOSTCONF}; > if [ "$(get_libdir)" == "lib64" ]; then > echo "#define HaveLib64 YES" >>${HOSTCONF}; > else > echo "#define HaveLib64 NO" >>${HOSTCONF}; > fi; > echo "#define InstSrcDir ${ROOT}/usr/src/${PF}" >>${HOSTCONF}; > replace-flags "-Os" "-O2"; > if [ "`gcc-version`" != "2.95" ]; then > if [ "`gcc-major-version`" -eq "3" -a "`gcc-minor-version`" -le "2" ]; then > replace-cpu-flags pentium4 pentium3; > replace-cpu-flags athlon athlon-tbird; > fi; > [ "$(gcc-version)" == "3.4" ] && use x86 && test_flag -mno-sse2 && append-flags -mno-sse2; > if [ "`is-flag -fomit-frame-pointer`" ]; then > replace-cpu-flags k6 k6-2 k6-3 i586; > fi; > if [ "`gcc-version`" = "3.1" ]; then > append-flags "-fno-merge-constants"; > append-flags "-fno-merge-constants"; > fi; > fi; > if ( [ -e "${ROOT}/usr/src/linux" ] && [ ! `is_kernel "2" "2"` ] ) || [ "`uname -r | cut -d. -f1,2`" != "2.2" ]; then > echo "#define HasLinuxInput YES" >>${HOSTCONF}; > fi; > echo "#define CcCmd ${CC}" >>${HOSTCONF}; > echo "#define OptimizedCDebugFlags ${CFLAGS} GccAliasingArgs" >>${HOSTCONF}; > echo "#define OptimizedCplusplusDebugFlags ${CXXFLAGS} GccAliasingArgs" >>${HOSTCONF}; > if use static; then > echo "#define DoLoadableServer NO" >>${HOSTCONF}; > else > if use dlloader; then > einfo "Setting DoLoadableServer/MakeDllModules to YES."; > echo "#define DoLoadableServer YES" >>${HOSTCONF}; > echo "#define MakeDllModules YES" >>${HOSTCONF}; > fi; > fi; > use_build debug XFree86Devel; > use_build debug BuildDebug; > use_build debug DebuggableLibraries; > if use !debug; then > echo "#define ExtraXInputDrivers acecad" >>${HOSTCONF}; > echo "#define GccWarningOptions -Wno-return-type -w" >>${HOSTCONF}; > fi; > if [ "`best_version x11-base/xorg-x11`" ]; then > use_build pam HasPam; > use_build pam HasPamMisc; > fi; > if use x86 || use alpha; then > if use 3dfx; then > echo "#define HasGlide3 YES" >>${HOSTCONF}; > fi; > fi; > if use x86; then > use_build mmx HasMMXSupport; > use_build mmx MesaUseMMX; > use_build 3dnow Has3DNowSupport; > use_build 3dnow MesaUse3DNow; > use_build sse HasKatmaiSupport; > use_build sse MesaUseKatmai; > use_build sse HasSSESupport; > use_build sse MesaUseSSE; > fi; > if use hppa; then > echo "#define DoLoadableServer NO" >>${HOSTCONF}; > echo "#define BuildXF86DRI NO" >>config/cf/host.def; > echo "#undef DriDrivers" >>config/cf/host.def; > echo "#define XF86CardDrivers fbdev" >>config/cf/host.def; > fi; > if use alpha; then > echo "#define XF86CardDrivers mga nv tga s3virge sis rendition i740 tdfx cirrus tseng fbdev ati vga v4l glint" >>${HOSTCONF}; > fi; > if use ppc; then > echo "#define XF86CardDrivers mga glint s3virge sis savage trident chips tdfx fbdev ati DevelDrivers vga nv imstt XF86OSCardDrivers XF86ExtraCardDrivers" >>${HOSTCONF}; > fi; > if use ppc64; then > echo "#define MakeDllModules YES" >>${HOSTCONF}; > echo "#define XF86VgaHw YES" >>${HOSTCONF}; > echo "#define XF86FBDevHw YES" >>${HOSTCONF}; > echo "#define XF86CardDrivers fbdev v4l ati vga nv" >>${HOSTCONF}; > fi; > if use sparc; then > echo "#define XF86CardDrivers sunffb sunleo suncg6 suncg3 suncg14 suntcx sunbw2 glint mga tdfx ati savage vesa vga fbdev XF86OSCardDrivers XF86ExtraCardDrivers DevelDrivers" >>${HOSTCONF}; > if use hardened; then > einfo "Softening the assembler so cfb modules will play nice with sunffb"; > echo "#define AsCmd CcCmd -c -x assembler -fno-pie -fno-PIE" >>${HOSTCONF}; > echo "#define ModuleAsCmd CcCmd -c -x assembler -fno-pie -fno-PIE" >>${HOSTCONF}; > fi; > if ( [ -e "${ROOT}/usr/src/linux" ] && ! ( `is_kernel "2" "6"` ) ) || [ "`uname -r | cut -d. -f1,2`" != "2.6" ]; then > einfo "Building for kernels less than 2.6 requires special treatment"; > echo "#define UseDeprecatedKeyboardDriver YES" >>${HOSTCONF}; > einfo "Avoid bug #46593 for sparc32-SMP with kernel 2.4.xx"; > echo "/* Add a line to avoid bug #56593 on sparc32 */" >>programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c; > fi; > fi; > echo "#define UseFontconfig YES" >>${HOSTCONF}; > echo "#define HasFontconfig YES" >>${HOSTCONF}; > echo "#define SharedLibXft YES" >>${HOSTCONF}; > use_build doc BuildLinuxDocText; > use_build doc BuildLinuxDocPS; > use_build doc BuildSpecsDocs; > use_build doc BuildHtmlManPages; > use_build doc InstallHardcopyDocs; > use doc && use_build cjk InstallJapaneseDocs; > use_build nls BuildCyrillicFonts; > use_build nls BuildArabicFonts; > use_build nls BuildGreekFonts; > use_build nls BuildHebrewFonts; > use_build nls BuildThaiFonts; > if use nls; then > use_build cjk BuildCIDFonts; > use_build cjk BuildJapaneseFonts; > use_build cjk BuildKoreanFonts; > use_build cjk BuildChineseFonts; > fi; > use_build bitmap-fonts Build75DpiFonts; > use_build bitmap-fonts Build100DpiFonts; > use_build dmx BuildDmx; > use_build insecure-drivers BuildDevelDRIDrivers; > if use ipv6; then > echo "#define PreferXdmcpIPv6 YES" >>${HOSTCONF}; > fi; > use_build ipv6 BuildIPv6; > echo "#define ProPoliceSupport YES" >>${HOSTCONF}; > use_build xprint BuildXprint; > if ! use xprint; then > echo "#define BuildXprintLib YES" >>${HOSTCONF}; > fi; > eend 0 >} >inherit () >{ > ECLASS_DEPTH=$(($ECLASS_DEPTH + 1)); > if [[ $ECLASS_DEPTH > 1 ]]; then > debug-print "*** Multiple Inheritence (Level: ${ECLASS_DEPTH})"; > fi; > local location; > local PECLASS; > local B_IUSE; > local B_DEPEND; > local B_RDEPEND; > local B_CDEPEND; > local B_PDEPEND; > while [ "$1" ]; do > location="${ECLASSDIR}/${1}.eclass"; > PECLASS="$ECLASS"; > export ECLASS="$1"; > if [ -n "$PORTDIR_OVERLAY" ]; then > local overlay; > for overlay in ${PORTDIR_OVERLAY}; > do > olocation="${overlay}/eclass/${1}.eclass"; > if [ -e "$olocation" ]; then > location="${olocation}"; > debug-print " eclass exists: ${location}"; > break; > fi; > done; > fi; > debug-print "inherit: $1 -> $location"; > set -f; > unset B_DEPEND B_RDEPEND B_CDEPEND B_PDEPEND B_IUSE; > [ "${DEPEND-unset}" != "unset" ] && B_DEPEND="${DEPEND}"; > [ "${RDEPEND-unset}" != "unset" ] && B_RDEPEND="${RDEPEND}"; > [ "${CDEPEND-unset}" != "unset" ] && B_CDEPEND="${CDEPEND}"; > [ "${PDEPEND-unset}" != "unset" ] && B_PDEPEND="${PDEPEND}"; > [ "${IUSE-unset}" != "unset" ] && B_IUSE="${IUSE}"; > unset DEPEND RDEPEND CDEPEND PDEPEND IUSE; > set +f; > source "$location" || export ERRORMSG="died sourcing $location in inherit()"; > [ -z "${ERRORMSG}" ] || diefunc "$FUNCNAME" "$LINENO" "$?" "${ERRORMSG}"; > set -f; > [ "${DEPEND-unset}" != "unset" ] && export E_DEPEND="${E_DEPEND} ${DEPEND}"; > [ "${RDEPEND-unset}" != "unset" ] && export E_RDEPEND="${E_RDEPEND} ${RDEPEND}"; > [ "${CDEPEND-unset}" != "unset" ] && export E_CDEPEND="${E_CDEPEND} ${CDEPEND}"; > [ "${PDEPEND-unset}" != "unset" ] && export E_PDEPEND="${E_PDEPEND} ${PDEPEND}"; > [ "${IUSE-unset}" != "unset" ] && export E_IUSE="${E_IUSE} ${IUSE}"; > [ "${B_DEPEND-unset}" != "unset" ] && DEPEND="${B_DEPEND}"; > [ "${B_DEPEND-unset}" != "unset" ] || unset DEPEND; > [ "${B_RDEPEND-unset}" != "unset" ] && RDEPEND="${B_RDEPEND}"; > [ "${B_RDEPEND-unset}" != "unset" ] || unset RDEPEND; > [ "${B_CDEPEND-unset}" != "unset" ] && CDEPEND="${B_CDEPEND}"; > [ "${B_CDEPEND-unset}" != "unset" ] || unset CDEPEND; > [ "${B_PDEPEND-unset}" != "unset" ] && PDEPEND="${B_PDEPEND}"; > [ "${B_PDEPEND-unset}" != "unset" ] || unset PDEPEND; > [ "${B_IUSE-unset}" != "unset" ] && IUSE="${B_IUSE}"; > [ "${B_IUSE-unset}" != "unset" ] || unset IUSE; > set +f; > hasq $1 $INHERITED || export INHERITED="$INHERITED $1"; > export ECLASS="$PECLASS"; > shift; > done; > ECLASS_DEPTH=$(($ECLASS_DEPTH - 1)) >} >insinto () >{ > if [ "$1" == "/" ]; then > export INSDESTTREE=""; > else > export INSDESTTREE=$1; > if [ ! -d "${D}${INSDESTTREE}" ]; then > install -d "${D}${INSDESTTREE}"; > fi; > fi >} >insopts () >{ > INSOPTIONS=""; > for x in $*; > do > if has nostrip $FEATURES $RESTRICT && [ "$x" == "-s" ]; then > continue; > else > INSOPTIONS="$INSOPTIONS $x"; > fi; > done; > export INSOPTIONS >} >into () >{ > if [ $1 == "/" ]; then > export DESTTREE=""; > else > export DESTTREE=$1; > if [ ! -d "${D}${DESTTREE}" ]; then > install -d "${D}${DESTTREE}"; > fi; > fi >} >is-flag () >{ > local x; > for x in ${CFLAGS} ${CXXFLAGS}; > do > if [[ ${x} == ${1} ]]; then > echo true; > return 0; > fi; > done; > return 1 >} >is_kernel () >{ > get_KV_info; > if [ "${KV_major}" -eq "${1}" -a "${KV_minor}" -eq "${2}" ]; then > return 0; > else > return 1; > fi >} >keepdir () >{ > dodir "$@"; > local x; > if [ "$1" == "-R" ] || [ "$1" == "-r" ]; then > shift; > find "$@" -type d -printf "${D}/%p/.keep\n" | tr "\n" "\0" | $XARGS -0 -n100 touch || diefunc "$FUNCNAME" "$LINENO" "$?" "Failed to recursive create .keep files"; > else > for x in "$@"; > do > touch "${D}/${x}/.keep" || diefunc "$FUNCNAME" "$LINENO" "$?" "Failed to create .keep in ${D}/${x}"; > done; > fi >} >libopts () >{ > LIBOPTIONS=""; > for x in $*; > do > if has nostrip $FEATURES $RESTRICT && [ "$x" == "-s" ]; then > continue; > else > LIBOPTIONS="$LIBOPTIONS $x"; > fi; > done; > export LIBOPTIONS >} >make_desktop_entry () >{ > [ -z "$1" ] && eerror "make_desktop_entry: You must specify the executable" && return 1; > local exec="${1}"; > local name="${2:-${PN}}"; > local icon="${3:-${PN}.png}"; > local type="${4}"; > local subdir="${6}"; > local path="${5:-${GAMES_BINDIR}}"; > if [ -z "${type}" ]; then > case ${CATEGORY} in > "app-emulation") > type=Emulator; > subdir="Emulation" > ;; > "games-"*) > type=Game; > subdir="Games" > ;; > "net-"*) > type=Network; > subdir="${type}" > ;; > *) > type=; > subdir= > ;; > esac; > fi; > local desktop="${T}/${exec}.desktop"; > echo "[Desktop Entry] >Encoding=UTF-8 >Version=0.9.2 >Name=${name} >Type=Application >Comment=${DESCRIPTION} >Exec=${exec} >Path=${path} >Icon=${icon} >Categories=Application;${type};" >"${desktop}"; > insinto /usr/share/applications; > doins "${desktop}"; > return 0 >} >newcdepend () >{ > debug-print-function newcdepend $*; > do_newdepend CDEPEND $1 >} >newdepend () >{ > debug-print-function newdepend $*; > debug-print "newdepend: E_DEPEND=$E_DEPEND E_RDEPEND=$E_RDEPEND"; > while [ -n "$1" ]; do > case $1 in > "/autotools") > do_newdepend DEPEND sys-devel/autoconf sys-devel/automake sys-devel/make > ;; > "/c") > do_newdepend DEPEND sys-devel/gcc virtual/glibc; > do_newdepend RDEPEND virtual/glibc > ;; > *) > do_newdepend DEPEND $1 > ;; > esac; > shift; > done >} >newpdepend () >{ > debug-print-function newpdepend $*; > do_newdepend PDEPEND $1 >} >newrdepend () >{ > debug-print-function newrdepend $*; > do_newdepend RDEPEND $1 >} >patch_exclude () >{ > for PATCH_GROUP in ${@}; > do > for PATCH in $(ls ${PATCHDIR}/${PATCH_GROUP}* 2> /dev/null); > do > if [ -a "${PATCH}" ]; then > ebegin " `basename ${PATCH}`"; > mv -f ${PATCH} ${EXCLUDED}; > eend 0; > fi; > done; > done >} >patch_setup () >{ > einfo "Excluding patches..."; > patch_exclude 1770 1771 1772 1773; > patch_exclude 0120*parallel-make; > patch_exclude 9960_all_4.3.0-exec-shield-GNU; > patch_exclude 9961_all_4.3.0-libGL-exec-shield; > if use !s390; then > patch_exclude 7500; > fi; > patch_exclude 9841_all_4.3.0-gatos-mesa; > if use debug; then > patch_exclude 5901*acecad-debug; > fi; > if use 3dfx && [ "${TDFX_RISKY}" = "yes" ]; then > patch_exclude 5850; > else > patch_exclude 5851; > fi; > einfo "Done excluding patches" >} >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 >} >pkg_postinst () >{ > env-update; > if [ "${ROOT}" = "/" ]; then > local x=""; > umask 022; > font_setup; > echo; > if [ "`${ROOT}/usr/sbin/opengl-update --get-implementation`" = "xfree" ]; then > ${ROOT}/usr/sbin/opengl-update ${PN}; > else > ${ROOT}/usr/sbin/opengl-update --use-old ${PN}; > fi; > fi; > for x in $(find ${ROOT}/usr/X11R6/$(get_libdir)/X11/locale/ -mindepth 1 -type d); > do > case `basename ${x}` in > ja* | ko* | zh*) > if [ -r "${x}/Compose" ]; then > rm -f ${x}/Compose; > fi > ;; > esac; > done; > for x in ${ROOT}/tmp/.{ICE,X11}-unix; > do > if [ ! -d ${x} ]; then > mkdir -p ${x}; > fi; > chown root:root ${x}; > chmod 1777 ${x}; > done; > if use ppc64; then > cd ${ROOT}/usr/X11R6/$(get_libdir)/modules/drivers; > mv fbdev_drv.so fbdev_drv.so.orig; > mv ati_drv.so ati_drv.so.orig; > mv nv_drv.so nv_drv.so.orig; > ld -shared -o ${ROOT}/usr/X11R6/$(get_libdir)/modules/drivers/fbdev_drv.so ${ROOT}/usr/X11R6/$(get_libdir)/modules/drivers/fbdev_drv.so.orig ${ROOT}/usr/X11R6/$(get_libdir)/modules/linux/libfbdevhw.so ${ROOT}/usr/X11R6/$(get_libdir)/modules/libshadow.so ${ROOT}/usr/X11R6/$(get_libdir)/modules/libshadowfb.so ${ROOT}/usr/X11R6/$(get_libdir)/modules/libfb.so; > ld -rpath ${ROOT}/usr/X11R6/$(get_libdir)/modules/drivers -shared -o ati_drv.so ati_drv.so.orig radeon_drv.so atimisc_drv.so fbdev_drv.so r128_drv.so vga_drv.so; > ld -rpath ${ROOT}/usr/X11R6/$(get_libdir)/modules/drivers -shared -o nv_drv.so nv_drv.so.orig fbdev_drv.so vga_drv.so; > cd ${ROOT}/usr/X11R6/$(get_libdir)/modules/extensions; > mv libglx.so libglx.so.orig; > mv libdri.so libdri.so.orig; > ld -rpath ${ROOT}/usr/X11R6/$(get_libdir)/modules/extensions -shared -o libglx.so libglx.so.orig libGLcore.so; > ld -rpath ${ROOT}/usr/X11R6/$(get_libdir)/modules/extensions -shared -o libdri.so libdri.so.orig libglx.so; > fi; > print_info >} >pkg_postrm () >{ > if [ -x ${ROOT}/usr/X11R6/bin/Xorg ]; then > ln -snf ../X11R6/bin ${ROOT}/usr/bin/X11; > ln -snf ../X11R6/include/X11 ${ROOT}/usr/include/X11; > ln -snf ../X11R6/include/DPS ${ROOT}/usr/include/DPS; > ln -snf ../X11R6/include/GL ${ROOT}/usr/include/GL; > ln -snf ../X11R6/$(get_libdir)/X11 ${ROOT}/usr/$(get_libdir)/X11; > fi >} >pkg_preinst () >{ > update_config_files; > for G_FONTDIR in ${G_FONTDIRS}; > do > if [ -d ${ROOT}/usr/X11R6/$(get_libdir)/X11/fonts/${G_FONTDIR} ]; then > if [ "${G_FONTDIR}" = "local" ]; then > mv ${ROOT}/usr/X11R6/$(get_libdir)/X11/fonts/${G_FONTDIR} ${ROOT}/usr/share/fonts/; > else > rm -rf ${ROOT}/usr/X11R6/$(get_libdir)/X11/fonts/${G_FONTDIR}; > fi; > fi; > if [ "${G_FONTDIR}" != "CID" -a "${G_FONTDIR}" != "Speedo" ]; then > find ${ROOT}/usr/share/fonts/${G_FONTDIR} -type f -name 'fonts.*' -exec rm -f {} \;; > find ${ROOT}/usr/share/fonts/${G_FONTDIR} -type f -name 'encodings.dir' -exec rm -f {} \;; > fi; > done; > if [ -d ${ROOT}/usr/X11R6/$(get_libdir)/X11/fonts/truetype ]; then > rm -rf ${ROOT}/usr/X11R6/$(get_libdir)/X11/fonts/truetype; > fi; > if [ -L ${ROOT}/etc/X11/app-defaults ]; then > rm -f ${ROOT}/etc/X11/app-defaults; > fi; > if [ ! -L ${ROOT}/usr/X11R6/$(get_libdir)/X11/app-defaults ] && [ -d ${ROOT}/usr/X11R6/$(get_libdir)/X11/app-defaults ]; then > if [ ! -d ${ROOT}/etc/X11/app-defaults ]; then > mkdir -p ${ROOT}/etc/X11/app-defaults; > fi; > mv -f ${ROOT}/usr/X11R6/$(get_libdir)/X11/app-defaults ${ROOT}/etc/X11; > fi; > if [ -L ${ROOT}/usr/X11R6/$(get_libdir)/X11/xkb ]; then > rm -f ${ROOT}/usr/X11R6/$(get_libdir)/X11/xkb; > fi; > if [ ! -L ${ROOT}/etc/X11/xkb ] && [ -d ${ROOT}/etc/X11/xkb ]; then > if [ ! -d ${ROOT}/usr/X11R6/$(get_libdir)/X11/xkb ]; then > mkdir -p ${ROOT}/usr/X11R6/$(get_libdir)/X11; > fi; > mv -f ${ROOT}/etc/X11/xkb ${ROOT}/usr/X11R6/$(get_libdir)/X11; > fi; > if [ -d ${ROOT}/usr/$(get_libdir)/opengl/${PN} ]; then > rm -rf ${ROOT}/usr/$(get_libdir)/opengl/${PN}/*; > fi; > rm -f ${ROOT}/usr/X11R6/$(get_libdir)/libGL* >} >pkg_prerm () >{ > if use ppc64; then > cd ${ROOT}/usr/X11R6/$(get_libdir)/modules/drivers; > mv fbdev_drv.so.orig fbdev_drv.so; > mv ati_drv.so.orig ati_drv.so; > mv nv_drv.so.orig nv_drv.so; > cd ${ROOT}/usr/X11R6/$(get_libdir)/modules/extensions; > mv libglx.so.orig libglx.so; > mv libdri.so.orig libdri.so; > fi >} >pkg_setup () >{ > FILES_DIR="${WORKDIR}/files"; > PATCHDIR="${WORKDIR}/patch"; > EXCLUDED="${PATCHDIR}/excluded"; > cflag_setup; > gcc-getCC; > if use pam && best_version x11-base/${PN}; then > einfo "Previous ${PN} installation detected"; > einfo "Enabling PAM features in ${PN}..."; > else > einfo "Previous ${PN} installation NOT detected"; > einfo "Disabling PAM features in ${PN}..."; > einfo "You must remerge ${PN} to enable pam."; > einfo "See http://bugs.gentoo.org/show_bug.cgi?id=35468."; > fi; > if use static || use dlloader; then > if use sdk; then > diefunc "$FUNCNAME" "$LINENO" "$?" "The static and dlloader USE flags are currently incompatible with the sdk USE flag."; > fi; > fi; > if use dmx && use doc; then > diefunc "$FUNCNAME" "$LINENO" "$?" "The dmx and doc USE flags are temporarily incompatible and result in a dead build."; > fi; > use amd64 && get_libdir_override lib64; > [ "${CONF_LIBDIR}" == "lib32" ] && get_libdir_override lib; > if ! use bitmap-fonts; then > ewarn "Please emerge this with USE=\"bitmap-fonts\" to enable"; > ewarn "75dpi and 100dpi fonts. Your GTK+-1.2 fonts may look"; > ewarn "screwy otherwise"; > fi; > if ! use bitmap-fonts; then > ebeep 5; > epause 10; > fi >} >pkgconfig_install () >{ > insinto /usr/$(get_libdir)/pkgconfig; > doins ${D}/usr/X11R6/$(get_libdir)/pkgconfig/*.pc; > rm -rf ${D}/usr/X11R6/$(get_libdir)/pkgconfig >} >portageq () >{ > [ "${EBUILD_PHASE}" == "depend" ] && echo "portageq in global scope: ${CATEGORY}/$PF" 1>&2; > /usr/lib/portage/bin/portageq "$@" >} >preserve_old_lib () >{ > LIB=$1; > if [ -n "${LIB}" -a -f "${ROOT}${LIB}" ]; then > SONAME=`basename ${LIB}`; > DIRNAME=`dirname ${LIB}`; > dodir ${DIRNAME}; > cp ${ROOT}${LIB} ${D}${DIRNAME}; > touch ${D}${LIB}; > fi >} >preserve_old_lib_notify () >{ > LIB=$1; > if [ -n "${LIB}" -a -f "${ROOT}${LIB}" ]; then > SONAME=`basename ${LIB}`; > einfo "An old version of an installed library was detected on your system."; > einfo "In order to avoid breaking packages that link against is, this older version"; > einfo "is not being removed. In order to make full use of this newer version,"; > einfo "you will need to execute the following command:"; > einfo " revdep-rebuild --soname ${SONAME}"; > einfo; > einfo "After doing that, you can safely remove ${LIB}"; > einfo "Note: 'emerge gentoolkit' to get revdep-rebuild"; > fi >} >print_info () >{ > if use 3dfx; then > echo; > einfo "If using a 3DFX card, and you had \"3dfx\" in your USE flags,"; > einfo "please merge media-libs/glide-v3 if you have not done so yet"; > einfo "by doing:"; > einfo; > einfo " # emerge media-libs/glide-v3"; > echo; > fi; > echo; > einfo "Please note that the xcursors are in /usr/share/cursors/${PN}"; > einfo "Any custom cursor sets should be placed in that directory"; > echo; > einfo "If you wish to set system-wide default cursors, please set"; > einfo "them in /usr/local/share/cursors/${PN} so that future"; > einfo "emerges will not overwrite those settings"; > echo; > einfo "Listening on TCP is disabled by default with startx."; > einfo "To enable it, edit /usr/X11R6/bin/startx."; > echo; > echo; > ewarn "BEWARE:"; > ewarn "Font installation location has MOVED to:"; > ewarn "/usr/share/fonts"; > ewarn "Run etc-update to update your config files."; > ewarn "Old locations for fonts, docs and man pages"; > ewarn "are deprecated."; > echo; > ewarn "The configuration file has changed from that in XFree86."; > ewarn "It is xorg.conf instead of XF86Config."; > einfo "You may use xorgcfg, X -configure, or xorgconfig"; > einfo "to create xorg.conf."; > einfo "If XF86Config exists and xorg.conf does not, it will still"; > einfo "read XF86Config."; > ebeep 5; > epause 10 >} >replace-cpu-flags () >{ > local newcpu="$#"; > newcpu="${!newcpu}"; > while [ $# -gt 1 ]; do > replace-flags "-march=${1}" "-march=${newcpu}"; > replace-flags "-mcpu=${1}" "-mcpu=${newcpu}"; > replace-flags "-mtune=${1}" "-mtune=${newcpu}"; > shift; > done; > return 0 >} >replace-flags () >{ > local f fset; > declare -a new_CFLAGS new_CXXFLAGS; > for fset in CFLAGS CXXFLAGS; > do > for f in ${!fset}; > do > [[ ${f} == ${1} ]] && f=${2}; > eval new_${fset}\[\${\#new_${fset}\[@]}]=\${f}; > done; > eval export ${fset}=\${new_${fset}\[*]}; > done; > return 0 >} >replace-sparc64-flags () >{ > local SPARC64_CPUS="ultrasparc v9"; > if [ "${CFLAGS/mtune}" != "${CFLAGS}" ]; then > for x in ${SPARC64_CPUS}; > do > CFLAGS="${CFLAGS/-mcpu=${x}/-mcpu=v8}"; > done; > else > for x in ${SPARC64_CPUS}; > do > CFLAGS="${CFLAGS/-mcpu=${x}/-mcpu=v8 -mtune=${x}}"; > done; > fi; > if [ "${CXXFLAGS/mtune}" != "${CXXFLAGS}" ]; then > for x in ${SPARC64_CPUS}; > do > CXXFLAGS="${CXXFLAGS/-mcpu=${x}/-mcpu=v8}"; > done; > else > for x in ${SPARC64_CPUS}; > do > CXXFLAGS="${CXXFLAGS/-mcpu=${x}/-mcpu=v8 -mtune=${x}}"; > done; > fi; > export CFLAGS CXXFLAGS >} >save_options () >{ > local myopts="$1"; > shift; > if [ ! -d "${svcdir}/options/${myservice}" ]; then > mkdir -p -m 0755 "${svcdir}/options/${myservice}"; > fi; > echo "$*" >"${svcdir}/options/${myservice}/${myopts}"; > return 0 >} >set_arch_to_kernel () >{ > export EUTILS_ECLASS_PORTAGE_ARCH="${ARCH}"; > case ${ARCH} in > x86) > export ARCH="i386" > ;; > amd64) > export ARCH="x86_64" > ;; > hppa) > export ARCH="parisc" > ;; > mips) > export ARCH="mips" > ;; > *) > export ARCH="${ARCH}" > ;; > esac >} >set_arch_to_portage () >{ > export ARCH="${EUTILS_ECLASS_PORTAGE_ARCH}" >} >setup-allowed-flags () >{ > if [ -z "${ALLOWED_FLAGS}" ]; then > export ALLOWED_FLAGS="-O -O1 -O2 -mcpu -march -mtune -fstack-protector -fno-stack-protector -fno-pie -fno-unit-at-a-time -pipe -g"; > case "${ARCH}" in > mips) > ALLOWED_FLAGS="${ALLOWED_FLAGS} -mips1 -mips2 -mips3 -mips4 -mips32 -mips64 -mips16 -EL -EB -mabi" > ;; > amd64) > ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC -m64" > ;; > x86) > ALLOWED_FLAGS="${ALLOWED_FLAGS} -m32" > ;; > alpha) > ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC" > ;; > ia64) > ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC" > ;; > esac; > fi; > ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-stack-protector -fno-stack-protector-all"; > case "${ARCH}" in > x86 | amd64 | ia64) > ALLOWED_FLAGS="${ALLOWED_FLAGS} -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow" > ;; > esac; > ALLOWED_FLAGS="${ALLOWED_FLAGS} -mregparm -mno-app-regs -mapp-regs -msoft-float -mflat -mno-faster-structs -mfaster-structs -mlittle-endian -mbig-endian -mlive-g0 -mcmodel -mno-stack-bias -mstack-bias"; > export UNSTABLE_FLAGS="-Os -O3 -freorder-blocks -fprefetch-loop-arrays"; > return 0 >} >setup_config_files () >{ > sed -i "s:/usr/X11R6/$(get_libdir)/X11/fonts:${ROOT}usr/share/fonts:g" ${D}/etc/X11/xorg.conf.example; > sed -i "s:/usr/X11R6/$(get_libdir)/X11/fonts:${ROOT}usr/share/fonts:g" ${D}/etc/X11/fs/config; > sed -i "s:^.*Option.*"XkbRules".*$::g" ${D}/etc/X11/xorg.conf.example >} >setup_defaultlevels () >{ > get_bootconfig; > if get_bootparam "noconfigprofile"; then > export RC_USE_CONFIG_PROFILE="no"; > else > if get_bootparam "configprofile"; then > export RC_USE_CONFIG_PROFILE="yes"; > fi; > fi; > if [ "${RC_USE_CONFIG_PROFILE}" = "yes" -a -n "${DEFAULTLEVEL}" ] && [ -d "/etc/runlevels/${BOOTLEVEL}.${DEFAULTLEVEL}" -o -L "/etc/runlevels/${BOOTLEVEL}.${DEFAULTLEVEL}" ]; then > export BOOTLEVEL="${BOOTLEVEL}.${DEFAULTLEVEL}"; > fi; > if [ -z "${SOFTLEVEL}" ]; then > if [ -f "${svcdir}/softlevel" ]; then > export SOFTLEVEL="$(< ${svcdir}/softlevel)"; > else > export SOFTLEVEL="${BOOTLEVEL}"; > fi; > fi; > return 0 >} >setup_dynamic_libgl () >{ > ebegin "Moving libGL and friends for dynamic switching"; > dodir /usr/$(get_libdir)/opengl/${PN}/{$(get_libdir),extensions,include}; > local x=""; > for x in ${D}/usr/X11R6/$(get_libdir)/libGL.so* ${D}/usr/X11R6/$(get_libdir)/libGL.la ${D}/usr/X11R6/$(get_libdir)/libGL.a ${D}/usr/X11R6/$(get_libdir)/libMesaGL.so; > do > if [ -f ${x} -o -L ${x} ]; then > mv -f ${x} ${D}/usr/$(get_libdir)/opengl/${PN}/$(get_libdir); > fi; > done; > for x in ${D}/usr/X11R6/$(get_libdir)/modules/extensions/libglx*; > do > if [ -f ${x} -o -L ${x} ]; then > mv -f ${x} ${D}/usr/$(get_libdir)/opengl/${PN}/extensions; > fi; > done; > for x in ${D}/usr/X11R6/include/GL/{gl.h,glx.h,glxtokens.h,glext.h}; > do > if [ -f ${x} -o -L ${x} ]; then > mv -f ${x} ${D}/usr/$(get_libdir)/opengl/${PN}/include; > fi; > done; > dosym /usr/$(get_libdir)/opengl/${PN}/include/glext.h /usr/X11R6/include/GL/; > if [ "$(get_libdir)" != "lib" ]; then > dosym $(get_libdir) /usr/$(get_libdir)/opengl/${PN}/lib; > fi; > eend 0 >} >splash_calc () >{ > pb_runs=($(dolisting "/etc/runlevels/${SOFTLEVEL}/")); > pb_runb=($(dolisting "/etc/runlevels/${BOOTLEVEL}/")); > pb_scripts=${#pb_runs[*]}; > pb_boot=${#pb_runb[*]}; > [ ! -e /proc/splash -o ! -x /sbin/splash ] && return 0; > if [ -f /etc/conf.d/bootsplash.conf ]; then > . /etc/conf.d/bootsplash.conf; > if [ -n "${PROGRESS_SYSINIT_RATE}" ]; then > init_rate=$((65535*${PROGRESS_SYSINIT_RATE}/100)); > fi; > if [ -n "${PROGRESS_BOOT_RATE}" ]; then > boot_rate=$((65535*${PROGRESS_BOOT_RATE}/100)); > fi; > fi; > if [ "${RUNLEVEL}" = "S" -a "${SOFTLEVEL}" = "boot" ]; then > pb_started=($(dolisting "${svcdir}/started/")); > pb_scripts=$((${pb_boot} - ${#pb_started[*]})); > pb_init=16383; > pb_rate=26213; > pb_count=0; > if [ -n "${init_rate}" -a -n "${boot_rate}" ]; then > pb_init="${init_rate}"; > pb_rate=$((${init_rate} + ${boot_rate})); > fi; > else > if [ "${SOFTLEVEL}" = "reboot" -o "${SOFTLEVEL}" = "shutdown" ]; then > pb_started=($(dolisting "${svcdir}/started/")); > pb_scripts=${#pb_started[*]}; > pb_rate=65534; > else > pb_init=26213; > pb_rate=65534; > if [ -n "${init_rate}" -a -n "${boot_rate}" ]; then > pb_init=$((${init_rate} + ${boot_rate})); > fi; > fi; > fi; > echo "pb_init=${pb_init}" >"${svcdir}/progress"; > echo "pb_rate=${pb_rate}" >>"${svcdir}/progress"; > echo "pb_count=${pb_count}" >>"${svcdir}/progress"; > echo "pb_scripts=${pb_scripts}" >>"${svcdir}/progress" >} >splash_debug () >{ > local softlevel="$1"; > [ ! -e /proc/splash -o ! -x /sbin/splash ] && return 0; > if [ -f /etc/conf.d/bootsplash.conf ]; then > source /etc/conf.d/bootsplash.conf; > [ "${BOOTSPLASH_DEBUG}" = "yes" -a -n "${softlevel}" ] || return; > if [ -f "${svcdir}/progress" ]; then > cat "${svcdir}/progress" >"/var/log/bootsplash.${softlevel}"; > else > echo "pb_init=${pb_init}" >"/var/log/bootsplash.${softlevel}"; > echo "pb_rate=${pb_rate}" >>"/var/log/bootsplash.${softlevel}"; > echo "pb_count=${pb_count}" >>"/var/log/bootsplash.${softlevel}"; > echo "pb_scripts=${pb_scripts}" >>"/var/log/bootsplash.${softlevel}"; > echo "pb_execed=\"${pb_execed}\"" >>"/var/log/bootsplash.${softlevel}"; > fi; > fi >} >splash_init () >{ > pb_init=0; > pb_count=0; > pb_scripts=0; > pb_rate=0; > if [ ! -x /sbin/splash ] || [ -e /proc/version -a ! -e /proc/splash ]; then > return 0; > fi; > if [ -f /etc/conf.d/bootsplash.conf ]; then > . /etc/conf.d/bootsplash.conf; > if [ -n "${PROGRESS_SYSINIT_RATE}" ]; then > rate=$((65535*${PROGRESS_SYSINIT_RATE}/100)); > fi; > fi; > if [ "${RUNLEVEL}" = "S" ]; then > pb_scripts=5; > pb_rate=16383; > [ -n "${rate}" ] && pb_rate="${rate}"; > fi; > export pb_init pb_count pb_scripts pb_rate >} >splash_update () >{ > local fsstate="$1"; > local myscript="$2"; > local action="$3"; > [ ! -e /proc/splash -o ! -x /sbin/splash ] && return 0; > if [ "${fsstate}" = "inline" ]; then > /sbin/splash "${myscript}" "${action}"; > pb_count=$((${pb_count} + 1)); > pb_execed="${pb_execed} ${myscript:-inline}"; > else > if [ ! -L "${svcdir}/softscripts/${myscript}" ]; then > [ "${SOFTLEVEL}" != "reboot" -a "${SOFTLEVEL}" != "shutdown" ] && return; > fi; > [ -f "${svcdir}/progress" ] && source "${svcdir}/progress"; > for x in ${pb_execed}; > do > [ "${x}" = "${myscript}" ] && return; > done; > /sbin/splash "${myscript}" "${action}"; > pb_count=$((${pb_count} + 1)); > echo "pb_init=${pb_init}" >"${svcdir}/progress"; > echo "pb_rate=${pb_rate}" >>"${svcdir}/progress"; > echo "pb_count=${pb_count}" >>"${svcdir}/progress"; > echo "pb_scripts=${pb_scripts}" >>"${svcdir}/progress"; > echo "pb_execed=\"${pb_execed} ${myscript}\"" >>"${svcdir}/progress"; > fi >} >src_compile () >{ > get_number_of_jobs; > unset MAKE_OPTS; > einfo "Building xorg-x11..."; > if use debug; then > chmod u+x ${S}/config/util/makeg.sh; > FAST=1 ${S}/config/util/makeg.sh World WORLDOPTS="" || diefunc "$FUNCNAME" "$LINENO" "$?"; > else > FAST=1 emake World WORLDOPTS="" || diefunc "$FUNCNAME" "$LINENO" "$?"; > fi; > if use nls; then > cd ${S}/nls; > make || diefunc "$FUNCNAME" "$LINENO" "$?"; > cd ${S}; > fi >} >src_install () >{ > unset MAKE_OPTS; > einfo "Installing X.org X11..."; > if [ "`gcc-version`" != "2.95" ] && use x86; then > make install DESTDIR=${D} || make CDEBUGFLAGS="${CDEBUGFLAGS} -mno-mmx" CXXDEBUGFLAGS="${CXXDEBUGFLAGS} -mno-mmx" install DESTDIR=${D} || diefunc "$FUNCNAME" "$LINENO" "$?"; > else > make install DESTDIR=${D} || diefunc "$FUNCNAME" "$LINENO" "$?"; > fi; > if use sdk; then > einfo "Installing X.org X11 SDK..."; > make install.sdk DESTDIR=${D} || diefunc "$FUNCNAME" "$LINENO" "$?"; > fi; > pkgconfig_install; > einfo "Installing man pages..."; > make install.man DESTDIR=${D} || diefunc "$FUNCNAME" "$LINENO" "$?"; > einfo "Compressing man pages..."; > prepman /usr/X11R6; > if use nls; then > cd ${S}/nls; > make DESTDIR=${D} install || diefunc "$FUNCNAME" "$LINENO" "$?"; > fi; > backward_compat_setup; > for x in ${D}/usr/X11R6/$(get_libdir)/X11/locale/$(get_libdir)/common/*.so*; > do > if [ -f ${x} ]; then > fperms 0755 `echo ${x} | sed -e "s|${D}||"`; > fi; > done; > for x in $(find ${D}/usr/X11R6/$(get_libdir)/modules -name '*.o') $(find ${D}/usr/X11R6/$(get_libdir)/modules -name '*.so'); > do > if [ -f ${x} ]; then > fperms 0755 `echo ${x} | sed -e "s|${D}||"`; > fi; > done; > ebegin "Fixing $(get_libdir)/X11/config/host.def"; > cp ${D}/usr/X11R6/$(get_libdir)/X11/config/host.def ${T}; > awk '!/OptimizedCDebugFlags|OptimizedCplusplusDebugFlags|GccWarningOptions/ {print $0}' ${T}/host.def >${D}/usr/X11R6/$(get_libdir)/X11/config/host.def; > eend 0; > ebegin "Euro Support..."; > LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${D}/usr/X11R6/$(get_libdir)" ${D}/usr/X11R6/bin/bdftopcf -t ${WORKDIR}/Xlat9-8x14.bdf | gzip -9 >${D}/usr/share/fonts/misc/Xlat9-8x14-lat9.pcf.gz; > LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${D}/usr/X11R6/$(get_libdir)" ${D}/usr/X11R6/bin/bdftopcf -t ${WORKDIR}/Xlat9-9x16.bdf | gzip -9 >${D}/usr/share/fonts/misc/Xlat9-9x16-lat9.pcf.gz; > LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${D}/usr/X11R6/$(get_libdir)" ${D}/usr/X11R6/bin/bdftopcf -t ${WORKDIR}/Xlat9-10x20.bdf | gzip -9 >${D}/usr/share/fonts/misc/Xlat9-10x20-lat9.pcf.gz; > eend 0; > dodir /usr/{bin,include,$(get_libdir)}; > dosym ../X11R6/bin /usr/bin/X11; > dosym ../X11R6/include/X11 /usr/include/X11; > dosym ../X11R6/include/DPS /usr/include/DPS; > dosym ../X11R6/include/GL /usr/include/GL; > dosym ../X11R6/$(get_libdir)/X11 /usr/$(get_libdir)/X11; > dosym ../../usr/X11R6/$(get_libdir)/X11/xkb /etc/X11/xkb; > keepdir /var/lib/xdm; > dosym ../../../var/lib/xdm /etc/X11/xdm/authdir; > rm -f ${D}/usr/$(get_libdir)/libGL.*; > dosym libGL.so.1.2 /usr/X11R6/$(get_libdir)/libGL.so; > dosym libGL.so.1.2 /usr/X11R6/$(get_libdir)/libGL.so.1; > dosym libGL.so.1.2 /usr/X11R6/$(get_libdir)/libMesaGL.so; > dosym libGLU.so.1.3 /usr/$(get_libdir)/libMesaGLU.so; > insinto /usr/X11R6/$(get_libdir); > doins ${FILES_DIR}/$(get_libdir)/*.la; > dosym ../../usr/X11R6/bin/Xorg /etc/X11/X; > fperms 755 /usr/X11R6/$(get_libdir)/X11/xkb/geometry/sgi; > fperms 755 /usr/X11R6/bin/dga; > compose_files_setup; > ebegin "Encoding files for xfsft font server..."; > dodir /usr/share/fonts/encodings; > cp -a ${WORKDIR}/usr/share/fonts/encodings/* ${D}/usr/share/fonts/encodings; > for x in ${D}/usr/share/fonts/encodings/{.,large}/*.enc; > do > [ -f "${x}" ] && gzip -9 -f ${x}; > done; > eend 0; > if use nls; then > ebegin "gemini-koi8 fonts..."; > cd ${WORKDIR}/ukr; > gunzip *.Z; > gzip -9 *.pcf; > cd ${S}; > cp -a ${WORKDIR}/ukr ${D}/usr/share/fonts; > eend 0; > fi; > etc_files_install; > mv ${D}/usr/X11R6/$(get_libdir)/libGLU.* ${D}/usr/$(get_libdir); > setup_dynamic_libgl; > dosed 's:whiteglass:core:' /usr/share/cursors/${PN}/default/index.theme; > strip_execs; > insinto /usr/share/cursors/${PN}/gentoo/cursors; > doins ${WORKDIR}/cursors/gentoo/cursors/*; > insinto /usr/share/cursors/${PN}/gentoo-blue/cursors; > doins ${WORKDIR}/cursors/gentoo-blue/cursors/*; > insinto /usr/share/cursors/${PN}/gentoo-silver/cursors; > doins ${WORKDIR}/cursors/gentoo-silver/cursors/*; > if use sdk; then > insinto /usr/X11R6/$(get_libdir)/Server/include; > doins ${S}/extras/drm/shared/drm.h; > fi; > rm -rf ${D}/etc/rc.d; > setup_config_files >} >src_unpack () >{ > ebegin "Unpacking source"; > unpack X11R${PV}-src{1,2,3,4,5}.tar.gz; > eend 0; > if use doc; then > ebegin "Unpacking documentation"; > unpack X11R${PV}-src{6,7}.tar.gz; > eend 0; > fi; > ebegin "Unpacking Gentoo files and patches"; > unpack ${P}-files-${FILES_VER}.tar.bz2 >/dev/null; > unpack ${P}-patches-${PATCH_VER}.tar.bz2 >/dev/null; > eend 0; > ebegin "Unpacking Gentoo cursors"; > unpack gentoo-cursors-tad-${XCUR_VER}.tar.bz2 >/dev/null; > eend 0; > ebegin "Unpacking fonts"; > if use nls; then > unpack gemini-koi8-u.tar.bz2 >/dev/null; > fi; > unpack eurofonts-X11.tar.bz2 >/dev/null; > unpack xfsft-encodings-${XFSFT_ENC_VER}.tar.bz2 >/dev/null; > eend 0; > rm -f ${WORKDIR}/usr/share/fonts/encodings/urdunaqsh-0.enc; > patch_setup; > cd ${WORKDIR}; > EPATCH_SUFFIX="patch" epatch ${PATCHDIR}; > cd ${S}; > host_def_setup; > cd ${S}; > if use doc; then > for x in ${S}/programs/Xserver/hw/xfree86/{XF98Conf.cpp,XF98Config}; > do > if [ -f ${x} ]; then > cp ${x} ${x}.orig; > grep -iv 'Load[[:space:]]*"\(pex5\|xie\)"' ${x}.orig >${x}; > rm -f ${x}.orig; > fi; > done; > fi >} >strip-flags () >{ > local x y flag NEW_CFLAGS NEW_CXXFLAGS; > setup-allowed-flags; > local NEW_CFLAGS=""; > local NEW_CXXFLAGS=""; > if has ~${ARCH} ${ACCEPT_KEYWORDS}; then > use debug && einfo "Enabling the use of some unstable flags"; > ALLOWED_FLAGS="${ALLOWED_FLAGS} ${UNSTABLE_FLAGS}"; > fi; > set -f; > for x in ${CFLAGS}; > do > for y in ${ALLOWED_FLAGS}; > do > flag=${x%%=*}; > if [ "${flag%%${y}}" = "" ]; then > NEW_CFLAGS="${NEW_CFLAGS} ${x}"; > break; > fi; > done; > done; > for x in ${CXXFLAGS}; > do > for y in ${ALLOWED_FLAGS}; > do > flag=${x%%=*}; > if [ "${flag%%${y}}" = "" ]; then > NEW_CXXFLAGS="${NEW_CXXFLAGS} ${x}"; > break; > fi; > done; > done; > if [ "${CFLAGS/-O}" != "${CFLAGS}" -a "${NEW_CFLAGS/-O}" = "${NEW_CFLAGS}" ]; then > NEW_CFLAGS="${NEW_CFLAGS} -O2"; > fi; > if [ "${CXXFLAGS/-O}" != "${CXXFLAGS}" -a "${NEW_CXXFLAGS/-O}" = "${NEW_CXXFLAGS}" ]; then > NEW_CXXFLAGS="${NEW_CXXFLAGS} -O2"; > fi; > set +f; > export CFLAGS="${NEW_CFLAGS}"; > export CXXFLAGS="${NEW_CXXFLAGS}"; > return 0 >} >strip-linguas () >{ > local ls newls; > if [ "$1" == "-i" ] || [ "$1" == "-u" ]; then > local op="$1"; > shift; > ls=" $(find "$1" -name '*.po' -printf '%f ') "; > shift; > local d f; > for d in "$@"; > do > if [ "${op}" == "-u" ]; then > newls="${ls}"; > else > newls=""; > fi; > for f in $(find "$d" -name '*.po' -printf '%f '); > do > if [ "${op}" == "-i" ]; then > [ "${ls/ ${f} /}" != "${ls}" ] && newls="${newls} ${f}"; > else > [ "${ls/ ${f} /}" == "${ls}" ] && newls="${newls} ${f}"; > fi; > done; > ls="${newls}"; > done; > ls="${ls//.po}"; > else > ls="$@"; > fi; > ls=" ${ls} "; > newls=""; > for f in ${LINGUAS}; > do > if [ "${ls/ ${f} /}" != "${ls}" ]; then > nl="${newls} ${f}"; > else > ewarn "Sorry, but ${PN} does not support the ${f} LINGUA"; > fi; > done; > if [ -z "${newls}" ]; then > unset LINGUAS; > else > export LINGUAS="${newls}"; > fi >} >strip-unsupported-flags () >{ > local NEW_CFLAGS NEW_CXXFLAGS; > for x in ${CFLAGS}; > do > NEW_CFLAGS="${NEW_CFLAGS} `test_flag ${x}`"; > done; > for x in ${CXXFLAGS}; > do > NEW_CXXFLAGS="${NEW_CXXFLAGS} `test_flag ${x}`"; > done; > export CFLAGS="${NEW_CFLAGS}"; > export CXXFLAGS="${NEW_CXXFLAGS}" >} >strip_bins () >{ > einfo "Stripping binaries..."; > for x in $(find ${D}/ -type f -perm +0111 -exec file {} \; | grep -v ' shared object,' | sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'); > do > if [ -f ${x} ]; then > if [ "`eval echo \${x/${1}}`" = "${x}" ]; then > echo "`echo ${x} | sed -e "s|${D}||"`"; > strip ${x} || :; > fi; > fi; > done >} >strip_execs () >{ > if use debug; then > ewarn "Debug build turned on by USE=debug"; > ewarn "NOT stripping binaries and libraries"; > else > einfo "Stripping binaries and libraries..."; > for x in $(find ${D}/ -type f -perm +0111 -exec file {} \; | grep -v ' shared object,' | sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'); > do > if [ -f ${x} ]; then > if [ "${x/\/usr\/X11R6\/$(get_libdir)\/modules}" = "${x}" ]; then > echo "`echo ${x} | sed -e "s|${D}||"`"; > strip ${x} || :; > fi; > fi; > done; > for x in ${D}/usr/{$(get_libdir),$(get_libdir)/opengl/${PN}/$(get_libdir)}/*.so.* ${D}/usr/X11R6/{$(get_libdir),$(get_libdir)/X11/locale/$(get_libdir)/common}/*.so.*; > do > if [ -f ${x} ]; then > echo "`echo ${x} | sed -e "s|${D}||"`"; > strip --strip-debug ${x} || :; > fi; > done; > fi >} >test_flag () >{ > local cc=${CC:-gcc}; > cc=${cc%% *}; > if ${cc} -S -xc "$@" -o "$(emktemp)" /dev/null >&/dev/null; then > printf "%s\n" "$*"; > return 0; > fi; > return 1 >} >test_version_info () >{ > local cc=${CC:-gcc}; > cc=${cc%% *}; > if [[ $(${cc} --version 2>&1) == *$1* ]]; then > return 0; > else > return 1; > fi >} >unpack () >{ > local x; > local y; > local myfail; > local tarvars; > if [ "$USERLAND" == "BSD" ]; then > tarvars=""; > else > tarvars="--no-same-owner"; > fi; > for x in "$@"; > do > myfail="failure unpacking ${x}"; > echo ">>> Unpacking ${x} to $(pwd)"; > y="$(echo $x | sed 's:.*\.\(tar\)\.[a-zA-Z0-9]*:\1:')"; > case "${x##*.}" in > tar) > tar ${tarvars} -xf "${DISTDIR}/${x}" || diefunc "$FUNCNAME" "$LINENO" "$?" "$myfail" > ;; > tgz) > tar ${tarvars} -xzf "${DISTDIR}/${x}" || diefunc "$FUNCNAME" "$LINENO" "$?" "$myfail" > ;; > tbz2) > bzip2 -dc "${DISTDIR}/${x}" | tar ${tarvars} -xf - || diefunc "$FUNCNAME" "$LINENO" "$?" "$myfail" > ;; > ZIP | zip) > unzip -qo "${DISTDIR}/${x}" || diefunc "$FUNCNAME" "$LINENO" "$?" "$myfail" > ;; > gz | Z | z) > if [ "${y}" == "tar" ]; then > tar ${tarvars} -xzf "${DISTDIR}/${x}" || diefunc "$FUNCNAME" "$LINENO" "$?" "$myfail"; > else > gzip -dc "${DISTDIR}/${x}" >${x%.*} || diefunc "$FUNCNAME" "$LINENO" "$?" "$myfail"; > fi > ;; > bz2) > if [ "${y}" == "tar" ]; then > bzip2 -dc "${DISTDIR}/${x}" | tar ${tarvars} -xf - || diefunc "$FUNCNAME" "$LINENO" "$?" "$myfail"; > else > bzip2 -dc "${DISTDIR}/${x}" >${x%.*} || diefunc "$FUNCNAME" "$LINENO" "$?" "$myfail"; > fi > ;; > *) > echo "unpack ${x}: file format not recognized. Ignoring." > ;; > esac; > done >} >unpack_makeself () >{ > local src="$(find_unpackable_file "$1")"; > local skip="$2"; > local exe="$3"; > local shrtsrc="$(basename "${src}")"; > echo ">>> Unpacking ${shrtsrc} to ${PWD}"; > if [ -z "${skip}" ]; then > local ver="`grep -a '#.*Makeself' ${src} | awk '{print $NF}'`"; > local skip=0; > exe=tail; > case ${ver} in > 1.5.*) > skip=$(grep -a ^skip= "${src}" | cut -d= -f2) > ;; > 2.0 | 2.0.1) > skip=$(grep -a ^' 'tail "${src}" | awk '{print $2}' | cut -b2-) > ;; > 2.1.1) > skip=$(grep -a ^offset= "${src}" | awk '{print $2}' | cut -b2-); > let skip="skip + 1" > ;; > 2.1.2) > skip=$(grep -a ^offset= "${src}" | awk '{print $3}' | head -n 1); > let skip="skip + 1" > ;; > 2.1.3) > skip=`grep -a ^offset= "${src}" | awk '{print $3}'`; > let skip="skip + 1" > ;; > 2.1.4) > skip=$(grep -a offset=.*head.*wc "${src}" | awk '{print $3}' | head -n 1); > skip=$(head -n ${skip} "${src}" | wc -c); > exe="dd" > ;; > *) > eerror "I'm sorry, but I was unable to support the Makeself file."; > eerror "The version I detected was '${ver}'."; > eerror "Please file a bug about the file ${shrtsrc} at"; > eerror "http://bugs.gentoo.org/ so that support can be added."; > diefunc "$FUNCNAME" "$LINENO" "$?" "makeself version '${ver}' not supported" > ;; > esac; > debug-print "Detected Makeself version ${ver} ... using ${skip} as offset"; > fi; > case ${exe} in > tail) > exe="tail -n +${skip} '${src}'" > ;; > dd) > exe="dd ibs=${skip} skip=1 obs=1024 conv=sync if='${src}'" > ;; > *) > diefunc "$FUNCNAME" "$LINENO" "$?" "makeself cant handle exe '${exe}'" > ;; > esac; > local tmpfile="$(emktemp)"; > eval ${exe} 2>/dev/null | head -c 512 >"${tmpfile}"; > local filetype="$(file -b "${tmpfile}")"; > case ${filetype} in > *tar\ archive) > eval ${exe} | tar --no-same-owner -xf - > ;; > bzip2*) > eval ${exe} | bzip2 -dc | tar --no-same-owner -xf - > ;; > gzip*) > eval ${exe} | tar --no-same-owner -xzf - > ;; > compress*) > eval ${exe} | gunzip | tar --no-same-owner -xf - > ;; > *) > eerror "Unknown filetype \"${filetype}\" ?"; > false > ;; > esac; > _pipestatus="${PIPESTATUS[*]}"; > [[ "${_pipestatus// /}" -eq 0 ]] || diefunc "$FUNCNAME" "$LINENO" "$_pipestatus" "failure unpacking (${filetype}) makeself ${shrtsrc} ('${ver}' +${skip})" >} >unpack_pdv () >{ > local src="`find_unpackable_file $1`"; > local sizeoff_t="$2"; > [ -z "${sizeoff_t}" ] && diefunc "$FUNCNAME" "$LINENO" "$?" "No idea what off_t size was used for this pdv :("; > local shrtsrc="`basename ${src}`"; > echo ">>> Unpacking ${shrtsrc} to ${PWD}"; > local metaskip=`tail -c ${sizeoff_t} ${src} | hexdump -e \"%i\"`; > local tailskip=`tail -c $((${sizeoff_t}*2)) ${src} | head -c ${sizeoff_t} | hexdump -e \"%i\"`; > local metafile="$(emktemp)"; > tail -c +$((${metaskip}+1)) ${src} >${metafile}; > local datafile="`tail -c +$((${metaskip}+1)) ${src} | strings | head -n 1`"; > datafile="`basename ${datafile}`"; > local tmpfile="$(emktemp)"; > tail -c +$((${tailskip}+1)) ${src} 2>/dev/null | head -c 512 >${tmpfile}; > local iscompressed="`file -b ${tmpfile}`"; > if [ "${iscompressed:0:8}" == "compress" ]; then > iscompressed=1; > mv ${tmpfile}{,.Z}; > gunzip ${tmpfile}; > else > iscompressed=0; > fi; > local istar="`file -b ${tmpfile}`"; > if [ "${istar:0:9}" == "POSIX tar" ]; then > istar=1; > else > istar=0; > fi; > if [ ${iscompressed} -eq 1 ]; then > if [ ${istar} -eq 1 ]; then > tail -c +$((${tailskip}+1)) ${src} 2>/dev/null | head -c $((${metaskip}-${tailskip})) | tar -xzf -; > else > tail -c +$((${tailskip}+1)) ${src} 2>/dev/null | head -c $((${metaskip}-${tailskip})) | gzip -dc >${datafile}; > fi; > else > if [ ${istar} -eq 1 ]; then > tail -c +$((${tailskip}+1)) ${src} 2>/dev/null | head -c $((${metaskip}-${tailskip})) | tar --no-same-owner -xf -; > else > tail -c +$((${tailskip}+1)) ${src} 2>/dev/null | head -c $((${metaskip}-${tailskip})) >${datafile}; > fi; > fi; > true >} >update_config_files () >{ > if [ "${ROOT}" = "/" ]; then > einfo "Preparing any installed configuration files for font move..."; > FILES="/etc/X11/xorg.conf > /etc/X11/XF86Config-4 > /etc/X11/XF86Config > /etc/X11/fs/config"; > for FILE in ${FILES}; > do > if [ -e ${FILE} ]; then > sed "s,/usr/X11R6/$(get_libdir)/X11/fonts,/usr/share/fonts,g" ${ROOT}${FILE} >${IMAGE}${FILE}; > if [ "${FILE}" = "/etc/X11/xorg.conf" ] || [ "${FILE}" = "/etc/X11/XF86Config" ] || [ "${FILE}" = "/etc/X11/XF86Config-4" ]; then > sed -i 's~^\([ \t]*Driver[ \t]\+\)"[kK]eyboard"~\1"kbd"~' ${IMAGE}${FILE}; > sed -i "s:^.*Option.*\"XkbRules\".*$::g" ${IMAGE}${FILE}; > fi; > fi; > done; > fi >} >update_splash_wrappers () >{ > if [ -x /sbin/splash ] && ( [ ! -e /proc/version ] || [ -e /proc/version -a -e /proc/splash ] ); then > function rc_splash () > { > /sbin/splash $* > }; > function rc_splash_init () > { > splash_init $* > }; > function rc_splash_calc () > { > splash_calc $* > }; > function rc_splash_update () > { > splash_update $* > }; > function rc_splash_debug () > { > splash_debug $* > }; > else > function rc_splash () > { > return 0 > }; > function rc_splash_init () > { > return 0 > }; > function rc_splash_calc () > { > return 0 > }; > function rc_splash_update () > { > return 0 > }; > function rc_splash_debug () > { > return 0 > }; > fi; > export rc_splash rc_splash_init rc_splash_calc rc_splash_update rc_splash_debug >} >use () >{ > if useq ${1}; then > echo "${1}"; > return 0; > fi; > return 1 >} >use_build () >{ > if [ -z "$1" ]; then > echo "!!! use_build() called without a parameter." 1>&2; > echo "!!! use_build <USEFLAG> [<flagname> [value]]" 1>&2; > return; > fi; > local UWORD="$2"; > if [ -z "${UWORD}" ]; then > UWORD="$1"; > echo $UWORD; > fi; > if useq $1; then > echo "#define ${UWORD} YES" >>${HOSTCONF}; > return 0; > else > echo "#define ${UWORD} NO" >>${HOSTCONF}; > return 1; > fi >} >use_enable () >{ > if [ -z "$1" ]; then > echo "!!! use_enable() called without a parameter." 1>&2; > echo "!!! use_enable <USEFLAG> [<flagname> [value]]" 1>&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 >} >use_with () >{ > if [ -z "$1" ]; then > echo "!!! use_with() called without a parameter." 1>&2; > echo "!!! use_with <USEFLAG> [<flagname> [value]]" 1>&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 >} >useq () >{ > local u="${1}"; > local neg=0; > if [ "${u:0:1}" == "!" ]; then > u="${u:1}"; > neg=1; > fi; > local x; > for x in ${USE}; > do > if [ "${x}" == "${u}" ]; then > if [ ${neg} -eq 1 ]; then > return 1; > else > return 0; > fi; > fi; > done; > if [ ${neg} -eq 1 ]; then > return 0; > else > return 1; > fi >} >vcards () >{ > has "$1" ${VIDEO_CARDS} && return 0; > return 1 >} >wrap_rcscript () >{ > local retval=1; > local myservice="${1##*/}"; > ( echo "function test_script() {"; > cat "$1"; > echo "}" ) >"${svcdir}/${myservice}-$$"; > if source "${svcdir}/${myservice}-$$" >&/dev/null; then > test_script >&/dev/null; > retval=0; > fi; > rm -f "${svcdir}/${myservice}-$$"; > return "${retval}" >}
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 67606
:
41833
|
41834
| 41835 |
41836