diff options
43 files changed, 3178 insertions, 4 deletions
diff --git a/files/isoinitrd-20010726.packages b/files/isoinitrd-20010726.packages new file mode 100644 index 000000000000..0cec1aa3ad4c --- /dev/null +++ b/files/isoinitrd-20010726.packages @@ -0,0 +1,19 @@ +./sys-apps/baselayout/baselayout-1.5-r3.ebuild +./sys-libs/glibc/glibc-2.2.3-r4.ebuild +./sys-apps/bash/bash-2.04-r4.ebuild +./sys-apps/bzip2/bzip2-1.0.1-r4.ebuild +./sys-apps/debianutils/debianutils-1.13.3-r4.ebuild +./sys-apps/file/file-3.33-r3.ebuild +./sys-apps/fileutils/fileutils-4.1-r2.ebuild +./sys-apps/findutils/findutils-4.1-r6.ebuild +./sys-apps/gawk/gawk-3.0.6-r4.ebuild +./sys-apps/grep/grep-2.4.2-r4.ebuild +./sys-apps/gzip/gzip-1.2.4a-r4.ebuild +./sys-apps/portage/portage-1.5.2.ebuild +./sys-apps/sed/sed-3.02.80-r3.ebuild +./sys-apps/sh-utils/sh-utils-2.0j-r4.ebuild +./sys-apps/tar/tar-1.13.19-r1.ebuild +./sys-apps/textutils/textutils-2.0.10-r3.ebuild +./sys-devel/spython/spython-2.0-r6.ebuild +./net-misc/wget/wget-1.7-r1.ebuild +./net-misc/rsync/rsync-2.4.6-r4.ebuild diff --git a/net-misc/rsync/files/digest-rsync-2.4.6-r4 b/net-misc/rsync/files/digest-rsync-2.4.6-r4 new file mode 100644 index 000000000000..aba39e5e0aa3 --- /dev/null +++ b/net-misc/rsync/files/digest-rsync-2.4.6-r4 @@ -0,0 +1 @@ +MD5 2ceb5e659f257c89569664c780b6fa6c rsync-2.4.6.tar.gz diff --git a/net-misc/rsync/rsync-2.4.6-r4.ebuild b/net-misc/rsync/rsync-2.4.6-r4.ebuild new file mode 100644 index 000000000000..9d5e0fa0b1aa --- /dev/null +++ b/net-misc/rsync/rsync-2.4.6-r4.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Achim Gottinger <achim@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/net-misc/rsync/rsync-2.4.6-r4.ebuild,v 1.1 2001/07/28 15:49:20 pete Exp $ + +A=${P}.tar.gz +S=${WORKDIR}/${P} +DESCRIPTION="File transfer program to keep remote files into sync" +SRC_URI="http://rsync.samba.org/ftp/rsync/${A}" +HOMEPAGE="http://rsync.samba.org" + +DEPEND="virtual/glibc" + +src_unpack() { + unpack ${A} + cd ${S} +#change confdir to /etc/rsync rather than just /etc (the --sysconfdir configure option doesn't work + cp rsync.h rsync.h.orig + sed -e 's:RSYNCD_CONF "/etc/rsyncd.conf":RSYNCD_CONF "/etc/rsync/rsyncd.conf":g' rsync.h.orig > rsync.h +#yes, updating the man page is very important. + cp rsyncd.conf.5 rsyncd.conf.5.orig + sed -e 's:/etc/rsyncd:/etc/rsync/rsyncd:g' rsyncd.conf.5.orig > rsyncd.conf.5 +} + +src_compile() { + + try ./configure --prefix=/usr --host=${CHOST} + if [ "`use static`" ] ; then + try make LDFLAGS=\"-static\" + else + try make + fi + +} + +src_install () { + + if [ -z "`use build`" ] && [ -z "`use bootcd`" ] ; then + try make prefix=${D}/usr mandir=${D}/usr/share/man install + dodir /etc/rsync + dodoc COPYING README + else + dobin rsync + fi + +} + + diff --git a/net-misc/wget/files/digest-wget-1.7-r1 b/net-misc/wget/files/digest-wget-1.7-r1 new file mode 100644 index 000000000000..931659a99c55 --- /dev/null +++ b/net-misc/wget/files/digest-wget-1.7-r1 @@ -0,0 +1,2 @@ +MD5 c911a6b937c0a18757d3211fb62831de wget-1.7.tar.gz +MD5 89af3cfe1500f009abb40120c6b5edd6 wget-new-percentage-1.7-20010606.diff diff --git a/net-misc/wget/wget-1.7-r1.ebuild b/net-misc/wget/wget-1.7-r1.ebuild new file mode 100644 index 000000000000..629be84dfbcc --- /dev/null +++ b/net-misc/wget/wget-1.7-r1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Achim Gottinger <achim@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/net-misc/wget/wget-1.7-r1.ebuild,v 1.1 2001/07/28 15:49:20 pete Exp $ + +A="${P}.tar.gz wget-new-percentage-1.7-20010606.diff" +S=${WORKDIR}/${P} +DESCRIPTION="Network utility to retrieve files from the WWW" +SRC_URI="ftp://gatekeeper.dec.com/pub/GNU/wget/${P}.tar.gz + ftp://prep.ai.mit.edu/gnu/wget/${P}.tar.gz + http://www.biscom.net/~cade/away/wget-new-percentage/wget-new-percentage-1.7-20010606.diff" +HOMEPAGE="http://www.cg.tuwien.ac.at/~prikryl/wget.html" + +DEPEND="virtual/glibc sys-devel/perl + nls? ( sys-devel/gettext )" + +RDEPEND="virtual/glibc" + +src_unpack() { + unpack ${P}.tar.gz + cd ${S}/src + patch -p0 < ${DISTDIR}/wget-new-percentage-1.7-20010606.diff +} + +src_compile() { + local myconf + if [ -z "`use nls`" ] ; then + myconf="--disable-nls" + fi +# if [ "`use ssl`" ] ; then +# myconf="$myconf --with-ssl=/usr" +# fi + if [ -z "$DEBUG" ] ; then + myconf="$myconf --disable-debug" + fi + try ./configure --prefix=/usr --sysconfdir=/etc/wget \ + --infodir=/usr/share/info --mandir=usr/share/man $myconf + if [ "`use static`" ] ; then + try make -e LDFLAGS=\"--static\" + else + try make + fi +} + +src_install() { + + if [ "`use build`" ] || [ "`use bootcd`" ] ; then + dobin src/wget + else + try make prefix=${D}/usr sysconfdir=${D}/etc/wget \ + mandir=${D}/usr/share/man infodir=${D}/usr/share/info install + + dodoc AUTHORS COPYING ChangeLog MACHINES MAILING-LIST NEWS README TODO + dodoc doc/sample.wgetrc + fi +} + + diff --git a/scripts/autocompile.sh b/scripts/autocompile.sh new file mode 100644 index 000000000000..a8010883f505 --- /dev/null +++ b/scripts/autocompile.sh @@ -0,0 +1,135 @@ +#!/bin/sh + +# description: +# +# ROOT is the root all packages are installed to +# +# if CHECK=yes then skip an already installed package +# if CHECK=package then skip a package if its tbz2 already exists +# +# ERRQUIT=no causes the script to keep trying to build packages even +# when one has failed. +# + +C_NORMAL=$'\033[0m' +C_HILITE=$'\e[36;01m' +C_END=$'\e[A\e[68G' +C_OK=$'\e[32m' +C_NO=$'\e[31m' +#eval `/usr/lib/portage/bin/import-settings PORTDIR PKGDIR` +PORTDIR=/usr/portage +LOGDIR=${ROOT}/tmp/portage-log +PKGDIR=/usr/portage/packages +[ -z "$CHECK" ] && CHECK="yes" +[ -z "$STEPS" ] && STEPS="check fetch clean compile install qmerge clean" +[ -z "$ERRQUIT" ] && ERRQUIT="no" + +do_step() { + + local tmpd + tmpd=`pwd` + echo "$C_END $C_HILITE " + echo "$C_END $C_HILITE [$1]$C_NORMAL " + cd `dirname $myd` + ebuild $myf $1 &> $myl/$1 + mye=$? + cd $tmpd + + if [ -f $LOGDIR/$1 ] + then + cp $LOGDIR/$1 /tmp/failed + grep -v "$i" /tmp/failed > $LOGDIR/$1 + fi + + if [ $mye -ne 0 ] + then + echo "$C_END $C_HILITE " + echo "$C_END $C_NO [$1]$C_NORMAL " + echo $i >> $LOGDIR/$1 + [ "${ERRQUIT}" = "yes" ] && exit 1 + fi + return $mye +} + +if [ -z "${ROOT}" ] +then + echo "ROOT not set !" + exit 1 +fi + +mylist=${PORTDIR}/current-packages + +if [ -f "${1}" ] +then + mylist=${1} +fi + +mypackages="`grep -v "\#.*" $mylist`" + +install -m1777 -d $ROOT/tmp/portage-log + +echo "$C_HILITE>>>$C_NORMAL Building from ${mylist}..." +for i in $mypackages +do + source /etc/profile + # full path + myd=${i/.\//$PORTDIR\/} + + # file name + myf="`basename $myd`" + + # category + myc="`echo $i | sed -e "s:^\(.*\).*/.*/.*$:\1:"`" + + # package name + myp=${myf%*.ebuild} + + # debugging +# echo $myp + + if [ -f "$myd" ] + then + + # Check if installed + if [ "$CHECK" = "yes" ] + then + if [ -d ${ROOT}/var/db/pkg/$myc/$myp ] + then + continue + fi + else + if [ "$CHECK" = "package" ] + then + if [ -f ${PKGDIR}/All/$myp.tbz2 ] + then + continue + fi + fi + fi + + echo "$C_NORMAL$myp ($myc)" + + myl="$LOGDIR/$myc/$myp/" + mkdir -p $myl + + for j in ${STEPS} + do + mye=0 + do_step $j + if [ $mye -ne 0 ] + then + break + fi + done + if [ $mye -eq 0 ] + then + echo "$C_END $C_OK [OK]$C_NORMAL " + echo $i >> ${LOGDIR}/ok + fi + + else + echo "!!! $myd does not exists !" + fi + env-update &>/dev/null + +done diff --git a/scripts/autodist.sh b/scripts/autodist.sh new file mode 100644 index 000000000000..f68a6116fa03 --- /dev/null +++ b/scripts/autodist.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +TODAY=`date '+%Y%m%d'` + +# ok, this script builds: +# +# 1. the build tarball +# 2. the sys tarball +# 3. the build iso +# 4. the sys iso (with all packages) + +[ -z "${PORTDIR}" ] && PORTDIR="/usr/portage" +[ -z "${DISTRODIR}" ] && DISTRODIR="${PORTDIR}/distribution" +[ -z "${AUTODISTDIR}" ] && AUTODISTDIR="/tmp/autodist" +BUILDROOT="${AUTODISTDIR}/buildroot" +ISOROOT="${AUTODISTDIR}/isoroot" +INITRDROOT="${AUTODISTDIR}/initrdroot" +[ -z "${BUILDTARBALL}" ] && BUILDTARBALL="build-${TODAY}.tbz2" +[ -z "${SYSTARBALL}" ] && SYSTARBALL="sys-${TODAY}.tbz2" + +[ -d "${DISTRODIR}" ] || mkdir -p "${DISTRODIR}" + +[ -z "${ISOINITRD_PACKAGES}" ] && ISOINITRD_PACKAGES=`ls -1 ${PORTDIR}/files/isoinitrd-*.packages | sort | tail -1` +[ -z "${BUILD_PACKAGES}" ] && BUILD_PACKAGES=`ls -1 ${PORTDIR}/files/build-*.packages | sort | tail -1` +[ -z "${SYS_PACKAGES}" ] && SYS_PACKAGES=`ls -1 ${PORTDIR}/files/sys-*.packages | sort | tail -1` +[ -z "${KERNEL_SRC}" ] && KERNEL_SRC="/usr/src/`readlink /usr/src/linux`" +[ -z "${KERNEL_VERSION}" ] && KERNEL_VERSION="`echo ${KERNEL_SRC} | sed 's,.*-\([0-9]\.[0-9]\.[0-9]\+\(-ac[0-9]\+\)\?\)$,\1,'`" + +if grep -qs "${AUTODISTDIR}" /proc/mounts +then + cat << @@@ 1>&2 +${AUTODISTDIR} was found in /proc/mounts. If you have anything +mounted under ${AUTODISTDIR} using --bind, you should press ^C now and +unmount it, since ${AUTODISTDIR} is cleaned out by this script. (This +is probably the case if you have run this script and interrupted it +before it completed.) Note that this is just a safety precaution, and +if ${AUTODISTDIR} is a separate partition in itself, you might be OK. + +Press ENTER to continue. +@@@ + read +fi + +echo ">>> Using PORTDIR=${PORTDIR}" +echo ">>> Using AUTODISTDIR=${AUTODISTDIR}" +echo ">>> Using BUILDROOT=${BUILDROOT}" +echo ">>> Using ISOROOT=${ISOROOT}" +echo ">>> Using INITRDROOT=${INITRDROOT}" +echo ">>> Using ISOINITRD_PACKAGES=${ISOINITRD_PACKAGES}" +echo ">>> Using BUILD_PACKAGES=${BUILD_PACKAGES}" +echo ">>> Using SYS_PACKAGES=${SYS_PACKAGES}" +echo ">>> Using KERNEL_SRC=${KERNEL_SRC}" +echo ">>> Using KERNEL_VERSION=${KERNEL_VERSION}" + +echo ">>> Cleaning up ${AUTODISTDIR}..." +rm -rf ${AUTODISTDIR} + +echo ">>> Creating ISO directory tree..." +mkdir -p +mkdir -v ${ISOROOT}/{doc,gentoo{,/distfiles,/packages{,/All}},isolinux{,/kernels},stuff} + +echo ">>> Building initrd..." +mkdir -p "${INITRDROOT}" +ERRQUIT=yes CHECK=no USE=bootcd ROOT="${INITRDROOT}" STEPS="clean unpack compile install qmerge clean" ${PORTDIR}/scripts/autocompile.sh ${ISOINITRD_PACKAGES} +if [ ${?} != 0 ] +then + echo "Error building initrd, quitting" + exit 1 +fi diff --git a/scripts/autoinstaller.sh b/scripts/autoinstaller.sh new file mode 100644 index 000000000000..27d00135bb10 --- /dev/null +++ b/scripts/autoinstaller.sh @@ -0,0 +1,103 @@ +#! /bin/bash + +if [ "$ROOT" = "" ] +then + echo "Please set \$ROOT to the gentoo-linux install directory first." + exit +fi + +. ${ROOT}/etc/rc.d/config/functions +. ${ROOT}/etc/rc.d/config/runlevels +. $1 + + cp $1 ${ROOT}/var/db/pkg/install.config + +if [ -z "$NODEV" ] ; then + echo "Now setting up $OSNAME..." + echo "Creating device nodes (this takes a minute or so)..." + cd ${ROOT}/dev + ${ROOT}/usr/sbin/MAKEDEV generic-i386 + ${ROOT}/usr/sbin/MAKEDEV sg + ${ROOT}/usr/sbin/MAKEDEV scd + ${ROOT}/usr/sbin/MAKEDEV rtc +fi +echo +echo "Setting osname and architecture" +cp ${ROOT}/etc/rc.d/config/runlevels ${ROOT}/etc/rc.d/config/runlevels.orig +sed -e "s:##OSNAME##:$OSNAME:" -e "s:##ARCH##:$ARCH:" \ + ${ROOT}/etc/rc.d/config/runlevels.orig > ${ROOT}/etc/rc.d/config/runlevels +echo "OSNAME: $OSNAME" +echo "ARCH: $ARCH" +echo +echo "Now, we are getting ${ROOT}/etc/fstab set up for your root and swap partitions..." +cp ${ROOT}/etc/fstab ${ROOT}/etc/fstab.orig + + +echo "Root partition in /dev/$MYROOTPART" +echo "Swap partition in /dev/$MYSWAPPART" + +sed -e "s:#ROOT#:${MYROOTPART}:" -e "s:#SWAP#:${MYSWAPPART}:" ${ROOT}/etc/fstab.orig > ${ROOT}/etc/fstab + +echo "Generating library links and cache..." +cp ${ROOT}/etc/env.d/00basic ${ROOT}/etc/env.d/00basic.orig +sed -e "s/i686-pc-linux-gnu/$ARCH/" ${ROOT}/etc/env.d/00basic.orig > ${ROOT}/etc/env.d/00basic + +${ROOT}/usr/sbin/env-update + +case "$GMT" in + n|N|No|no) + echo "Your BIOS clock is set to localtime" + ;; + y|Y|Yes|yes) + echo "Your BIOS clock is set to GMT" + mv ${ROOT}/etc/rc.d/config/basic ${ROOT}/etc/rc.d/config/basic.bak + sed -e "s/GMT=no/GMT=yes/" ${ROOT}/etc/rc.d/config/basic.bak > ${ROOT}/etc/rc.d/config/basic + rm ${ROOT}/etc/rc.d/config/basic.bak +esac + + +echo "Keymap: $keymap" +mv ${ROOT}/etc/rc.d/config/basic ${ROOT}/etc/rc.d/config/basic.bak +sed -e "s/KEYMAP=.*/KEYMAP=\"$keymap\"/" \ + -e "s/CONSOLEFONT=.*/CONSOLEFONT=\"$consolefont\"/" \ + ${ROOT}/etc/rc.d/config/basic.bak > ${ROOT}/etc/rc.d/config/basic +mv ${ROOT}/etc/rc.d/config/basic ${ROOT}/etc/rc.d/config/basic.bak +sed -e "s/TIMED=.*/TIMED=\"$timed\"/" \ + ${ROOT}/etc/rc.d/config/basic.bak > ${ROOT}/etc/rc.d/config/basic + + +myzone="${ROOT}/usr/share/zoneinfo/$timezone" +echo "Timezone: $timezone" + + +cp ${myzone} ${ROOT}/etc/localtime + +echo "Hostname: $hostname" + +echo "$hostname" > ${ROOT}/etc/hostname +echo -n "domain " > ${ROOT}/etc/resolv.conf +echo "$hostname" | cut -f2- -d. >> ${ROOT}/etc/resolv.conf +echo "127.0.0.1 localhost" >> ${ROOT}/etc/hosts +echo "$eth0_ip ${hostname%%.*} ${hostname}" >> ${ROOT}/etc/hosts + +echo "nameserver $nameserver" >> ${ROOT}/etc/resolv.conf + +if [ -n $eth0 ] ; then + cp ${ROOT}/etc/rc.d/config/modules ${ROOT}/etc/rc.d/config/modules.orig + sed -e "s/\#eth0/$eth0/" ${ROOT}/etc/rc.d/config/modules.orig > ${ROOT}/etc/rc.d/config/modules + sed -e "s/IPNUM=.*/IPNUM=$eth0_ip/" -e "s/BCAST=.*/BCAST=$eth0_bcast/" \ + -e "s/NMASK=.*/NMASK=$eth0_mask/" -e "s/NETWK=.*/NETWK=$eth0_net/" \ + -e "s/GTWAY=.*/GTWAY=$eth0_gw/" \ + ${ROOT}/etc/rc.d/config/OFF_inet.eth0 > ${ROOT}/etc/rc.d/config/inet.eth0 +fi + +${ROOT}/etc/rc.d/init.d/initscripts-install + + + + + + + + + diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh new file mode 100755 index 000000000000..d494a364713a --- /dev/null +++ b/scripts/bootstrap.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +LIST=$1 + +myGETTEXT=`grep "sys-devel/gettext" $1` +myBINUTILS=`grep "sys-devel/binutils" $1` +myGCC=`grep "sys-devel/gcc" $1` +myGLIBC=`grep "sys-libs/glibc" $1` + +echo "Using BINUTILS $myBINUTILS" +echo "Using GCC $myGCC" +echo "Using GETTEXT $myGETTEXT" +echo "Using GLIBC $myGLIBC" + +export USE="build" +export STEPS="clean unpack compile install qmerge clean" +cd /usr/portage +ebuild $myBINUTILS $STEPS || exit +ebuild $myGCC $STEPS || exit +ebuild $myGETTEXT $STEPS || exit +unset USE +export USE="`python -c 'import portage; print portage.settings["USE"];'` bootstrap" +ebuild $myGLIBC $STEPS || exit +ebuild $myGETTEXT $STEPS || exit +ebuild $myBINUTILS $STEPS || exit +ebuild $myGCC $STEPS || exit +unset USE diff --git a/scripts/sortpkglist.py b/scripts/sortpkglist.py new file mode 100644 index 000000000000..233fbb237c59 --- /dev/null +++ b/scripts/sortpkglist.py @@ -0,0 +1,22 @@ +#!/usr/bin/env spython + +# This script will take a list of ebuild files, sort them in the order +# of their dependencies, then print them back out. (That is, for any +# given package, its dependencies will be printed out *before* the +# package itself.) Needed for the autodist.sh script. + +import portage +import sys + +digraph = portage.digraph() + +if len(sys.argv) != 2: + print 'usage: %s packagelist' % sys.argv[0] + +try: + packagelist = open(sys.argv[1], "r") +except: + sys.stderr.write("could not open %s\n" % sys.argv[1]) + sys.exit(1) + +packages = packagelist.readlines() diff --git a/sys-apps/bash/bash-2.04-r4.ebuild b/sys-apps/bash/bash-2.04-r4.ebuild new file mode 100644 index 000000000000..7e2e53740b16 --- /dev/null +++ b/sys-apps/bash/bash-2.04-r4.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Daniel Robbins <drobbins@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-apps/bash/bash-2.04-r4.ebuild,v 1.1 2001/07/28 15:49:20 pete Exp $ + +A=${P}.tar.gz +S=${WORKDIR}/${P} +DESCRIPTION="The standard GNU Bourne again shell" +SRC_URI="ftp://gatekeeper.dec.com/pub/GNU/bash/${A} + ftp://ftp.gnu.org/gnu/bash/${A}" + +HOMEPAGE="http://www.gnu.org/software/bash/bash.html" + +DEPEND=">=sys-libs/ncurses-5.2-r2 + readline? ( >=sys-libs/readline-4.1-r2 ) + tex? ( app-text/tetex ) + " +RDEPEND="virtual/glibc" + +src_compile() { + + local myconf + if [ "`use readline`" ] + then + myconf="--with-installed-readline" + fi + + if [ -z "`use nls`" ] + then + myconf="${myconf} --disable-nls" + fi + + try ./configure --prefix=/ --mandir=/usr/share/man \ + --infodir=/usr/share/info --host=${CHOST} \ + --disable-profiling --with-curses \ + --enable-static-link ${myconf} + + try pmake + + if [ "`use tex`" ] && [ -z "`use build`" ] && [ -z "`use bootcd`" ] + then + cd support + cp texi2html texi2html.orig + sed -e "s:/usr/local/bin/perl:/usr/bin/perl:" \ + texi2html.orig > texi2html + cd ../doc + try make + fi + +} + + + +src_install() { + + make prefix=${D}/usr mandir=${D}/usr/share/man \ + infodir=${D}/usr/share/info install + dodir /bin + mv ${D}/usr/bin/bash ${D}/bin + dosym bash /bin/sh + + if [ -z "`use build`" ] && [ -z "`use bootcd`" ] + then + doman doc/*.1 + + if [ -z "`use readline`" ] + then + doman doc/*.3 + fi + dodoc README NEWS AUTHORS CHANGES COMPAT COPYING Y2K + dodoc doc/FAQ doc/INTRO + + if [ "`use tex`" ] + then + docinto html + dodoc doc/*.html + docinto ps + dodoc doc/*.ps + fi + else + rm -rf ${D}/usr + fi + +} + diff --git a/sys-apps/bzip2/files/digest-bzip2-1.0.1-r4 b/sys-apps/bzip2/files/digest-bzip2-1.0.1-r4 new file mode 100644 index 000000000000..4a2d8e5861de --- /dev/null +++ b/sys-apps/bzip2/files/digest-bzip2-1.0.1-r4 @@ -0,0 +1 @@ +MD5 770135dc94369cb3eb6013ed505c8dc5 bzip2-1.0.1.tar.gz diff --git a/sys-apps/debianutils/debianutils-1.13.3-r4.ebuild b/sys-apps/debianutils/debianutils-1.13.3-r4.ebuild new file mode 100644 index 000000000000..e5fe3e532c77 --- /dev/null +++ b/sys-apps/debianutils/debianutils-1.13.3-r4.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Daniel Robbins <drobbins@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-apps/debianutils/debianutils-1.13.3-r4.ebuild,v 1.1 2001/07/28 15:49:20 pete Exp $ + +S=${WORKDIR}/${P} +DESCRIPTION="A selection of tools from Debian" +SRC_URI="ftp://ftp.debian.org/debian/dists/potato/main/source/base/debianutils_${PV}.tar.gz" + +DEPEND="virtual/glibc" + +src_unpack() { + + unpack ${A} + cd ${S} + patch -p0 < ${FILESDIR}/${P}-Makefile-gentoo.diff + +} + +src_compile() { + + if [ -z "`use static`" ] + then + try pmake + else + try pmake LDFLAGS=-static + fi +} + + +src_install() { + + into / + dobin readlink tempfile mktemp + + if [ -z "`use build`" ] && [ -z "`use bootcd`" ] + then + dobin run-parts + insopts -m755 + exeinto /usr/sbin + doexe savelog + + doman mktemp.1 readlink.1 tempfile.1 run-parts.8 savelog.8 + + cd debian + dodoc changelog control copyright + fi + +} + + + diff --git a/sys-apps/debianutils/files/digest-debianutils-1.13.3-r4 b/sys-apps/debianutils/files/digest-debianutils-1.13.3-r4 new file mode 100644 index 000000000000..30079b8cc3cd --- /dev/null +++ b/sys-apps/debianutils/files/digest-debianutils-1.13.3-r4 @@ -0,0 +1 @@ +MD5 91511bc2eec9beebb23cf22fb57a202e debianutils_1.13.3.tar.gz diff --git a/sys-apps/file/file-3.33-r3.ebuild b/sys-apps/file/file-3.33-r3.ebuild new file mode 100644 index 000000000000..d3fde78e9cc1 --- /dev/null +++ b/sys-apps/file/file-3.33-r3.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Daniel Robbins <drobbins@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/file-3.33-r3.ebuild,v 1.1 2001/07/28 15:49:20 pete Exp $ + +A=${P}.tar.gz +S=${WORKDIR}/${P} +DESCRIPTION="Program to identify a file's format by scanning binary data for patters" +#unfortunately, this ftp site doesn't support passive ftp +#maybe we can find an alternative for those behind firewalls, or mirror +#on cvs.gentoo.org +SRC_URI="ftp://ftp.astron.com/pub/file/${A}" + +DEPEND="virtual/glibc" + +src_compile() { + + try ./configure --prefix=/usr --mandir=/usr/share/man --datadir=/usr/share/misc --host=${CHOST} + if [ -z "`use static`" ] + then + try pmake + else + try pmake LDFLAGS=-static + fi +} + +src_install() { + + try make DESTDIR=${D} install + if [ -z "`use build`" ] && [ -z "`use bootcd`" ] + then + dodoc LEGAL.NOTICE MAINT README + else + rm -rf ${D}/usr/share/man + fi + +} + + + diff --git a/sys-apps/file/files/digest-file-3.33-r3 b/sys-apps/file/files/digest-file-3.33-r3 new file mode 100644 index 000000000000..9a0e1f33e262 --- /dev/null +++ b/sys-apps/file/files/digest-file-3.33-r3 @@ -0,0 +1 @@ +MD5 3b8e32ed3a79774bd92f0052fa07ca04 file-3.33.tar.gz diff --git a/sys-apps/fileutils/files/digest-fileutils-4.1-r2 b/sys-apps/fileutils/files/digest-fileutils-4.1-r2 new file mode 100644 index 000000000000..d32a4e9fe3a1 --- /dev/null +++ b/sys-apps/fileutils/files/digest-fileutils-4.1-r2 @@ -0,0 +1 @@ +MD5 2fa04ceee87e962ddf72f32a2d6b906d fileutils-4.1.tar.gz diff --git a/sys-apps/fileutils/fileutils-4.1-r2.ebuild b/sys-apps/fileutils/fileutils-4.1-r2.ebuild new file mode 100644 index 000000000000..557cd0b5a91d --- /dev/null +++ b/sys-apps/fileutils/fileutils-4.1-r2.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Achim Gottinger <achim@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-apps/fileutils/fileutils-4.1-r2.ebuild,v 1.1 2001/07/28 15:49:20 pete Exp $ + +A=${P}.tar.gz +S=${WORKDIR}/${P} +DESCRIPTION="Standard GNU file utilities (chmod, cp, dd, dir, ls, etc)" +SRC_URI="ftp://alpha.gnu.org/gnu/fetish/${A}" +HOMEPAGE="http://www.gnu.org/software/fileutils/fileutils.html" + +DEPEND="virtual/glibc + nls? ( sys-devel/gettext )" + +RDEPEND="virtual/glibc" + +src_compile() { + + local myconf + if [ -z "`use nls`" ] + then + myconf="--disable-nls" + fi + try ./configure --prefix=/usr --mandir=/usr/share/man \ + --infodir=/usr/share/info --bindir=/bin ${myconf} + if [ -z "`use static`" ] + then + try make ${MAKEOPTS} + else + try make ${MAKEOPTS} LDFLAGS=-static + fi +} + +src_install() { + + if [ -z "`use build`" ] && [ -z "`use bootcd`" ] + then + make prefix=${D}/usr mandir=${D}/usr/share/man infodir=${D}/usr/share/info bindir=${D}/bin install + cd ${D} + dodir /usr/bin + rm -rf usr/lib + cd usr/bin + ln -s ../../bin/* . + cd ${S} + dodoc COPYING NEWS README* THANKS TODO ChangeLog ChangeLog-1997 AUTHORS + else + cd ${S}/src + into / + dobin chgrp chown dd dir du ln mkdir mknod rm touch \ + chmod cp df ls mkfifo mv rmdir sync + newbin ginstall install + dosym /bin/install /usr/bin/install + fi + +} + diff --git a/sys-apps/findutils/files/digest-findutils-4.1-r6 b/sys-apps/findutils/files/digest-findutils-4.1-r6 new file mode 100644 index 000000000000..d959da1b7872 --- /dev/null +++ b/sys-apps/findutils/files/digest-findutils-4.1-r6 @@ -0,0 +1 @@ +MD5 3ea8fe58ef5386da75f6c707713aa059 findutils-4.1.tar.gz diff --git a/sys-apps/findutils/findutils-4.1-r6.ebuild b/sys-apps/findutils/findutils-4.1-r6.ebuild new file mode 100644 index 000000000000..545b85c137ce --- /dev/null +++ b/sys-apps/findutils/findutils-4.1-r6.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Daniel Robbins <drobbins@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-apps/findutils/findutils-4.1-r6.ebuild,v 1.1 2001/07/28 15:49:20 pete Exp $ + +A=${P}.tar.gz +S=${WORKDIR}/${P} +DESCRIPTION="GNU utilities to find files" +SRC_URI="ftp://gatekeeper.dec.com/pub/GNU/findutils/${A} + ftp://prep.ai.mit.edu/gnu/findutils/${A}" +HOMEPAGE="http://www.gnu.org/software/findutils/findutils.html" + +DEPEND="virtual/glibc sys-devel/gettext" +RDEPEND="virtual/glibc" + +src_unpack() { + + unpack ${A} + echo "Applying Patch..." + #using sed to apply minor patches to files + cd ${S} + + cd find + cp fstype.c fstype.c.orig + sed -e "33d" -e "34d" fstype.c.orig > fstype.c + cp parser.c parser.c.orig + sed -e "55d" parser.c.orig > parser.c + cp pred.c pred.c.orig + sed -e '29i\' -e '#define FNM_CASEFOLD (1<<4)' pred.c.orig > pred.c + cd ${S}/lib + cp nextelem.c nextelem.c.orig + sed -e "35d" nextelem.c.orig > nextelem.c + cd ${S}/xargs + cp xargs.c xargs.c.orig + sed -e "63d" -e "64d" xargs.c.orig > xargs.c +} + +src_compile() { + + try ./configure --host=${CHOST} --prefix=/usr + + # do not use pmake recursive + + if [ -z "`use static`" ] + then + try make LOCATE_DB=/var/lib/misc/locatedb \ + libexecdir=/usr/lib/find $MAKEOPTS + else + try make LOCATE_DB=/var/lib/misc/locatedb \ + libexecdir=/usr/lib/find $MAKEOPTS LDFLAGS=-static + fi +} + +src_install() { + + try make prefix=${D}/usr mandir=${D}/usr/share/man infodir=${D}/usr/share/info libexecdir=${D}/usr/lib/find \ + LOCATE_DB=${D}/var/lib/misc/locatedb install + dosed "s:TMPDIR=/usr/tmp:TMPDIR=/tmp:" usr/bin/updatedb + + rm -fr ${D}/usr/var + + if [ -z "`use build`" ] && [ -z "`use bootcd`" ] + then + dodoc COPYING NEWS README TODO ChangeLog + else + rm -fr ${D}/usr/share + fi + +} + diff --git a/sys-apps/gawk/files/digest-gawk-3.0.6-r4 b/sys-apps/gawk/files/digest-gawk-3.0.6-r4 new file mode 100644 index 000000000000..55f7d10d4a37 --- /dev/null +++ b/sys-apps/gawk/files/digest-gawk-3.0.6-r4 @@ -0,0 +1 @@ +MD5 b5ba21c033f5a9737455458d94954609 gawk-3.0.6.tar.gz diff --git a/sys-apps/gawk/gawk-3.0.6-r4.ebuild b/sys-apps/gawk/gawk-3.0.6-r4.ebuild new file mode 100644 index 000000000000..d8403962703e --- /dev/null +++ b/sys-apps/gawk/gawk-3.0.6-r4.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Daniel Robbins <drobbins@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-apps/gawk/gawk-3.0.6-r4.ebuild,v 1.1 2001/07/28 15:49:20 pete Exp $ + +A=${P}.tar.gz +S=${WORKDIR}/${P} +DESCRIPTION="GNU awk pattern-matching language" +SRC_URI="ftp://gatekeeper.dec.com/pub/GNU/gawk/${A} + ftp://prep.ai.mit.edu/gnu/gawk/${A}" +HOMEPAGE="http://www.gnu.org/software/gawk/gawk.html" +DEPEND="virtual/glibc" + +src_compile() { + + try ./configure --prefix=/usr --libexecdir=/usr/lib/awk --mandir=/usr/share/man --infodir=/usr/share/info --host=${CHOST} + if [ -z "`use static`" ] + then + try make ${MAKEOPTS} + else + try make ${MAKEOPTS} LDFLAGS=-static + fi + +} + +src_install() { + + try make prefix=${D}/usr mandir=${D}/usr/share/man/man1 infodir=${D}/usr/share/info libexecdir=${D}/usr/lib/awk install + + if [ -z "`use build`" ] && [ -z "`use bootcd`" ] + then + dosym gawk.1.gz /usr/share/man/man1/awk.1.gz + dodoc ChangeLog ACKNOWLEDGMENT COPYING FUTURES + dodoc LIMITATIONS NEWS PROBLEMS README + docinto README_d + dodoc README_d/* + docinto atari + dodoc atari/ChangeLog atari/README.1st + docinto awklib + dodoc awklib/ChangeLog + docinto pc + dodoc pc/ChangeLog + docinto posix + dodoc posix/ChangeLog + else + rm -rf ${D}/usr/share/man ${D}/usr/share/info + fi + +} + + + diff --git a/sys-apps/grep/files/digest-grep-2.4.2-r4 b/sys-apps/grep/files/digest-grep-2.4.2-r4 new file mode 100644 index 000000000000..10f2f727a071 --- /dev/null +++ b/sys-apps/grep/files/digest-grep-2.4.2-r4 @@ -0,0 +1 @@ +MD5 8ec9a2e875cd3aaa89896a8f39249f58 grep-2.4.2.tar.gz diff --git a/sys-apps/grep/grep-2.4.2-r4.ebuild b/sys-apps/grep/grep-2.4.2-r4.ebuild new file mode 100644 index 000000000000..5c788728afab --- /dev/null +++ b/sys-apps/grep/grep-2.4.2-r4.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Daniel Robbins <drobbins@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-apps/grep/grep-2.4.2-r4.ebuild,v 1.1 2001/07/28 15:49:20 pete Exp $ + +A=${P}.tar.gz +S=${WORKDIR}/${P} +DESCRIPTION="GNU regular expression matcher" +SRC_URI="ftp://gatekeeper.dec.com/pub/GNU/grep/${A} + ftp://prep.ai.mit.edu/gnu/grep/${A}" +HOMEPAGE="http://www.gnu.org/software/grep/grep.html" + +DEPEND="virtual/glibc + nls? ( sys-devel/gettext )" + +RDEPEND="virtual/glibc" + +src_compile() { + + local myconf + if [ -z "`use nls`" ] + then + myconf="--disable-nls" + fi + try ./configure --prefix=/usr --mandir=/usr/share/man \ + --infodir=/usr/share/info --host=${CHOST} ${myconf} + + if [ -z "`use static`" ] + then + try make ${MAKEOPTS} + else + try make LDFLAGS=-static ${MAKEOPTS} + fi +} + +src_install() { + + try make prefix=${D}/usr mandir=${D}/usr/share/man infodir=${D}/usr/share/info install + + if [ -z "`use build`" ] && [ -z "`use bootcd`" ] + then + dodoc AUTHORS COPYING ChangeLog NEWS README THANKS TODO + else + rm -rf ${D}/usr/share + fi + +} + + + diff --git a/sys-apps/gzip/files/digest-gzip-1.2.4a-r4 b/sys-apps/gzip/files/digest-gzip-1.2.4a-r4 new file mode 100644 index 000000000000..60ae475bc42e --- /dev/null +++ b/sys-apps/gzip/files/digest-gzip-1.2.4a-r4 @@ -0,0 +1 @@ +MD5 39053e044b18ecd0627f80fbe7cfeaad gzip-1.2.4a.tar.gz diff --git a/sys-apps/gzip/gzip-1.2.4a-r4.ebuild b/sys-apps/gzip/gzip-1.2.4a-r4.ebuild new file mode 100644 index 000000000000..633101a22282 --- /dev/null +++ b/sys-apps/gzip/gzip-1.2.4a-r4.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Daniel Robbins <drobbins@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-apps/gzip/gzip-1.2.4a-r4.ebuild,v 1.1 2001/07/28 15:49:20 pete Exp $ + +A=${P}.tar.gz +S=${WORKDIR}/${P} +DESCRIPTION="Standard GNU compressor" +SRC_URI="ftp://gatekeeper.dec.com/pub/GNU/gzip/${A} + ftp://prep.ai.mit.edu/gnu/gzip/${A}" +HOMEPAGE="http://www.gnu.org/software/gzip/gzip.html" + +DEPEND="virtual/glibc nls? ( sys-devel/gettext )" +RDEPEND="virtual/glibc" + +src_compile() { + + local myconf + if [ -z "`use nls`" ] + then + myconf="--disable-nls" + fi + + try ./configure --host=${CHOST} --prefix=/usr --exec-prefix=/ \ + --mandir=/usr/share/man --infodir=/usr/share/info ${myconf} + + if [ -z "`use static`" ] + then + try pmake + else + try pmake LDFLAGS=-static ${MAKEOPTS} + fi +} + +src_install() { + + dodir /usr/bin /usr/share/man/man1 + try make prefix=${D}/usr exec_prefix=${D}/ mandir=${D}/usr/share/man/man1 infodir=${D}/usr/share/info install + + cd ${D}/bin + for i in gzexe zforce zgrep zmore znew zcmp + do + cp ${i} ${i}.orig + sed -e "1d" -e "s:${D}::" ${i}.orig > ${i} + rm ${i}.orig + chmod 755 ${i} + done + + if [ -z "`use build`" ] && [ -z "`use bootcd`" ] + then + cd ${D}/usr/share/man/man1 + + for i in gzexe gzip zcat zcmp zdiff zforce \ + zgrep zmore znew + do + rm ${i}.1 + ln -s gunzip.1.gz ${i}.1.gz + done + + cd ${S} + rm -rf ${D}/usr/man ${D}/usr/lib + + dodoc ChangeLog COPYING NEWS README THANKS TODO + docinto txt + dodoc algorithm.doc gzip.doc + else + rm -rf ${D}/usr + fi +} + + + + diff --git a/sys-apps/portage/portage-1.5.2.ebuild b/sys-apps/portage/portage-1.5.2.ebuild index 4e50d1dc99f3..604f1ce8da24 100644 --- a/sys-apps/portage/portage-1.5.2.ebuild +++ b/sys-apps/portage/portage-1.5.2.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2001 Gentoo Technologies, Inc. Distributed under the terms # of the GNU General Public License, v2 or later # Author Daniel Robbins <drobbins@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-1.5.2.ebuild,v 1.1 2001/06/19 21:18:14 drobbins Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-1.5.2.ebuild,v 1.2 2001/07/28 15:49:20 pete Exp $ S=${WORKDIR}/${P} DESCRIPTION="Portage autobuild system" @@ -51,7 +51,7 @@ src_install() { dosym /usr/lib/portage/bin/tbz2tool /usr/bin/tbz2tool dosym newins /usr/lib/portage/bin/donewins - if [ -z "`use build`" ] + if [ -z "`use build`" ] && [ -z "`use bootcd`" ] then #man pages doman ${FILESDIR}/${PPV}/man/*.[15] diff --git a/sys-apps/sed/files/digest-sed-3.02.80-r3 b/sys-apps/sed/files/digest-sed-3.02.80-r3 new file mode 100644 index 000000000000..c2922128b256 --- /dev/null +++ b/sys-apps/sed/files/digest-sed-3.02.80-r3 @@ -0,0 +1 @@ +MD5 3bf4f42bc0a5f9345a7586a73be3df79 sed-3.02.80.tar.gz diff --git a/sys-apps/sed/sed-3.02.80-r3.ebuild b/sys-apps/sed/sed-3.02.80-r3.ebuild new file mode 100644 index 000000000000..c35d128af82a --- /dev/null +++ b/sys-apps/sed/sed-3.02.80-r3.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Daniel Robbins <drobbins@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-apps/sed/sed-3.02.80-r3.ebuild,v 1.1 2001/07/28 15:49:20 pete Exp $ + +A=${P}.tar.gz +S=${WORKDIR}/${P} +DESCRIPTION="Super-useful stream editor" +SRC_URI="ftp://alpha.gnu.org/pub/gnu/sed/${A}" + +DEPEND="virtual/glibc + nls? ( sys-devel/gettext )" + +RDEPEND="virtual/glibc" + +src_compile() { + + local myconf + if [ -z "`use nls`" ] + then + myconf="--disable-nls" + fi + try ./configure --prefix=/usr --host=${CHOST} ${myconf} + if [ -z "`use static`" ] + then + try make ${MAKEOPTS} + else + try make ${MAKEOPTS} LDFLAGS=-static + fi +} + +src_install() { + + into / + dobin sed/sed + dodir /usr/bin + dosym ../../bin/sed /usr/bin/sed + + if [ -z "`use build`" ] && [ -z "`use bootcd`" ] + then + into /usr + doinfo doc/sed.info + doman doc/sed.1 + dodoc COPYING NEWS README* THANKS TODO AUTHORS BUGS ANNOUNCE + else + rm -rf ${D}/usr/share + fi + +} + diff --git a/sys-apps/sh-utils/files/digest-sh-utils-2.0j-r4 b/sys-apps/sh-utils/files/digest-sh-utils-2.0j-r4 new file mode 100644 index 000000000000..bc4f2b097953 --- /dev/null +++ b/sys-apps/sh-utils/files/digest-sh-utils-2.0j-r4 @@ -0,0 +1 @@ +MD5 82087d6cc313189c312a0cf8ef875a2c sh-utils-2.0j.tar.gz diff --git a/sys-apps/sh-utils/sh-utils-2.0j-r4.ebuild b/sys-apps/sh-utils/sh-utils-2.0j-r4.ebuild new file mode 100644 index 000000000000..c2853ea08510 --- /dev/null +++ b/sys-apps/sh-utils/sh-utils-2.0j-r4.ebuild @@ -0,0 +1,66 @@ + +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Achim Gottinger <achim@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-apps/sh-utils/sh-utils-2.0j-r4.ebuild,v 1.1 2001/07/28 15:49:20 pete Exp $ + +A=${P}.tar.gz +S=${WORKDIR}/${P} +DESCRIPTION="Your standard GNU shell utilities" +SRC_URI="ftp://alpha.gnu.org/gnu/fetish/${A}" + +DEPEND="virtual/glibc + nls? ( sys-devel/gettext )" + +RDEPEND="virtual/glibc" + +src_unpack() { + + unpack ${A} + cd ${S} + patch -p0 < ${FILESDIR}/${P}-src-sys2.h-gentoo.diff +} + +src_compile() { + + local myconf + if [ -z "`use nls`" ] + then + myconf="--disable-nls" + fi + + try CFLAGS=\"${CFLAGS}\" ./configure --host=${CHOST} --build=${CHOST} \ + --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info \ + --without-included-regex ${myconf} + + if [ -z "`use static`" ] + then + try make ${MAKEOPTS} + else + try make ${MAKEOPTS} LDFLAGS=-static + fi +} + +src_install() { + + try make prefix=${D}/usr mandir=${D}/usr/share/man infodir=${D}/usr/share/info install + rm -rf ${D}/usr/lib + dodir /bin + cd ${D}/usr/bin + mv date echo false pwd stty su true uname ${D}/bin + + if [ -z "`use build`" ] && [ -z "`use bootcd`" ] + then + # We must use hostname from net-base + rm hostname + cd ${S} + dodoc AUTHORS COPYING ChangeLog ChangeLog.0 \ + NEWS README THANKS TODO + else + rm -rf ${D}/usr/lib ${D}/usr/share + fi + +} + + + diff --git a/sys-apps/tar/files/digest-tar-1.13.19-r1 b/sys-apps/tar/files/digest-tar-1.13.19-r1 new file mode 100644 index 000000000000..5c266195c6f9 --- /dev/null +++ b/sys-apps/tar/files/digest-tar-1.13.19-r1 @@ -0,0 +1 @@ +MD5 ff10ade59f5b312869ffb2f229177e14 tar-1.13.19.tar.gz diff --git a/sys-apps/tar/tar-1.13.19-r1.ebuild b/sys-apps/tar/tar-1.13.19-r1.ebuild new file mode 100644 index 000000000000..aed64224a93d --- /dev/null +++ b/sys-apps/tar/tar-1.13.19-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Achim Gottinger <achim@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-apps/tar/tar-1.13.19-r1.ebuild,v 1.1 2001/07/28 15:49:20 pete Exp $ + +A=${P}.tar.gz +S=${WORKDIR}/${P} + +DESCRIPTION="Use this to try make tarballs :)" +SRC_URI="ftp://alpha.gnu.org/gnu/tar/"${A} +HOMEPAGE="http://www.gnu.org/software/tar/" + +DEPEND="virtual/glibc + nls? ( sys-devel/gettext-0.10.35 )" + +RDEPEND="virtual/glibc" + +src_unpack() { + unpack ${A} + cd ${S}/src + patch -p0 < ${FILESDIR}/tar-1.13.19.patch +} + +src_compile() { + + local myconf + if [ -z "`use nls`" ] + then + myconf="--disable-nls" + fi + try ./configure --prefix=/usr --bindir=/bin --libexecdir=/usr/lib/misc \ + --infodir=/usr/share/info --host=${CHOST} ${myconf} + + if [ -z "`use static`" ] + then + try make ${MAKEOPTS} + else + try make ${MAKEOPTS} LDFLAGS=-static + fi +} + +src_install() { + try make DESTDIR=${D} install + #FHS 2.1 stuff + dodir /usr/sbin + cd ${D} + mv usr/lib/misc/rmt usr/sbin/rmt.gnu + dosym rmt.gnu /usr/sbin/rmt + if [ -z "`use build`" ] && [ -z "`use bootcd`" ] + then + dodoc AUTHORS ChangeLog* COPYING NEWS README* PORTS THANKS + + #we're using Schilly's enhanced rmt command included with star +# rm -rf ${D}/usr/lib + else + rm -rf ${D}/usr/share + fi + +} + + diff --git a/sys-apps/textutils/files/digest-textutils-2.0.10-r3 b/sys-apps/textutils/files/digest-textutils-2.0.10-r3 new file mode 100644 index 000000000000..1c652739479f --- /dev/null +++ b/sys-apps/textutils/files/digest-textutils-2.0.10-r3 @@ -0,0 +1 @@ +MD5 420a7cd54d4ce4b44c412af1318f7c83 textutils-2.0.10.tar.gz diff --git a/sys-apps/textutils/textutils-2.0.10-r3.ebuild b/sys-apps/textutils/textutils-2.0.10-r3.ebuild new file mode 100644 index 000000000000..0b674e1dd85d --- /dev/null +++ b/sys-apps/textutils/textutils-2.0.10-r3.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Daniel Robbins <drobbins@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-apps/textutils/textutils-2.0.10-r3.ebuild,v 1.1 2001/07/28 15:49:20 pete Exp $ + +A=${P}.tar.gz +S=${WORKDIR}/${P} +DESCRIPTION="Standard GNU text utilities" +SRC_URI="ftp://alpha.gnu.org/gnu/fetish/${A}" + +DEPEND="virtual/glibc + nls? ( sys-devel/gettext )" + +RDEPEND="virtual/glibc" + +src_compile() { + + local myconf + if [ -z "`use nls`" ] + then + myconf="--disable-nls" + fi + try ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info \ + --host=${CHOST} --build=${CHOST} --without-included-regex ${myconf} + + if [ -z "`use static`" ] + then + try make ${MAKEOPTS} + else + try make ${MAKEOPTS} LDFLAGS=-static + fi +} + +src_install() { + + try make prefix=${D}/usr mandir=${D}/usr/share/man infodir=${D}/usr/share/info install + dodir /bin + mv ${D}/usr/bin/cat ${D}/bin + dosym /bin/cat /usr/bin/cat + rmdir ${D}/usr/lib + + if [ -z "`use build`" ] && [ -z "`use bootcd`" ] + then + dodoc AUTHORS COPYING ChangeLog NEWS README* THANKS TODO + else + rm -rf ${D}/usr/share + fi + +} diff --git a/sys-apps/util-linux/util-linux-2.11g.ebuild b/sys-apps/util-linux/util-linux-2.11g.ebuild index aaa41483fb5c..16ae5152585c 100644 --- a/sys-apps/util-linux/util-linux-2.11g.ebuild +++ b/sys-apps/util-linux/util-linux-2.11g.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2000 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Author Daniel Robbins <drobbins@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.11g.ebuild,v 1.1 2001/07/10 06:46:44 drobbins Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.11g.ebuild,v 1.2 2001/07/28 15:49:20 pete Exp $ S=${WORKDIR}/${P} DESCRIPTION="Various useful Linux utilities" @@ -17,7 +17,7 @@ src_unpack() { unpack ${P}.tar.gz cd ${S} cp MCONFIG MCONFIG.orig - sed -e "s:-pipe -O2 $(CPUOPT) -fomit-frame-pointer:${CFLAGS}:" \ + sed -e "s:-pipe -O2 \$(CPUOPT) -fomit-frame-pointer:${CFLAGS}:" \ -e "s:CPU=.*:CPU=${CHOST%%-*}:" \ -e "s:HAVE_PAM=no:HAVE_PAM=yes:" \ -e "s:HAVE_SLN=no:HAVE_SLN=yes:" \ diff --git a/sys-devel/spython/files/digest-spython-2.0-r6 b/sys-devel/spython/files/digest-spython-2.0-r6 new file mode 100644 index 000000000000..d5edd17f12a5 --- /dev/null +++ b/sys-devel/spython/files/digest-spython-2.0-r6 @@ -0,0 +1,2 @@ +MD5 4751f4619eda0b5ade9d9dd017e7c1ef BeOpen-Python-2.0.tar.bz2 +MD5 7c99113a11b03599d8494638f6d90b56 python-fchksum-1.1.tar.gz diff --git a/sys-kernel/linux-extras/linux-extras-2.4.6-r1.ebuild b/sys-kernel/linux-extras/linux-extras-2.4.6-r1.ebuild new file mode 100644 index 000000000000..65f392eb9b43 --- /dev/null +++ b/sys-kernel/linux-extras/linux-extras-2.4.6-r1.ebuild @@ -0,0 +1,449 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Daniel Robbins <drobbins@gentoo.org> +# /home/cvsroot/gentoo-x86/sys-kernel/linux/linux-2.4.4.3.ebuild,v 1.1 2001/05/02 14:31:06 achim Exp + +#OKV=original kernel version, KV=patched kernel version + +OKV=2.4.6 +KV=2.4.6 +S=${WORKDIR}/linux-${KV} +S2=${WORKDIR}/linux-${KV}-extras +if [ $PN = "linux-extras" ] || [ $PN = "linux-headers" ] +then + KS=/usr/src/linux-${KV} + KS2=/usr/src/linux-${KV}-extras +else + KS=${S} + KS2=${S2} +fi + +# Kernel Features Enabled USE Variable Status +# +# Reiserfs Y - Production-ready +# JFS N jfs Testing-only (commented out for now) +# LVM Y lvm almost production-ready (still has race conditions during pvmove) +# ext3 Y ext3 Production-ready +# MOSIX Y mosix Testing only +# XFS N xfs Will add soon +# PCMCIA-CS N pcmcia Need to move this to its own ebuild +# lm-sensors N lm_sensors Need to move this to its own ebuild + +LVMV=0.9.1_beta7 +EXT3V=2.4-0.9.2-246 +MOSV=1.1.0 +CLOOPV=0.6 +CLOOPAV=0.60-1 +# AV=0.5.11 +#JFSV=1.0.0 +#KNV="6.g" +#PIV="1.d" +#PCV="3.1.27" + +[ "${PN}" = "linux" ] && DESCRIPTION="Linux kernel version ${KV}, including modules, binary tools, libraries and includes" +[ "${PN}" = "linux-sources" ] && DESCRIPTION="Linux kernel version ${KV} - full sources" +[ "${PN}" = "linux-extras" ] && DESCRIPTION="Linux kernel support tools and libraries" + +# We use build in /usr/src/linux in case of linux-extras +# so we need no sources +if [ ! "${PN}" = "linux-extras" ] ; then +SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2 + http://www.zip.com.au/~akpm/ext3-${EXT3V}.gz + http://oss.software.ibm.com/developerworks/opensource/jfs/project/pub/jfs-1.0.0-patch.tar.gz + ftp://ftp.cs.huji.ac.il/users/mosix/MOSIX-${MOSV}.tar.gz + ftp://ftp.sistina.com/pub/LVM/0.9.1_beta/lvm_${LVMV}.tar.gz + http://www.knopper.net/download/knoppix/cloop_${CLOOPAV}.tar.gz" +fi +# http://www.netroedge.com/~lm78/archive/lm_sensors-${SENV}.tar.gz +# http://www.netroedge.com/~lm78/archive/i2c-${SENV}.tar.gz +# http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-${PCV}.tar.gz + +if [ "$PN" != "linux-extras" ] +then + PROVIDE="virtual/kernel" +fi + +HOMEPAGE="http://www.kernel.org/ + http://www.netroedge.com/~lm78/ + http://www.namesys.com + http://www.sistina.com/lvm/" + +DEPEND=">=sys-apps/modutils-2.4.2 sys-devel/perl" +#these deps are messed up; fix 'em and add ncurses (required my mosix compile, menuconfig) +if [ $PN = "linux" ] +then + RDEPEND="mosix? ( ~sys-apps/mosix-user-${MOSV} ) >=sys-apps/e2fsprogs-1.22 >=sys-apps/util-linux-2.11f >=sys-apps/reiserfs-utils-3.6.25-r1" +elif [ $PN = "linux-sources" ] +then + if [ "`use build`" ] + then + DEPEND="" + RDEPEND="" + else + #ncurses is required for "make menuconfig" + RDEPEND=">=sys-libs/ncurses-5.2" + fi +elif [ $PN = "linux-extras" ] || [ $PN = "linux-headers" ] +then + #linux-extras/headers requires a rev of the current kernel sources to be installed + DEPEND="~sys-kernel/linux-sources-${PV}" +fi + +# this is not pretty... +LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I${S}/include" + +src_unpack() { + if [ "$PN" = "linux-extras" ] || [ "$PN" = "linux-headers" ] + then + return + fi + + mkdir ${S2} + + #unpack kernel and apply reiserfs-related patches + cd ${WORKDIR} + unpack linux-${OKV}.tar.bz2 + try mv linux linux-${KV} + cd ${S} + if [ "$KV" != "$OKV" ] + then + echo "Applying ${KV} patch..." + try bzip2 -dc ${DISTDIR}/patch-${KV}.bz2 | patch -p1 + fi +# This patch is just *too* unweildy and creates tons of rejects all over the place (boo!) +# echo "Applying XFS patch..." +# local x +# for x in easy only tricky acl-extattr misc +# do +# cat ${DISTDIR}/patch-2.4.6-xfs-${x}.bz2 | bzip2 -d | patch -p1 +# done + + dodir /usr/src/linux-${KV}-extras + + if [ "`use mosix`" ] + then + echo "Applying MOSIX patch..." + cd ${S2} + mkdir MOSIX-${MOSV} + cd MOSIX-${MOSV} + tar xzf MOSIX-${MOSV}.tar.gz patches.${OKV} kernel.new.${OKV}.tar + cd ${S} + try cat ${S2}/MOSIX-${MOSV}/patches.2.4.6 | patch -p0 + tar -x --no-same-owner -vf ${S2}/MOSIX-${MOSV}/kernel.new.2.4.6.tar + fi + + cd ${S} + echo "Applying reiserfs-NFS fix..." + try cat ${FILESDIR}/2.4.6/linux-2.4.6-reiserfs-NFS.patch | patch -N -p1 + + if [ "`use lvm`" ] + then + #create and apply LVM patch. The tools get built later. + cd ${S2} + echo "Unpacking and applying LVM patch..." + unpack lvm_${LVMV}.tar.gz + try cd LVM/${LVMV} + + # I had to hack this in so that LVM will look in the current linux + # source directory instead of /usr/src/linux for stuff - pete + try CFLAGS=\""${CFLAGS} -I${S}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${S}" + cd PATCHES + try make KERNEL_VERSION=${KV} KERNEL_DIR=${S} + cd ${S} + # the -l option allows this patch to apply cleanly (ignore whitespace changes) + try patch -l -p1 < ${S2}/LVM/${LVMV}/PATCHES/lvm-${LVMV}-${KV}.patch + cd ${S}/drivers/md + try patch -p0 < ${FILESDIR}/${KV}/lvm.c.diff + fi + +# if [ "`use lm_sensors`" ] +# then +# #unpack and apply the lm_sensors patch +# echo "Unpacking and applying lm_sensors patch..." +# cd ${S}/extras +# unpack lm_sensors-${SENV}.tar.gz +# unpack i2c-${SENV}.tar.gz +# try cd i2c-${SENV} +# try rmdir src +# try ln -s ../.. src +# try mkpatch/mkpatch.pl . /usr/src/linux | patch -p1 -E -d /usr/src/linux +# cp Makefile Makefile.orig +# try sed -e \"s:^LINUX=.*:LINUX=src:\" \ +# -e \"s/^COMPILE_KERNEL.*/COMPILE_KERNEL := 2/\" \ +# -e \"s:^I2C_HEADERS.*:I2C_HEADERS=.i2c-src/kernel:\" \ +# -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \ +# -e \"s#^PREFIX.*#PREFIX := /usr#\" \ +# -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \ +# Makefile.orig > Makefile +# try cd ${S}/extras/lm_sensors-${SENV} +# try rmdir src +# try ln -s ../.. src +# try ln -s ../i2c-${SENV} i2c-src +# try mkpatch/mkpatch.pl . /usr/src/linux | patch -p1 -E -d /usr/src/linux +# try sed -e \"s:^LINUX=.*:LINUX=src:\" \ +# -e \"s/^COMPILE_KERNEL.*/COMPILE_KERNEL := 2/\" \ +# -e \"s:^I2C_HEADERS.*:I2C_HEADERS=.i2c-src/kernel:\" \ +# -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \ +# -e \"s#^PREFIX.*#PREFIX := /usr#\" \ +# -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \ +# Makefile.orig > Makefile +# fi +# if [ "`use pcmcia-cs`" ] +# then +# echo "Unpacking pcmcia-cs tools..." +# cd ${S2} +# unpack pcmcia-cs-${PCV}.tar.gz + # patch -p0 < ${FILESDIR}/${KV}/pcmcia-cs-${PCV}-gentoo.diff +# fi + + #JFS patch works; commented out because it's not ready for production use + #if [ "`use jfs`" ] + #then + # echo "Applying JFS patch..." + # cd ${WORKDIR} + # unpack jfs-${JFSV}-patch.tar.gz + # cd ${S} + # patch -p1 < ${WORKDIR}/jfs-common-v1.0.0-patch + # patch -p1 < ${WORKDIR}/jfs-2.4.5-v1.0.0-patch + #fi + + if [ "`use ext3`" ] + then + echo "Applying ext3 patch..." + if [ "`use mosix`" ] + then + echo + echo "There will be one reject; we will fix it. (no worries)" + echo + fi + cd ${S} + gzip -dc ${DISTDIR}/ext3-${EXT3V}.gz | patch -l -p1 + if [ "`use mosix`" ] + then + echo + echo "Fixing reject in include/linux/sched.h..." + echo + cp ${FILESDIR}/${KV}/sched.h include/linux + fi + fi + + cd ${S2} + unpack cloop_${CLOOPAV}.tar.gz + + #get sources ready for compilation or for sitting at /usr/src/linux + echo "Preparing for compilation..." + cd ${S} + #sometimes we have icky kernel symbols; this seems to get rid of them + try make mrproper + + #linux-sources needs to be fully configured, too. Not just linux + #this is the configuration for the default kernel + try cp ${FILESDIR}/${KV}/config.bootcd .config + try yes \"\" \| make oldconfig + echo "Ignore any errors from the yes command above." + + #fix silly permissions in tarball + cd ${WORKDIR} + chown -R 0.0 * + chmod -R a+r-w+X,u+w * +} + +src_compile() { + if [ "${PN}" = "linux-sources" ] || [ "${PN}" = "linux-headers" ] + then + cd ${KS} + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep + else + if [ $PN = "linux" ] + then + cd ${KS} + try make symlinks + fi + if [ "`use lvm`" ] + then + #LVM tools are included in the linux and linux-extras pakcages + cd ${KS2}/LVM/${LVMV} + + # This is needed for linux-extras + if [ -f "Makefile" ] + then + try make clean + fi + # I had to hack this in so that LVM will look in the current linux + # source directory instead of /usr/src/linux for stuff - pete + try CFLAGS=\""${CFLAGS} -I${KS}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${KS}" + try make + fi + +# if [ "`use lm_sensors`" ] +# then +# cd ${KS}/extras/lm_sensors-${SENV} +# try make +# fi + +# Works, just commented out because JFS isn't ready to be used by non-developers +# if [ "`use jfs`" ] +# then +# cd ${S}/fs/jfs/utils +# try make +# cd output +# into / +# dosbin * +# doman `find -iname *.8` +# fi + + if [ "$PN" == "linux" ] + then + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" bzImage + #LEX=\""flex -l"\" bzImage + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" modules + #LEX=\""flex -l"\" modules + fi + +# if [ "`use pcmcia-cs`" ] +# then +# cd ${KS2}/pcmcia-cs-${PCV} +# # This is needed for linux-extras +# if [ -f "Makefile" ] +# then +# try make clean +# fi +# try ./Configure -n --kernel=${KS} --moddir=/lib/modules/${KV} \ +# --notrust --cardbus --nopnp --noapm --srctree --sysv --rcdir=/etc/rc.d/ +# try make all +# fi + + cd ${KS2}/cloop-${CLOOPV} + make KERNEL_DIR=${KS} + fi +} + +src_install() { + if [ "${PN}" = "linux" ] || [ "${PN}" = "linux-extras" ] + then + dodir /usr/lib + + if [ "`use lvm`" ] + then + cd ${KS2}/LVM/${LVMV}/tools + + try CFLAGS=\""${CFLAGS} -I${KS}/include"\" make install -e prefix=${D} mandir=${D}/usr/share/man \ + sbindir=${D}/sbin libdir=${D}/lib + #no need for a static library in /lib + mv ${D}/lib/*.a ${D}/usr/lib + fi + +# if [ "`use lm_sensors`" ] +# then +# echo "Install sensor tools..." +# #install sensors tools +# cd ${KS}/extras/lm_sensors-${SENV} +# make install +# fi + + if [ "${PN}" = "linux" ] + then + dodir /usr/src/linux-${KV} + cd ${D}/usr/src + #grab includes and documentation only + echo ">>> Copying includes and documentation..." + cp -ax ${S}/include ${D}/usr/src/linux-${KV} + cp -ax ${S}/Documentation ${D}/usr/src/linux-${KV} + + #grab compiled kernel + dodir /boot/boot + insinto /boot/boot + cd ${S} + doins arch/i386/boot/bzImage + + #grab modules + # Do we have a bug in modutils ? + # Meanwhile we use this quick fix (achim) + + install -d ${D}/lib/modules/`uname -r` + try make INSTALL_MOD_PATH=${D} modules_install + + cd ${S} + depmod -b ${D} -F ${S}/System.map ${KV} + #rm -rf ${D}/lib/modules/`uname -r` + #fix symlink + cd ${D}/lib/modules/${KV} + rm build + ln -sf /usr/src/linux-${KV} build + fi + +# if [ "`use pcmcia-cs`" ] +# then +# #install PCMCIA modules and utilities +# cd ${KS2}/pcmcia-cs-${PCV} +# try make PREFIX=${D} MANDIR=${D}/usr/share/man install +# rm -rf ${D}/etc/rc.d +# exeinto /etc/rc.d/init.d +# doexe ${FILESDIR}/${KV}/pcmcia +# fi + + cd ${KS2}/cloop-${CLOOPV} + insinto /lib/modules/${KV}/kernel/drivers/block + doins cloop.o + into /usr + dobin create_compressed_fs extract_compressed_fs + + elif [ "$PN" = "linux-sources" ] + then + dodir /usr/src + cd ${S} + + if [ "`use build`" ] ; then + dodir /usr/src/linux-${KV} + #grab includes and documentation only + echo ">>> Copying includes..." + cp -ax ${S}/include ${D}/usr/src/linux-${KV} + else + echo ">>> Copying sources..." + cp -ax ${WORKDIR}/* ${D}/usr/src + fi + elif [ "$PN" = "linux-headers" ] + then + #the linux-headers package basically takes a "snapshot" of your current linux headers + dodir /usr/include/linux + cp -ax ${KS}/include/linux/* ${D}/usr/include/linux + dodir /usr/include/asm + cp -ax ${KS}/include/asm-i386/* ${D}/usr/include/asm + fi + if [ -d ${D}/usr/src/linux-${KV} ] + then + #don't overwrite existing .config if present + cd ${D}/usr/src/linux-${KV} + if [ -e .config ] + then + cp -a .config .config.eg + fi + fi +} + +pkg_preinst() { + if [ "$PN" = "linux-headers" ] + then + if [ -L ${ROOT}usr/include/linux ] + then + rm ${ROOT}usr/include/linux + fi + if [ -L ${ROOT}usr/include/asm ] + then + rm ${ROOT}usr/include/asm + fi + fi +} + +pkg_postinst() { + rm -f ${ROOT}/usr/src/linux + ln -sf linux-${KV} ${ROOT}/usr/src/linux + + #copy over our .config if one isn't already present + cd ${ROOT}/usr/src/linux-${KV} + if [ "${PN}" = "linux-sources" ] && [ -e .config.eg ] && [ ! -e .config ] + then + cp -a .config.eg .config + fi +} diff --git a/sys-kernel/linux-headers/linux-headers-2.4.6-r1.ebuild b/sys-kernel/linux-headers/linux-headers-2.4.6-r1.ebuild new file mode 100644 index 000000000000..65f392eb9b43 --- /dev/null +++ b/sys-kernel/linux-headers/linux-headers-2.4.6-r1.ebuild @@ -0,0 +1,449 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Daniel Robbins <drobbins@gentoo.org> +# /home/cvsroot/gentoo-x86/sys-kernel/linux/linux-2.4.4.3.ebuild,v 1.1 2001/05/02 14:31:06 achim Exp + +#OKV=original kernel version, KV=patched kernel version + +OKV=2.4.6 +KV=2.4.6 +S=${WORKDIR}/linux-${KV} +S2=${WORKDIR}/linux-${KV}-extras +if [ $PN = "linux-extras" ] || [ $PN = "linux-headers" ] +then + KS=/usr/src/linux-${KV} + KS2=/usr/src/linux-${KV}-extras +else + KS=${S} + KS2=${S2} +fi + +# Kernel Features Enabled USE Variable Status +# +# Reiserfs Y - Production-ready +# JFS N jfs Testing-only (commented out for now) +# LVM Y lvm almost production-ready (still has race conditions during pvmove) +# ext3 Y ext3 Production-ready +# MOSIX Y mosix Testing only +# XFS N xfs Will add soon +# PCMCIA-CS N pcmcia Need to move this to its own ebuild +# lm-sensors N lm_sensors Need to move this to its own ebuild + +LVMV=0.9.1_beta7 +EXT3V=2.4-0.9.2-246 +MOSV=1.1.0 +CLOOPV=0.6 +CLOOPAV=0.60-1 +# AV=0.5.11 +#JFSV=1.0.0 +#KNV="6.g" +#PIV="1.d" +#PCV="3.1.27" + +[ "${PN}" = "linux" ] && DESCRIPTION="Linux kernel version ${KV}, including modules, binary tools, libraries and includes" +[ "${PN}" = "linux-sources" ] && DESCRIPTION="Linux kernel version ${KV} - full sources" +[ "${PN}" = "linux-extras" ] && DESCRIPTION="Linux kernel support tools and libraries" + +# We use build in /usr/src/linux in case of linux-extras +# so we need no sources +if [ ! "${PN}" = "linux-extras" ] ; then +SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2 + http://www.zip.com.au/~akpm/ext3-${EXT3V}.gz + http://oss.software.ibm.com/developerworks/opensource/jfs/project/pub/jfs-1.0.0-patch.tar.gz + ftp://ftp.cs.huji.ac.il/users/mosix/MOSIX-${MOSV}.tar.gz + ftp://ftp.sistina.com/pub/LVM/0.9.1_beta/lvm_${LVMV}.tar.gz + http://www.knopper.net/download/knoppix/cloop_${CLOOPAV}.tar.gz" +fi +# http://www.netroedge.com/~lm78/archive/lm_sensors-${SENV}.tar.gz +# http://www.netroedge.com/~lm78/archive/i2c-${SENV}.tar.gz +# http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-${PCV}.tar.gz + +if [ "$PN" != "linux-extras" ] +then + PROVIDE="virtual/kernel" +fi + +HOMEPAGE="http://www.kernel.org/ + http://www.netroedge.com/~lm78/ + http://www.namesys.com + http://www.sistina.com/lvm/" + +DEPEND=">=sys-apps/modutils-2.4.2 sys-devel/perl" +#these deps are messed up; fix 'em and add ncurses (required my mosix compile, menuconfig) +if [ $PN = "linux" ] +then + RDEPEND="mosix? ( ~sys-apps/mosix-user-${MOSV} ) >=sys-apps/e2fsprogs-1.22 >=sys-apps/util-linux-2.11f >=sys-apps/reiserfs-utils-3.6.25-r1" +elif [ $PN = "linux-sources" ] +then + if [ "`use build`" ] + then + DEPEND="" + RDEPEND="" + else + #ncurses is required for "make menuconfig" + RDEPEND=">=sys-libs/ncurses-5.2" + fi +elif [ $PN = "linux-extras" ] || [ $PN = "linux-headers" ] +then + #linux-extras/headers requires a rev of the current kernel sources to be installed + DEPEND="~sys-kernel/linux-sources-${PV}" +fi + +# this is not pretty... +LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I${S}/include" + +src_unpack() { + if [ "$PN" = "linux-extras" ] || [ "$PN" = "linux-headers" ] + then + return + fi + + mkdir ${S2} + + #unpack kernel and apply reiserfs-related patches + cd ${WORKDIR} + unpack linux-${OKV}.tar.bz2 + try mv linux linux-${KV} + cd ${S} + if [ "$KV" != "$OKV" ] + then + echo "Applying ${KV} patch..." + try bzip2 -dc ${DISTDIR}/patch-${KV}.bz2 | patch -p1 + fi +# This patch is just *too* unweildy and creates tons of rejects all over the place (boo!) +# echo "Applying XFS patch..." +# local x +# for x in easy only tricky acl-extattr misc +# do +# cat ${DISTDIR}/patch-2.4.6-xfs-${x}.bz2 | bzip2 -d | patch -p1 +# done + + dodir /usr/src/linux-${KV}-extras + + if [ "`use mosix`" ] + then + echo "Applying MOSIX patch..." + cd ${S2} + mkdir MOSIX-${MOSV} + cd MOSIX-${MOSV} + tar xzf MOSIX-${MOSV}.tar.gz patches.${OKV} kernel.new.${OKV}.tar + cd ${S} + try cat ${S2}/MOSIX-${MOSV}/patches.2.4.6 | patch -p0 + tar -x --no-same-owner -vf ${S2}/MOSIX-${MOSV}/kernel.new.2.4.6.tar + fi + + cd ${S} + echo "Applying reiserfs-NFS fix..." + try cat ${FILESDIR}/2.4.6/linux-2.4.6-reiserfs-NFS.patch | patch -N -p1 + + if [ "`use lvm`" ] + then + #create and apply LVM patch. The tools get built later. + cd ${S2} + echo "Unpacking and applying LVM patch..." + unpack lvm_${LVMV}.tar.gz + try cd LVM/${LVMV} + + # I had to hack this in so that LVM will look in the current linux + # source directory instead of /usr/src/linux for stuff - pete + try CFLAGS=\""${CFLAGS} -I${S}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${S}" + cd PATCHES + try make KERNEL_VERSION=${KV} KERNEL_DIR=${S} + cd ${S} + # the -l option allows this patch to apply cleanly (ignore whitespace changes) + try patch -l -p1 < ${S2}/LVM/${LVMV}/PATCHES/lvm-${LVMV}-${KV}.patch + cd ${S}/drivers/md + try patch -p0 < ${FILESDIR}/${KV}/lvm.c.diff + fi + +# if [ "`use lm_sensors`" ] +# then +# #unpack and apply the lm_sensors patch +# echo "Unpacking and applying lm_sensors patch..." +# cd ${S}/extras +# unpack lm_sensors-${SENV}.tar.gz +# unpack i2c-${SENV}.tar.gz +# try cd i2c-${SENV} +# try rmdir src +# try ln -s ../.. src +# try mkpatch/mkpatch.pl . /usr/src/linux | patch -p1 -E -d /usr/src/linux +# cp Makefile Makefile.orig +# try sed -e \"s:^LINUX=.*:LINUX=src:\" \ +# -e \"s/^COMPILE_KERNEL.*/COMPILE_KERNEL := 2/\" \ +# -e \"s:^I2C_HEADERS.*:I2C_HEADERS=.i2c-src/kernel:\" \ +# -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \ +# -e \"s#^PREFIX.*#PREFIX := /usr#\" \ +# -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \ +# Makefile.orig > Makefile +# try cd ${S}/extras/lm_sensors-${SENV} +# try rmdir src +# try ln -s ../.. src +# try ln -s ../i2c-${SENV} i2c-src +# try mkpatch/mkpatch.pl . /usr/src/linux | patch -p1 -E -d /usr/src/linux +# try sed -e \"s:^LINUX=.*:LINUX=src:\" \ +# -e \"s/^COMPILE_KERNEL.*/COMPILE_KERNEL := 2/\" \ +# -e \"s:^I2C_HEADERS.*:I2C_HEADERS=.i2c-src/kernel:\" \ +# -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \ +# -e \"s#^PREFIX.*#PREFIX := /usr#\" \ +# -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \ +# Makefile.orig > Makefile +# fi +# if [ "`use pcmcia-cs`" ] +# then +# echo "Unpacking pcmcia-cs tools..." +# cd ${S2} +# unpack pcmcia-cs-${PCV}.tar.gz + # patch -p0 < ${FILESDIR}/${KV}/pcmcia-cs-${PCV}-gentoo.diff +# fi + + #JFS patch works; commented out because it's not ready for production use + #if [ "`use jfs`" ] + #then + # echo "Applying JFS patch..." + # cd ${WORKDIR} + # unpack jfs-${JFSV}-patch.tar.gz + # cd ${S} + # patch -p1 < ${WORKDIR}/jfs-common-v1.0.0-patch + # patch -p1 < ${WORKDIR}/jfs-2.4.5-v1.0.0-patch + #fi + + if [ "`use ext3`" ] + then + echo "Applying ext3 patch..." + if [ "`use mosix`" ] + then + echo + echo "There will be one reject; we will fix it. (no worries)" + echo + fi + cd ${S} + gzip -dc ${DISTDIR}/ext3-${EXT3V}.gz | patch -l -p1 + if [ "`use mosix`" ] + then + echo + echo "Fixing reject in include/linux/sched.h..." + echo + cp ${FILESDIR}/${KV}/sched.h include/linux + fi + fi + + cd ${S2} + unpack cloop_${CLOOPAV}.tar.gz + + #get sources ready for compilation or for sitting at /usr/src/linux + echo "Preparing for compilation..." + cd ${S} + #sometimes we have icky kernel symbols; this seems to get rid of them + try make mrproper + + #linux-sources needs to be fully configured, too. Not just linux + #this is the configuration for the default kernel + try cp ${FILESDIR}/${KV}/config.bootcd .config + try yes \"\" \| make oldconfig + echo "Ignore any errors from the yes command above." + + #fix silly permissions in tarball + cd ${WORKDIR} + chown -R 0.0 * + chmod -R a+r-w+X,u+w * +} + +src_compile() { + if [ "${PN}" = "linux-sources" ] || [ "${PN}" = "linux-headers" ] + then + cd ${KS} + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep + else + if [ $PN = "linux" ] + then + cd ${KS} + try make symlinks + fi + if [ "`use lvm`" ] + then + #LVM tools are included in the linux and linux-extras pakcages + cd ${KS2}/LVM/${LVMV} + + # This is needed for linux-extras + if [ -f "Makefile" ] + then + try make clean + fi + # I had to hack this in so that LVM will look in the current linux + # source directory instead of /usr/src/linux for stuff - pete + try CFLAGS=\""${CFLAGS} -I${KS}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${KS}" + try make + fi + +# if [ "`use lm_sensors`" ] +# then +# cd ${KS}/extras/lm_sensors-${SENV} +# try make +# fi + +# Works, just commented out because JFS isn't ready to be used by non-developers +# if [ "`use jfs`" ] +# then +# cd ${S}/fs/jfs/utils +# try make +# cd output +# into / +# dosbin * +# doman `find -iname *.8` +# fi + + if [ "$PN" == "linux" ] + then + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" bzImage + #LEX=\""flex -l"\" bzImage + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" modules + #LEX=\""flex -l"\" modules + fi + +# if [ "`use pcmcia-cs`" ] +# then +# cd ${KS2}/pcmcia-cs-${PCV} +# # This is needed for linux-extras +# if [ -f "Makefile" ] +# then +# try make clean +# fi +# try ./Configure -n --kernel=${KS} --moddir=/lib/modules/${KV} \ +# --notrust --cardbus --nopnp --noapm --srctree --sysv --rcdir=/etc/rc.d/ +# try make all +# fi + + cd ${KS2}/cloop-${CLOOPV} + make KERNEL_DIR=${KS} + fi +} + +src_install() { + if [ "${PN}" = "linux" ] || [ "${PN}" = "linux-extras" ] + then + dodir /usr/lib + + if [ "`use lvm`" ] + then + cd ${KS2}/LVM/${LVMV}/tools + + try CFLAGS=\""${CFLAGS} -I${KS}/include"\" make install -e prefix=${D} mandir=${D}/usr/share/man \ + sbindir=${D}/sbin libdir=${D}/lib + #no need for a static library in /lib + mv ${D}/lib/*.a ${D}/usr/lib + fi + +# if [ "`use lm_sensors`" ] +# then +# echo "Install sensor tools..." +# #install sensors tools +# cd ${KS}/extras/lm_sensors-${SENV} +# make install +# fi + + if [ "${PN}" = "linux" ] + then + dodir /usr/src/linux-${KV} + cd ${D}/usr/src + #grab includes and documentation only + echo ">>> Copying includes and documentation..." + cp -ax ${S}/include ${D}/usr/src/linux-${KV} + cp -ax ${S}/Documentation ${D}/usr/src/linux-${KV} + + #grab compiled kernel + dodir /boot/boot + insinto /boot/boot + cd ${S} + doins arch/i386/boot/bzImage + + #grab modules + # Do we have a bug in modutils ? + # Meanwhile we use this quick fix (achim) + + install -d ${D}/lib/modules/`uname -r` + try make INSTALL_MOD_PATH=${D} modules_install + + cd ${S} + depmod -b ${D} -F ${S}/System.map ${KV} + #rm -rf ${D}/lib/modules/`uname -r` + #fix symlink + cd ${D}/lib/modules/${KV} + rm build + ln -sf /usr/src/linux-${KV} build + fi + +# if [ "`use pcmcia-cs`" ] +# then +# #install PCMCIA modules and utilities +# cd ${KS2}/pcmcia-cs-${PCV} +# try make PREFIX=${D} MANDIR=${D}/usr/share/man install +# rm -rf ${D}/etc/rc.d +# exeinto /etc/rc.d/init.d +# doexe ${FILESDIR}/${KV}/pcmcia +# fi + + cd ${KS2}/cloop-${CLOOPV} + insinto /lib/modules/${KV}/kernel/drivers/block + doins cloop.o + into /usr + dobin create_compressed_fs extract_compressed_fs + + elif [ "$PN" = "linux-sources" ] + then + dodir /usr/src + cd ${S} + + if [ "`use build`" ] ; then + dodir /usr/src/linux-${KV} + #grab includes and documentation only + echo ">>> Copying includes..." + cp -ax ${S}/include ${D}/usr/src/linux-${KV} + else + echo ">>> Copying sources..." + cp -ax ${WORKDIR}/* ${D}/usr/src + fi + elif [ "$PN" = "linux-headers" ] + then + #the linux-headers package basically takes a "snapshot" of your current linux headers + dodir /usr/include/linux + cp -ax ${KS}/include/linux/* ${D}/usr/include/linux + dodir /usr/include/asm + cp -ax ${KS}/include/asm-i386/* ${D}/usr/include/asm + fi + if [ -d ${D}/usr/src/linux-${KV} ] + then + #don't overwrite existing .config if present + cd ${D}/usr/src/linux-${KV} + if [ -e .config ] + then + cp -a .config .config.eg + fi + fi +} + +pkg_preinst() { + if [ "$PN" = "linux-headers" ] + then + if [ -L ${ROOT}usr/include/linux ] + then + rm ${ROOT}usr/include/linux + fi + if [ -L ${ROOT}usr/include/asm ] + then + rm ${ROOT}usr/include/asm + fi + fi +} + +pkg_postinst() { + rm -f ${ROOT}/usr/src/linux + ln -sf linux-${KV} ${ROOT}/usr/src/linux + + #copy over our .config if one isn't already present + cd ${ROOT}/usr/src/linux-${KV} + if [ "${PN}" = "linux-sources" ] && [ -e .config.eg ] && [ ! -e .config ] + then + cp -a .config.eg .config + fi +} diff --git a/sys-kernel/linux-sources/linux-sources-2.4.6-r1.ebuild b/sys-kernel/linux-sources/linux-sources-2.4.6-r1.ebuild new file mode 100644 index 000000000000..65f392eb9b43 --- /dev/null +++ b/sys-kernel/linux-sources/linux-sources-2.4.6-r1.ebuild @@ -0,0 +1,449 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Daniel Robbins <drobbins@gentoo.org> +# /home/cvsroot/gentoo-x86/sys-kernel/linux/linux-2.4.4.3.ebuild,v 1.1 2001/05/02 14:31:06 achim Exp + +#OKV=original kernel version, KV=patched kernel version + +OKV=2.4.6 +KV=2.4.6 +S=${WORKDIR}/linux-${KV} +S2=${WORKDIR}/linux-${KV}-extras +if [ $PN = "linux-extras" ] || [ $PN = "linux-headers" ] +then + KS=/usr/src/linux-${KV} + KS2=/usr/src/linux-${KV}-extras +else + KS=${S} + KS2=${S2} +fi + +# Kernel Features Enabled USE Variable Status +# +# Reiserfs Y - Production-ready +# JFS N jfs Testing-only (commented out for now) +# LVM Y lvm almost production-ready (still has race conditions during pvmove) +# ext3 Y ext3 Production-ready +# MOSIX Y mosix Testing only +# XFS N xfs Will add soon +# PCMCIA-CS N pcmcia Need to move this to its own ebuild +# lm-sensors N lm_sensors Need to move this to its own ebuild + +LVMV=0.9.1_beta7 +EXT3V=2.4-0.9.2-246 +MOSV=1.1.0 +CLOOPV=0.6 +CLOOPAV=0.60-1 +# AV=0.5.11 +#JFSV=1.0.0 +#KNV="6.g" +#PIV="1.d" +#PCV="3.1.27" + +[ "${PN}" = "linux" ] && DESCRIPTION="Linux kernel version ${KV}, including modules, binary tools, libraries and includes" +[ "${PN}" = "linux-sources" ] && DESCRIPTION="Linux kernel version ${KV} - full sources" +[ "${PN}" = "linux-extras" ] && DESCRIPTION="Linux kernel support tools and libraries" + +# We use build in /usr/src/linux in case of linux-extras +# so we need no sources +if [ ! "${PN}" = "linux-extras" ] ; then +SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2 + http://www.zip.com.au/~akpm/ext3-${EXT3V}.gz + http://oss.software.ibm.com/developerworks/opensource/jfs/project/pub/jfs-1.0.0-patch.tar.gz + ftp://ftp.cs.huji.ac.il/users/mosix/MOSIX-${MOSV}.tar.gz + ftp://ftp.sistina.com/pub/LVM/0.9.1_beta/lvm_${LVMV}.tar.gz + http://www.knopper.net/download/knoppix/cloop_${CLOOPAV}.tar.gz" +fi +# http://www.netroedge.com/~lm78/archive/lm_sensors-${SENV}.tar.gz +# http://www.netroedge.com/~lm78/archive/i2c-${SENV}.tar.gz +# http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-${PCV}.tar.gz + +if [ "$PN" != "linux-extras" ] +then + PROVIDE="virtual/kernel" +fi + +HOMEPAGE="http://www.kernel.org/ + http://www.netroedge.com/~lm78/ + http://www.namesys.com + http://www.sistina.com/lvm/" + +DEPEND=">=sys-apps/modutils-2.4.2 sys-devel/perl" +#these deps are messed up; fix 'em and add ncurses (required my mosix compile, menuconfig) +if [ $PN = "linux" ] +then + RDEPEND="mosix? ( ~sys-apps/mosix-user-${MOSV} ) >=sys-apps/e2fsprogs-1.22 >=sys-apps/util-linux-2.11f >=sys-apps/reiserfs-utils-3.6.25-r1" +elif [ $PN = "linux-sources" ] +then + if [ "`use build`" ] + then + DEPEND="" + RDEPEND="" + else + #ncurses is required for "make menuconfig" + RDEPEND=">=sys-libs/ncurses-5.2" + fi +elif [ $PN = "linux-extras" ] || [ $PN = "linux-headers" ] +then + #linux-extras/headers requires a rev of the current kernel sources to be installed + DEPEND="~sys-kernel/linux-sources-${PV}" +fi + +# this is not pretty... +LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I${S}/include" + +src_unpack() { + if [ "$PN" = "linux-extras" ] || [ "$PN" = "linux-headers" ] + then + return + fi + + mkdir ${S2} + + #unpack kernel and apply reiserfs-related patches + cd ${WORKDIR} + unpack linux-${OKV}.tar.bz2 + try mv linux linux-${KV} + cd ${S} + if [ "$KV" != "$OKV" ] + then + echo "Applying ${KV} patch..." + try bzip2 -dc ${DISTDIR}/patch-${KV}.bz2 | patch -p1 + fi +# This patch is just *too* unweildy and creates tons of rejects all over the place (boo!) +# echo "Applying XFS patch..." +# local x +# for x in easy only tricky acl-extattr misc +# do +# cat ${DISTDIR}/patch-2.4.6-xfs-${x}.bz2 | bzip2 -d | patch -p1 +# done + + dodir /usr/src/linux-${KV}-extras + + if [ "`use mosix`" ] + then + echo "Applying MOSIX patch..." + cd ${S2} + mkdir MOSIX-${MOSV} + cd MOSIX-${MOSV} + tar xzf MOSIX-${MOSV}.tar.gz patches.${OKV} kernel.new.${OKV}.tar + cd ${S} + try cat ${S2}/MOSIX-${MOSV}/patches.2.4.6 | patch -p0 + tar -x --no-same-owner -vf ${S2}/MOSIX-${MOSV}/kernel.new.2.4.6.tar + fi + + cd ${S} + echo "Applying reiserfs-NFS fix..." + try cat ${FILESDIR}/2.4.6/linux-2.4.6-reiserfs-NFS.patch | patch -N -p1 + + if [ "`use lvm`" ] + then + #create and apply LVM patch. The tools get built later. + cd ${S2} + echo "Unpacking and applying LVM patch..." + unpack lvm_${LVMV}.tar.gz + try cd LVM/${LVMV} + + # I had to hack this in so that LVM will look in the current linux + # source directory instead of /usr/src/linux for stuff - pete + try CFLAGS=\""${CFLAGS} -I${S}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${S}" + cd PATCHES + try make KERNEL_VERSION=${KV} KERNEL_DIR=${S} + cd ${S} + # the -l option allows this patch to apply cleanly (ignore whitespace changes) + try patch -l -p1 < ${S2}/LVM/${LVMV}/PATCHES/lvm-${LVMV}-${KV}.patch + cd ${S}/drivers/md + try patch -p0 < ${FILESDIR}/${KV}/lvm.c.diff + fi + +# if [ "`use lm_sensors`" ] +# then +# #unpack and apply the lm_sensors patch +# echo "Unpacking and applying lm_sensors patch..." +# cd ${S}/extras +# unpack lm_sensors-${SENV}.tar.gz +# unpack i2c-${SENV}.tar.gz +# try cd i2c-${SENV} +# try rmdir src +# try ln -s ../.. src +# try mkpatch/mkpatch.pl . /usr/src/linux | patch -p1 -E -d /usr/src/linux +# cp Makefile Makefile.orig +# try sed -e \"s:^LINUX=.*:LINUX=src:\" \ +# -e \"s/^COMPILE_KERNEL.*/COMPILE_KERNEL := 2/\" \ +# -e \"s:^I2C_HEADERS.*:I2C_HEADERS=.i2c-src/kernel:\" \ +# -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \ +# -e \"s#^PREFIX.*#PREFIX := /usr#\" \ +# -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \ +# Makefile.orig > Makefile +# try cd ${S}/extras/lm_sensors-${SENV} +# try rmdir src +# try ln -s ../.. src +# try ln -s ../i2c-${SENV} i2c-src +# try mkpatch/mkpatch.pl . /usr/src/linux | patch -p1 -E -d /usr/src/linux +# try sed -e \"s:^LINUX=.*:LINUX=src:\" \ +# -e \"s/^COMPILE_KERNEL.*/COMPILE_KERNEL := 2/\" \ +# -e \"s:^I2C_HEADERS.*:I2C_HEADERS=.i2c-src/kernel:\" \ +# -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \ +# -e \"s#^PREFIX.*#PREFIX := /usr#\" \ +# -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \ +# Makefile.orig > Makefile +# fi +# if [ "`use pcmcia-cs`" ] +# then +# echo "Unpacking pcmcia-cs tools..." +# cd ${S2} +# unpack pcmcia-cs-${PCV}.tar.gz + # patch -p0 < ${FILESDIR}/${KV}/pcmcia-cs-${PCV}-gentoo.diff +# fi + + #JFS patch works; commented out because it's not ready for production use + #if [ "`use jfs`" ] + #then + # echo "Applying JFS patch..." + # cd ${WORKDIR} + # unpack jfs-${JFSV}-patch.tar.gz + # cd ${S} + # patch -p1 < ${WORKDIR}/jfs-common-v1.0.0-patch + # patch -p1 < ${WORKDIR}/jfs-2.4.5-v1.0.0-patch + #fi + + if [ "`use ext3`" ] + then + echo "Applying ext3 patch..." + if [ "`use mosix`" ] + then + echo + echo "There will be one reject; we will fix it. (no worries)" + echo + fi + cd ${S} + gzip -dc ${DISTDIR}/ext3-${EXT3V}.gz | patch -l -p1 + if [ "`use mosix`" ] + then + echo + echo "Fixing reject in include/linux/sched.h..." + echo + cp ${FILESDIR}/${KV}/sched.h include/linux + fi + fi + + cd ${S2} + unpack cloop_${CLOOPAV}.tar.gz + + #get sources ready for compilation or for sitting at /usr/src/linux + echo "Preparing for compilation..." + cd ${S} + #sometimes we have icky kernel symbols; this seems to get rid of them + try make mrproper + + #linux-sources needs to be fully configured, too. Not just linux + #this is the configuration for the default kernel + try cp ${FILESDIR}/${KV}/config.bootcd .config + try yes \"\" \| make oldconfig + echo "Ignore any errors from the yes command above." + + #fix silly permissions in tarball + cd ${WORKDIR} + chown -R 0.0 * + chmod -R a+r-w+X,u+w * +} + +src_compile() { + if [ "${PN}" = "linux-sources" ] || [ "${PN}" = "linux-headers" ] + then + cd ${KS} + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep + else + if [ $PN = "linux" ] + then + cd ${KS} + try make symlinks + fi + if [ "`use lvm`" ] + then + #LVM tools are included in the linux and linux-extras pakcages + cd ${KS2}/LVM/${LVMV} + + # This is needed for linux-extras + if [ -f "Makefile" ] + then + try make clean + fi + # I had to hack this in so that LVM will look in the current linux + # source directory instead of /usr/src/linux for stuff - pete + try CFLAGS=\""${CFLAGS} -I${KS}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${KS}" + try make + fi + +# if [ "`use lm_sensors`" ] +# then +# cd ${KS}/extras/lm_sensors-${SENV} +# try make +# fi + +# Works, just commented out because JFS isn't ready to be used by non-developers +# if [ "`use jfs`" ] +# then +# cd ${S}/fs/jfs/utils +# try make +# cd output +# into / +# dosbin * +# doman `find -iname *.8` +# fi + + if [ "$PN" == "linux" ] + then + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" bzImage + #LEX=\""flex -l"\" bzImage + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" modules + #LEX=\""flex -l"\" modules + fi + +# if [ "`use pcmcia-cs`" ] +# then +# cd ${KS2}/pcmcia-cs-${PCV} +# # This is needed for linux-extras +# if [ -f "Makefile" ] +# then +# try make clean +# fi +# try ./Configure -n --kernel=${KS} --moddir=/lib/modules/${KV} \ +# --notrust --cardbus --nopnp --noapm --srctree --sysv --rcdir=/etc/rc.d/ +# try make all +# fi + + cd ${KS2}/cloop-${CLOOPV} + make KERNEL_DIR=${KS} + fi +} + +src_install() { + if [ "${PN}" = "linux" ] || [ "${PN}" = "linux-extras" ] + then + dodir /usr/lib + + if [ "`use lvm`" ] + then + cd ${KS2}/LVM/${LVMV}/tools + + try CFLAGS=\""${CFLAGS} -I${KS}/include"\" make install -e prefix=${D} mandir=${D}/usr/share/man \ + sbindir=${D}/sbin libdir=${D}/lib + #no need for a static library in /lib + mv ${D}/lib/*.a ${D}/usr/lib + fi + +# if [ "`use lm_sensors`" ] +# then +# echo "Install sensor tools..." +# #install sensors tools +# cd ${KS}/extras/lm_sensors-${SENV} +# make install +# fi + + if [ "${PN}" = "linux" ] + then + dodir /usr/src/linux-${KV} + cd ${D}/usr/src + #grab includes and documentation only + echo ">>> Copying includes and documentation..." + cp -ax ${S}/include ${D}/usr/src/linux-${KV} + cp -ax ${S}/Documentation ${D}/usr/src/linux-${KV} + + #grab compiled kernel + dodir /boot/boot + insinto /boot/boot + cd ${S} + doins arch/i386/boot/bzImage + + #grab modules + # Do we have a bug in modutils ? + # Meanwhile we use this quick fix (achim) + + install -d ${D}/lib/modules/`uname -r` + try make INSTALL_MOD_PATH=${D} modules_install + + cd ${S} + depmod -b ${D} -F ${S}/System.map ${KV} + #rm -rf ${D}/lib/modules/`uname -r` + #fix symlink + cd ${D}/lib/modules/${KV} + rm build + ln -sf /usr/src/linux-${KV} build + fi + +# if [ "`use pcmcia-cs`" ] +# then +# #install PCMCIA modules and utilities +# cd ${KS2}/pcmcia-cs-${PCV} +# try make PREFIX=${D} MANDIR=${D}/usr/share/man install +# rm -rf ${D}/etc/rc.d +# exeinto /etc/rc.d/init.d +# doexe ${FILESDIR}/${KV}/pcmcia +# fi + + cd ${KS2}/cloop-${CLOOPV} + insinto /lib/modules/${KV}/kernel/drivers/block + doins cloop.o + into /usr + dobin create_compressed_fs extract_compressed_fs + + elif [ "$PN" = "linux-sources" ] + then + dodir /usr/src + cd ${S} + + if [ "`use build`" ] ; then + dodir /usr/src/linux-${KV} + #grab includes and documentation only + echo ">>> Copying includes..." + cp -ax ${S}/include ${D}/usr/src/linux-${KV} + else + echo ">>> Copying sources..." + cp -ax ${WORKDIR}/* ${D}/usr/src + fi + elif [ "$PN" = "linux-headers" ] + then + #the linux-headers package basically takes a "snapshot" of your current linux headers + dodir /usr/include/linux + cp -ax ${KS}/include/linux/* ${D}/usr/include/linux + dodir /usr/include/asm + cp -ax ${KS}/include/asm-i386/* ${D}/usr/include/asm + fi + if [ -d ${D}/usr/src/linux-${KV} ] + then + #don't overwrite existing .config if present + cd ${D}/usr/src/linux-${KV} + if [ -e .config ] + then + cp -a .config .config.eg + fi + fi +} + +pkg_preinst() { + if [ "$PN" = "linux-headers" ] + then + if [ -L ${ROOT}usr/include/linux ] + then + rm ${ROOT}usr/include/linux + fi + if [ -L ${ROOT}usr/include/asm ] + then + rm ${ROOT}usr/include/asm + fi + fi +} + +pkg_postinst() { + rm -f ${ROOT}/usr/src/linux + ln -sf linux-${KV} ${ROOT}/usr/src/linux + + #copy over our .config if one isn't already present + cd ${ROOT}/usr/src/linux-${KV} + if [ "${PN}" = "linux-sources" ] && [ -e .config.eg ] && [ ! -e .config ] + then + cp -a .config.eg .config + fi +} diff --git a/sys-kernel/linux/linux-2.4.6-r1.ebuild b/sys-kernel/linux/linux-2.4.6-r1.ebuild new file mode 100644 index 000000000000..65f392eb9b43 --- /dev/null +++ b/sys-kernel/linux/linux-2.4.6-r1.ebuild @@ -0,0 +1,449 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Daniel Robbins <drobbins@gentoo.org> +# /home/cvsroot/gentoo-x86/sys-kernel/linux/linux-2.4.4.3.ebuild,v 1.1 2001/05/02 14:31:06 achim Exp + +#OKV=original kernel version, KV=patched kernel version + +OKV=2.4.6 +KV=2.4.6 +S=${WORKDIR}/linux-${KV} +S2=${WORKDIR}/linux-${KV}-extras +if [ $PN = "linux-extras" ] || [ $PN = "linux-headers" ] +then + KS=/usr/src/linux-${KV} + KS2=/usr/src/linux-${KV}-extras +else + KS=${S} + KS2=${S2} +fi + +# Kernel Features Enabled USE Variable Status +# +# Reiserfs Y - Production-ready +# JFS N jfs Testing-only (commented out for now) +# LVM Y lvm almost production-ready (still has race conditions during pvmove) +# ext3 Y ext3 Production-ready +# MOSIX Y mosix Testing only +# XFS N xfs Will add soon +# PCMCIA-CS N pcmcia Need to move this to its own ebuild +# lm-sensors N lm_sensors Need to move this to its own ebuild + +LVMV=0.9.1_beta7 +EXT3V=2.4-0.9.2-246 +MOSV=1.1.0 +CLOOPV=0.6 +CLOOPAV=0.60-1 +# AV=0.5.11 +#JFSV=1.0.0 +#KNV="6.g" +#PIV="1.d" +#PCV="3.1.27" + +[ "${PN}" = "linux" ] && DESCRIPTION="Linux kernel version ${KV}, including modules, binary tools, libraries and includes" +[ "${PN}" = "linux-sources" ] && DESCRIPTION="Linux kernel version ${KV} - full sources" +[ "${PN}" = "linux-extras" ] && DESCRIPTION="Linux kernel support tools and libraries" + +# We use build in /usr/src/linux in case of linux-extras +# so we need no sources +if [ ! "${PN}" = "linux-extras" ] ; then +SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2 + http://www.zip.com.au/~akpm/ext3-${EXT3V}.gz + http://oss.software.ibm.com/developerworks/opensource/jfs/project/pub/jfs-1.0.0-patch.tar.gz + ftp://ftp.cs.huji.ac.il/users/mosix/MOSIX-${MOSV}.tar.gz + ftp://ftp.sistina.com/pub/LVM/0.9.1_beta/lvm_${LVMV}.tar.gz + http://www.knopper.net/download/knoppix/cloop_${CLOOPAV}.tar.gz" +fi +# http://www.netroedge.com/~lm78/archive/lm_sensors-${SENV}.tar.gz +# http://www.netroedge.com/~lm78/archive/i2c-${SENV}.tar.gz +# http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-${PCV}.tar.gz + +if [ "$PN" != "linux-extras" ] +then + PROVIDE="virtual/kernel" +fi + +HOMEPAGE="http://www.kernel.org/ + http://www.netroedge.com/~lm78/ + http://www.namesys.com + http://www.sistina.com/lvm/" + +DEPEND=">=sys-apps/modutils-2.4.2 sys-devel/perl" +#these deps are messed up; fix 'em and add ncurses (required my mosix compile, menuconfig) +if [ $PN = "linux" ] +then + RDEPEND="mosix? ( ~sys-apps/mosix-user-${MOSV} ) >=sys-apps/e2fsprogs-1.22 >=sys-apps/util-linux-2.11f >=sys-apps/reiserfs-utils-3.6.25-r1" +elif [ $PN = "linux-sources" ] +then + if [ "`use build`" ] + then + DEPEND="" + RDEPEND="" + else + #ncurses is required for "make menuconfig" + RDEPEND=">=sys-libs/ncurses-5.2" + fi +elif [ $PN = "linux-extras" ] || [ $PN = "linux-headers" ] +then + #linux-extras/headers requires a rev of the current kernel sources to be installed + DEPEND="~sys-kernel/linux-sources-${PV}" +fi + +# this is not pretty... +LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I${S}/include" + +src_unpack() { + if [ "$PN" = "linux-extras" ] || [ "$PN" = "linux-headers" ] + then + return + fi + + mkdir ${S2} + + #unpack kernel and apply reiserfs-related patches + cd ${WORKDIR} + unpack linux-${OKV}.tar.bz2 + try mv linux linux-${KV} + cd ${S} + if [ "$KV" != "$OKV" ] + then + echo "Applying ${KV} patch..." + try bzip2 -dc ${DISTDIR}/patch-${KV}.bz2 | patch -p1 + fi +# This patch is just *too* unweildy and creates tons of rejects all over the place (boo!) +# echo "Applying XFS patch..." +# local x +# for x in easy only tricky acl-extattr misc +# do +# cat ${DISTDIR}/patch-2.4.6-xfs-${x}.bz2 | bzip2 -d | patch -p1 +# done + + dodir /usr/src/linux-${KV}-extras + + if [ "`use mosix`" ] + then + echo "Applying MOSIX patch..." + cd ${S2} + mkdir MOSIX-${MOSV} + cd MOSIX-${MOSV} + tar xzf MOSIX-${MOSV}.tar.gz patches.${OKV} kernel.new.${OKV}.tar + cd ${S} + try cat ${S2}/MOSIX-${MOSV}/patches.2.4.6 | patch -p0 + tar -x --no-same-owner -vf ${S2}/MOSIX-${MOSV}/kernel.new.2.4.6.tar + fi + + cd ${S} + echo "Applying reiserfs-NFS fix..." + try cat ${FILESDIR}/2.4.6/linux-2.4.6-reiserfs-NFS.patch | patch -N -p1 + + if [ "`use lvm`" ] + then + #create and apply LVM patch. The tools get built later. + cd ${S2} + echo "Unpacking and applying LVM patch..." + unpack lvm_${LVMV}.tar.gz + try cd LVM/${LVMV} + + # I had to hack this in so that LVM will look in the current linux + # source directory instead of /usr/src/linux for stuff - pete + try CFLAGS=\""${CFLAGS} -I${S}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${S}" + cd PATCHES + try make KERNEL_VERSION=${KV} KERNEL_DIR=${S} + cd ${S} + # the -l option allows this patch to apply cleanly (ignore whitespace changes) + try patch -l -p1 < ${S2}/LVM/${LVMV}/PATCHES/lvm-${LVMV}-${KV}.patch + cd ${S}/drivers/md + try patch -p0 < ${FILESDIR}/${KV}/lvm.c.diff + fi + +# if [ "`use lm_sensors`" ] +# then +# #unpack and apply the lm_sensors patch +# echo "Unpacking and applying lm_sensors patch..." +# cd ${S}/extras +# unpack lm_sensors-${SENV}.tar.gz +# unpack i2c-${SENV}.tar.gz +# try cd i2c-${SENV} +# try rmdir src +# try ln -s ../.. src +# try mkpatch/mkpatch.pl . /usr/src/linux | patch -p1 -E -d /usr/src/linux +# cp Makefile Makefile.orig +# try sed -e \"s:^LINUX=.*:LINUX=src:\" \ +# -e \"s/^COMPILE_KERNEL.*/COMPILE_KERNEL := 2/\" \ +# -e \"s:^I2C_HEADERS.*:I2C_HEADERS=.i2c-src/kernel:\" \ +# -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \ +# -e \"s#^PREFIX.*#PREFIX := /usr#\" \ +# -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \ +# Makefile.orig > Makefile +# try cd ${S}/extras/lm_sensors-${SENV} +# try rmdir src +# try ln -s ../.. src +# try ln -s ../i2c-${SENV} i2c-src +# try mkpatch/mkpatch.pl . /usr/src/linux | patch -p1 -E -d /usr/src/linux +# try sed -e \"s:^LINUX=.*:LINUX=src:\" \ +# -e \"s/^COMPILE_KERNEL.*/COMPILE_KERNEL := 2/\" \ +# -e \"s:^I2C_HEADERS.*:I2C_HEADERS=.i2c-src/kernel:\" \ +# -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \ +# -e \"s#^PREFIX.*#PREFIX := /usr#\" \ +# -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \ +# Makefile.orig > Makefile +# fi +# if [ "`use pcmcia-cs`" ] +# then +# echo "Unpacking pcmcia-cs tools..." +# cd ${S2} +# unpack pcmcia-cs-${PCV}.tar.gz + # patch -p0 < ${FILESDIR}/${KV}/pcmcia-cs-${PCV}-gentoo.diff +# fi + + #JFS patch works; commented out because it's not ready for production use + #if [ "`use jfs`" ] + #then + # echo "Applying JFS patch..." + # cd ${WORKDIR} + # unpack jfs-${JFSV}-patch.tar.gz + # cd ${S} + # patch -p1 < ${WORKDIR}/jfs-common-v1.0.0-patch + # patch -p1 < ${WORKDIR}/jfs-2.4.5-v1.0.0-patch + #fi + + if [ "`use ext3`" ] + then + echo "Applying ext3 patch..." + if [ "`use mosix`" ] + then + echo + echo "There will be one reject; we will fix it. (no worries)" + echo + fi + cd ${S} + gzip -dc ${DISTDIR}/ext3-${EXT3V}.gz | patch -l -p1 + if [ "`use mosix`" ] + then + echo + echo "Fixing reject in include/linux/sched.h..." + echo + cp ${FILESDIR}/${KV}/sched.h include/linux + fi + fi + + cd ${S2} + unpack cloop_${CLOOPAV}.tar.gz + + #get sources ready for compilation or for sitting at /usr/src/linux + echo "Preparing for compilation..." + cd ${S} + #sometimes we have icky kernel symbols; this seems to get rid of them + try make mrproper + + #linux-sources needs to be fully configured, too. Not just linux + #this is the configuration for the default kernel + try cp ${FILESDIR}/${KV}/config.bootcd .config + try yes \"\" \| make oldconfig + echo "Ignore any errors from the yes command above." + + #fix silly permissions in tarball + cd ${WORKDIR} + chown -R 0.0 * + chmod -R a+r-w+X,u+w * +} + +src_compile() { + if [ "${PN}" = "linux-sources" ] || [ "${PN}" = "linux-headers" ] + then + cd ${KS} + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep + else + if [ $PN = "linux" ] + then + cd ${KS} + try make symlinks + fi + if [ "`use lvm`" ] + then + #LVM tools are included in the linux and linux-extras pakcages + cd ${KS2}/LVM/${LVMV} + + # This is needed for linux-extras + if [ -f "Makefile" ] + then + try make clean + fi + # I had to hack this in so that LVM will look in the current linux + # source directory instead of /usr/src/linux for stuff - pete + try CFLAGS=\""${CFLAGS} -I${KS}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${KS}" + try make + fi + +# if [ "`use lm_sensors`" ] +# then +# cd ${KS}/extras/lm_sensors-${SENV} +# try make +# fi + +# Works, just commented out because JFS isn't ready to be used by non-developers +# if [ "`use jfs`" ] +# then +# cd ${S}/fs/jfs/utils +# try make +# cd output +# into / +# dosbin * +# doman `find -iname *.8` +# fi + + if [ "$PN" == "linux" ] + then + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" bzImage + #LEX=\""flex -l"\" bzImage + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" modules + #LEX=\""flex -l"\" modules + fi + +# if [ "`use pcmcia-cs`" ] +# then +# cd ${KS2}/pcmcia-cs-${PCV} +# # This is needed for linux-extras +# if [ -f "Makefile" ] +# then +# try make clean +# fi +# try ./Configure -n --kernel=${KS} --moddir=/lib/modules/${KV} \ +# --notrust --cardbus --nopnp --noapm --srctree --sysv --rcdir=/etc/rc.d/ +# try make all +# fi + + cd ${KS2}/cloop-${CLOOPV} + make KERNEL_DIR=${KS} + fi +} + +src_install() { + if [ "${PN}" = "linux" ] || [ "${PN}" = "linux-extras" ] + then + dodir /usr/lib + + if [ "`use lvm`" ] + then + cd ${KS2}/LVM/${LVMV}/tools + + try CFLAGS=\""${CFLAGS} -I${KS}/include"\" make install -e prefix=${D} mandir=${D}/usr/share/man \ + sbindir=${D}/sbin libdir=${D}/lib + #no need for a static library in /lib + mv ${D}/lib/*.a ${D}/usr/lib + fi + +# if [ "`use lm_sensors`" ] +# then +# echo "Install sensor tools..." +# #install sensors tools +# cd ${KS}/extras/lm_sensors-${SENV} +# make install +# fi + + if [ "${PN}" = "linux" ] + then + dodir /usr/src/linux-${KV} + cd ${D}/usr/src + #grab includes and documentation only + echo ">>> Copying includes and documentation..." + cp -ax ${S}/include ${D}/usr/src/linux-${KV} + cp -ax ${S}/Documentation ${D}/usr/src/linux-${KV} + + #grab compiled kernel + dodir /boot/boot + insinto /boot/boot + cd ${S} + doins arch/i386/boot/bzImage + + #grab modules + # Do we have a bug in modutils ? + # Meanwhile we use this quick fix (achim) + + install -d ${D}/lib/modules/`uname -r` + try make INSTALL_MOD_PATH=${D} modules_install + + cd ${S} + depmod -b ${D} -F ${S}/System.map ${KV} + #rm -rf ${D}/lib/modules/`uname -r` + #fix symlink + cd ${D}/lib/modules/${KV} + rm build + ln -sf /usr/src/linux-${KV} build + fi + +# if [ "`use pcmcia-cs`" ] +# then +# #install PCMCIA modules and utilities +# cd ${KS2}/pcmcia-cs-${PCV} +# try make PREFIX=${D} MANDIR=${D}/usr/share/man install +# rm -rf ${D}/etc/rc.d +# exeinto /etc/rc.d/init.d +# doexe ${FILESDIR}/${KV}/pcmcia +# fi + + cd ${KS2}/cloop-${CLOOPV} + insinto /lib/modules/${KV}/kernel/drivers/block + doins cloop.o + into /usr + dobin create_compressed_fs extract_compressed_fs + + elif [ "$PN" = "linux-sources" ] + then + dodir /usr/src + cd ${S} + + if [ "`use build`" ] ; then + dodir /usr/src/linux-${KV} + #grab includes and documentation only + echo ">>> Copying includes..." + cp -ax ${S}/include ${D}/usr/src/linux-${KV} + else + echo ">>> Copying sources..." + cp -ax ${WORKDIR}/* ${D}/usr/src + fi + elif [ "$PN" = "linux-headers" ] + then + #the linux-headers package basically takes a "snapshot" of your current linux headers + dodir /usr/include/linux + cp -ax ${KS}/include/linux/* ${D}/usr/include/linux + dodir /usr/include/asm + cp -ax ${KS}/include/asm-i386/* ${D}/usr/include/asm + fi + if [ -d ${D}/usr/src/linux-${KV} ] + then + #don't overwrite existing .config if present + cd ${D}/usr/src/linux-${KV} + if [ -e .config ] + then + cp -a .config .config.eg + fi + fi +} + +pkg_preinst() { + if [ "$PN" = "linux-headers" ] + then + if [ -L ${ROOT}usr/include/linux ] + then + rm ${ROOT}usr/include/linux + fi + if [ -L ${ROOT}usr/include/asm ] + then + rm ${ROOT}usr/include/asm + fi + fi +} + +pkg_postinst() { + rm -f ${ROOT}/usr/src/linux + ln -sf linux-${KV} ${ROOT}/usr/src/linux + + #copy over our .config if one isn't already present + cd ${ROOT}/usr/src/linux-${KV} + if [ "${PN}" = "linux-sources" ] && [ -e .config.eg ] && [ ! -e .config ] + then + cp -a .config.eg .config + fi +} diff --git a/sys-libs/glibc/files/digest-glibc-2.2.3-r4 b/sys-libs/glibc/files/digest-glibc-2.2.3-r4 new file mode 100644 index 000000000000..7261ba16aa7d --- /dev/null +++ b/sys-libs/glibc/files/digest-glibc-2.2.3-r4 @@ -0,0 +1,2 @@ +MD5 dce1d6d0b210c5a8c74918982341799b glibc-2.2.3.tar.gz +MD5 46e9e722fbac89f0a94a8de872d3d39f glibc-linuxthreads-2.2.3.tar.gz diff --git a/sys-libs/glibc/glibc-2.2.3-r4.ebuild b/sys-libs/glibc/glibc-2.2.3-r4.ebuild new file mode 100644 index 000000000000..a5d9ab42af33 --- /dev/null +++ b/sys-libs/glibc/glibc-2.2.3-r4.ebuild @@ -0,0 +1,174 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Achim Gottinger <achim@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.2.3-r4.ebuild,v 1.1 2001/07/28 15:49:20 pete Exp $ + +A="$P.tar.gz glibc-linuxthreads-${PV}.tar.gz" +S=${WORKDIR}/${P} +DESCRIPTION="GNU libc6 (also called glibc2) C library" +SRC_URI="ftp://sourceware.cygnus.com/pub/glibc/releases/glibc-${PV}.tar.gz + ftp://sourceware.cygnus.com/pub/glibc/releases/glibc-linuxthreads-${PV}.tar.gz + ftp://ftp.unina.it/pub/Unix/cygnus/glibc/releases/glibc-${PV}.tar.gz + ftp://ftp.unina.it/pub/Unix/cygnus/glibc/releases/glibc-linuxthreads-${PV}.tar.gz + ftp://ftp.gnu.org/pub/gnu/glibc/glibc-${PV}.tar.gz + ftp://ftp.gnu.org/pub/gnu/glibc/glibc-linuxthreads-${PV}.tar.gz" +HOMEPAGE="http://www.gnu.org/software/libc/libc.html" + +DEPEND="nls? ( sys-devel/gettext ) gd? ( media-libs/libgd )" + +if [ -z "`use bootstrap`" ] && [ -z "`use bootcd`" ] && [ -z "`use build`" ] +then + RDEPEND="gd? ( sys-libs/zlib media-libs/libpng ) sys-apps/baselayout" +else + RDEPEND="sys-apps/baselayout" +fi + +PROVIDE="virtual/glibc" + +src_unpack() { + + unpack glibc-${PV}.tar.gz + cd ${S} + unpack glibc-linuxthreads-${PV}.tar.gz + for i in mtrace-intl-perl + do + echo "Applying $i patch..." + try patch -p0 < ${FILESDIR}/glibc-2.2.2-${i}.diff + done + try patch -p0 < ${FILESDIR}/glibc-2.2.3-libnss.diff + try patch -p0 < ${FILESDIR}/glibc-2.2.3-string2.diff + cd io + try patch -p0 < ${FILESDIR}/glibc-2.2.2-test-lfs-timeout.patch + +} + +src_compile() { + local myconf + if [ "`use build`" ] + then + # If we build for the build system we use the kernel headers from the target + myconf="--with-header=${ROOT}usr/include" + fi + if [ "`use gd`" ] && [ -z "`use bootstrap`" ] + then + myconf="${myconf} --with-gd=yes" + else + myconf="${myconf} --with-gd=no" + fi + if [ -z "`use nls`" ] + then + myconf="${myconf} --disable-nls" + fi + rm -rf buildhere + mkdir buildhere + cd buildhere + try ../configure --host=${CHOST} --without-cvs \ + --enable-add-ons=linuxthreads \ + --disable-profile --prefix=/usr \ + --mandir=/usr/share/man --infodir=/usr/share/info \ + --libexecdir=/usr/lib/misc ${myconf} + + #This next option breaks the Sun JDK and the IBM JDK + #We should really keep compatibility with older kernels, anyway + #--enable-kernel=2.4.0 + try make + make check +} + + +src_install() { + + rm -rf ${D} + mkdir ${D} + export LC_ALL=C + try make PARALELLMFLAGS=${MAKEOPTS} install_root=${D} install -C buildhere + if [ -z "`use build`" ] && [ -z "`use bootcd`" ] + then + dodir /etc/rc.d/init.d + try make PARALELLMFLAGS=${MAKEOPTS} install_root=${D} info -C buildhere + try make PARALELLMFLAGS=${MAKEOPTS} install_root=${D} localedata/install-locales -C buildhere + + # I commented out linuxthreads man pages because I don't want + # glibc to build depend on perl + # dodir /usr/share/man/man3 + # try make MANDIR=${D}/usr/share/man/man3 install -C linuxthreads/man + # cd ${D}/usr/share/man/man3 + # for i in *.3thr + # do + # mv ${i} ${i%.3thr}.3 + # done + + install -m 644 nscd/nscd.conf ${D}/etc + install -m 755 ${FILESDIR}/nscd ${D}/etc/rc.d/init.d/nscd + dodoc BUGS ChangeLog* CONFORMANCE COPYING* FAQ INTERFACE NEWS NOTES \ + PROJECTS README* + else + rm -rf ${D}/usr/share/{man,info,zoneinfo} + if [ "`use bootcd`" ] + then + rm -rf ${D}/usr/include + rm -f ${D}/usr/bin/{lddlibc4,iconv,sprof,glibcbug,tzselect,getconf,gencat,getent,locale,mtrace,pcprofiledump,rpcgen,localedef,catchsegv,xtrace} + rm -rf ${D}/usr/sbin/{zic,nscd,nscd_nischeck,zdump,rpcinfo} + rm -f ${D}/usr/lib/lib*.a + fi + fi + + if [ "`use pic`" ] && [ -z "`use bootcd`" ] + then + find ${S}/buildhere -name "*_pic.a" -exec cp {} ${D}/lib \; + find ${S}/buildhere -name "*.map" -exec cp {} ${D}/lib \; + for i in ${D}/lib/*.map + do + mv ${i} ${i%.map}_pic.map + done + fi + rm ${D}/lib/ld-linux.so.2 + rm ${D}/lib/libc.so.6 + rm ${D}/lib/libpthread.so.0 + chmod 755 ${D}/usr/lib/misc/pt_chown + rm -f ${D}/etc/ld.so.cache +} + +pkg_preinst() +{ + # Check if we run under X + if [ -e /usr/X11R6/bin/X ] && [ "`/sbin/pidof /usr/X11R6/bin/X`" ] && [ "${ROOT}" = "/" ] + then + echo "glibc can not be installed while X is running!!" + exit 1 + fi + + echo "Saving ld-linux,libc6 and libpthread" + for file in ld-linux.so.2 libc.so.6 libpthread.so.0 + do + if [ -f ${ROOT}lib/${file} ] + then + /bin/cp ${ROOT}lib/${file} ${ROOT}tmp + /sbin/sln ${ROOT}tmp/${file} ${ROOT}lib/${file} + fi + done + + if [ -e ${ROOT}etc/localtime ] + then + #keeping old timezone + if [ -e ${D}/etc/localtime ] ; then + /bin/rm ${D}/etc/localtime + fi + else + echo "Please remember to set your timezone using the zic command." + fi +} + +pkg_postinst() +{ + echo "Setting ld-linux,libc6 and libpthread" + + /sbin/sln ${ROOT}lib/ld-${PV}.so ${ROOT}lib/ld-linux.so.2 + /sbin/sln ${ROOT}lib/libc-${PV}.so ${ROOT}lib/libc.so.6 + /sbin/sln ${ROOT}lib/libpthread-0.9.so ${ROOT}lib/libpthread.so.0 + /bin/rm -f ${ROOT}tmp/ld-linux.so.2 + /bin/rm -f ${ROOT}tmp/libc.so.6 + /bin/rm -f ${ROOT}tmp/libpthread.so.0 + /sbin/ldconfig -r ${ROOT} + +} |