Download only the packages and patches required by each libc implementation.
This commit is contained in:
parent
adfc5b862d
commit
c940100777
3 changed files with 44 additions and 26 deletions
|
@ -35,7 +35,6 @@ get_sources() { #
|
|||
# Iterate through each package and grab it, along with any patches it needs.
|
||||
for i in `cat $JHALFSDIR/packages` ; do
|
||||
PKG=`echo $i | sed -e 's/-version.*//' \
|
||||
-e 's/-file.*//' \
|
||||
-e 's/uclibc/uClibc/' `
|
||||
|
||||
#
|
||||
|
@ -43,27 +42,43 @@ get_sources() { #
|
|||
#
|
||||
VRS=`echo $i | sed -e 's/.* //' -e 's/"//g'`
|
||||
case "$PKG" in
|
||||
"gcc" )
|
||||
download $PKG "gcc-core-$VRS.tar.bz2"
|
||||
download $PKG "gcc-g++-$VRS.tar.bz2"
|
||||
if [ ! "$TEST" = "0" ] ; then
|
||||
download $PKG "gcc-testsuite-$VRS.tar.bz2" ;
|
||||
fi
|
||||
;;
|
||||
|
||||
"glibc")
|
||||
if [ "$MODEL" = "glibc" ] ; then
|
||||
download $PKG "$PKG-$VRS.tar.bz2"
|
||||
download $PKG "$PKG-libidn-$VRS.tar.bz2"
|
||||
fi
|
||||
;;
|
||||
|
||||
"tcl" )
|
||||
FILE="$PKG$VRS-src.tar.bz2" ; download $PKG $FILE ;;
|
||||
|
||||
"uclibc" )
|
||||
if [ "$MODEL" = "uclibc" ] ; then
|
||||
download $PKG "$PKG-$VRS.tar.bz2"
|
||||
fi
|
||||
;;
|
||||
|
||||
"uClibc-locale" )
|
||||
if [ "$MODEL" = "uclibc" ] ; then
|
||||
FILE="$PKG-$VRS.tgz" ; PKG="uClibc"
|
||||
download $PKG $FILE
|
||||
# There can be no patches for this file
|
||||
continue
|
||||
fi
|
||||
;;
|
||||
|
||||
"uClibc-patch" ) continue ;;
|
||||
|
||||
"tcl" ) FILE="$PKG$VRS-src.tar.bz2" ; download $PKG $FILE ;;
|
||||
|
||||
"uClibc-locale" ) FILE="$PKG-$VRS.tgz" ; PKG="uClibc"
|
||||
download $PKG $FILE
|
||||
# There can be no patches for this file
|
||||
continue ;;
|
||||
|
||||
"gcc" ) download $PKG "gcc-core-$VRS.tar.bz2"
|
||||
download $PKG "gcc-g++-$VRS.tar.bz2"
|
||||
if [ ! "$TEST" = "0" ] ; then
|
||||
download $PKG "gcc-testsuite-$VRS.tar.bz2" ;
|
||||
fi
|
||||
;;
|
||||
"glibc") download $PKG "$PKG-$VRS.tar.bz2"
|
||||
download $PKG "$PKG-libidn-$VRS.tar.bz2"
|
||||
;;
|
||||
* ) FILE="$PKG-$VRS.tar.bz2"
|
||||
download $PKG $FILE
|
||||
;;
|
||||
* )
|
||||
FILE="$PKG-$VRS.tar.bz2" ; download $PKG $FILE ;;
|
||||
esac
|
||||
|
||||
for patch in `grep "$PKG-&$PKG" $JHALFSDIR/patches` ; do
|
||||
|
|
|
@ -1,22 +1,25 @@
|
|||
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||
|
||||
<!-- Get list of patch files from the BLFS Book -->
|
||||
<!-- $LastChangedBy$ -->
|
||||
<!-- $Date$ -->
|
||||
<!-- $Id$ -->
|
||||
<!-- Get list of patch files from the HLFS Book -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:output method="text"/>
|
||||
|
||||
<!-- What libc implentation must be used? -->
|
||||
<xsl:param name="model" select="glibc"/>
|
||||
|
||||
<!-- No text needed -->
|
||||
<xsl:template match="//text()">
|
||||
<xsl:text/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Just grab the url from the ulink tags that have .patch in the name -->
|
||||
<!-- Just grab the url from the patches.xml file -->
|
||||
<xsl:template match="//ulink">
|
||||
<xsl:if test="contains(@url, '.patch') or contains(@url, '.patch.gz') and contains(@url, 'linuxfromscratch')">
|
||||
<xsl:if test="ancestor::varlistentry[@condition=$model]
|
||||
or not(ancestor::varlistentry[@condition])">
|
||||
<xsl:value-of select="@url"/>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:if>
|
||||
|
|
|
@ -556,10 +556,10 @@ build_patches_file() { # Supply a suitably formated list of patches.
|
|||
|
||||
xsltproc --nonet \
|
||||
--xinclude \
|
||||
--stringparam model $MODEL \
|
||||
-o patcheslist_.wget \
|
||||
patcheslist.xsl \
|
||||
$BOOK/chapter04/patches.xml
|
||||
#> /dev/null 2>&1
|
||||
|
||||
rm -f patches
|
||||
|
||||
|
|
Reference in a new issue