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.
|
# Iterate through each package and grab it, along with any patches it needs.
|
||||||
for i in `cat $JHALFSDIR/packages` ; do
|
for i in `cat $JHALFSDIR/packages` ; do
|
||||||
PKG=`echo $i | sed -e 's/-version.*//' \
|
PKG=`echo $i | sed -e 's/-version.*//' \
|
||||||
-e 's/-file.*//' \
|
|
||||||
-e 's/uclibc/uClibc/' `
|
-e 's/uclibc/uClibc/' `
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -43,27 +42,43 @@ get_sources() { #
|
||||||
#
|
#
|
||||||
VRS=`echo $i | sed -e 's/.* //' -e 's/"//g'`
|
VRS=`echo $i | sed -e 's/.* //' -e 's/"//g'`
|
||||||
case "$PKG" in
|
case "$PKG" in
|
||||||
"uClibc-patch" ) continue ;;
|
"gcc" )
|
||||||
|
download $PKG "gcc-core-$VRS.tar.bz2"
|
||||||
"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"
|
download $PKG "gcc-g++-$VRS.tar.bz2"
|
||||||
if [ ! "$TEST" = "0" ] ; then
|
if [ ! "$TEST" = "0" ] ; then
|
||||||
download $PKG "gcc-testsuite-$VRS.tar.bz2" ;
|
download $PKG "gcc-testsuite-$VRS.tar.bz2" ;
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"glibc") download $PKG "$PKG-$VRS.tar.bz2"
|
|
||||||
|
"glibc")
|
||||||
|
if [ "$MODEL" = "glibc" ] ; then
|
||||||
|
download $PKG "$PKG-$VRS.tar.bz2"
|
||||||
download $PKG "$PKG-libidn-$VRS.tar.bz2"
|
download $PKG "$PKG-libidn-$VRS.tar.bz2"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
* ) FILE="$PKG-$VRS.tar.bz2"
|
|
||||||
|
"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
|
download $PKG $FILE
|
||||||
|
# There can be no patches for this file
|
||||||
|
continue
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"uClibc-patch" ) continue ;;
|
||||||
|
|
||||||
|
* )
|
||||||
|
FILE="$PKG-$VRS.tar.bz2" ; download $PKG $FILE ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
for patch in `grep "$PKG-&$PKG" $JHALFSDIR/patches` ; do
|
for patch in `grep "$PKG-&$PKG" $JHALFSDIR/patches` ; do
|
||||||
|
|
|
@ -1,22 +1,25 @@
|
||||||
<?xml version='1.0' encoding='ISO-8859-1'?>
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
|
|
||||||
<!-- Get list of patch files from the BLFS Book -->
|
<!-- $Id$ -->
|
||||||
<!-- $LastChangedBy$ -->
|
<!-- Get list of patch files from the HLFS Book -->
|
||||||
<!-- $Date$ -->
|
|
||||||
|
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
version="1.0">
|
version="1.0">
|
||||||
|
|
||||||
<xsl:output method="text"/>
|
<xsl:output method="text"/>
|
||||||
|
|
||||||
|
<!-- What libc implentation must be used? -->
|
||||||
|
<xsl:param name="model" select="glibc"/>
|
||||||
|
|
||||||
<!-- No text needed -->
|
<!-- No text needed -->
|
||||||
<xsl:template match="//text()">
|
<xsl:template match="//text()">
|
||||||
<xsl:text/>
|
<xsl:text/>
|
||||||
</xsl:template>
|
</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: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:value-of select="@url"/>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
|
@ -556,10 +556,10 @@ build_patches_file() { # Supply a suitably formated list of patches.
|
||||||
|
|
||||||
xsltproc --nonet \
|
xsltproc --nonet \
|
||||||
--xinclude \
|
--xinclude \
|
||||||
|
--stringparam model $MODEL \
|
||||||
-o patcheslist_.wget \
|
-o patcheslist_.wget \
|
||||||
patcheslist.xsl \
|
patcheslist.xsl \
|
||||||
$BOOK/chapter04/patches.xml
|
$BOOK/chapter04/patches.xml
|
||||||
#> /dev/null 2>&1
|
|
||||||
|
|
||||||
rm -f patches
|
rm -f patches
|
||||||
|
|
||||||
|
|
Reference in a new issue