CLFS=${LFS}
+function function_exists
+{
+ local FUNCTION_NAME=$1
+
+ [ -z "$FUNCTION_NAME" ] && return 1
+
+ declare -F "$FUNCTION_NAME" > /dev/null 2>&1
+
+ return $?
+}
+
# Extracting the version number from a complete package name.
# Arg. #1: Complete package name with version (ex: firefox-3.5.5.source will output 3.5.5)
get_pkg_ver()
exit ${EXIT_FAILURE}
fi
+ # Checking if there is a corresponding config.cache file
+ local cache_file=$(pwd)/config.cache.$(get_pkg_name ${PACKAGE_NAME})
+ if [ -f ${cache_file} ]; then
+ CONFIGURE_OPTS="${CONFIGURE_OPTS} --cache-file=${cache_file}"
+ fi
+
PACKAGE_LOG=${LFS_LOG_DIR}/${LABEL}.log
# Checking if package was previously successfully installed
}
# Installation of a package, removing source and build directories after.
+# Try to merge this function with static_ipkg()???
#
# First argument: package name
# Second argument: script name
fi
local PACKAGE=${1}
- local CUSTOM_SCRIPT=${2}
local LABEL=${PACKAGE}
+ local CUSTOM_SCRIPT=${2}
shift
shift
local CONFIGURE_OPTS=${*}
ipkg ${PACKAGE} ${CUSTOM_SCRIPT} ${LABEL} ${CONFIGURE_OPTS}
}
-# Installation of a package conforming to GNU autotools.
-# The package must be able to be built outside the
-# source directory.
+# Static function called by:
+# ipkg_ac
+# ipkg_ac_nb
+# ipkg_gnome
#
-# First argument: package name
+# First argument: script name
+# Second argument: package name
# Remaining arguments: additional configure options
-ipkg_ac()
+static_ipkg()
{
# Checking for correct number of arguments
- if [ $# -lt 1 ]; then
+ if [ $# -lt 2 ]; then
echo
echo "${FUNCNAME}(): Wrong number of arguments"
echo " command was: \"${FUNCNAME}() $*\""
exit ${EXIT_FAILURE}
fi
- local PACKAGE=${1}
+ local SCRIPT=${1}
+ local PACKAGE=${2}
local LABEL=${PACKAGE}
shift
+ shift
local CONFIGURE_OPTS=${*}
- ipkg ${PACKAGE} cis-ac ${LABEL} ${CONFIGURE_OPTS}
+ ipkg ${PACKAGE} ${SCRIPT} ${LABEL} ${CONFIGURE_OPTS}
+}
+
+
+# Installation of a package conforming to GNU autotools.
+# The package must be able to be built outside the
+# source directory.
+#
+# First argument: package name
+# Remaining arguments: additional configure options
+ipkg_ac()
+{
+ static_ipkg cis-ac ${*}
}
# Installation of a package conforming to GNU autotools,
# Remaining arguments: additional configure options
ipkg_ac_nb()
{
- # Checking for correct number of arguments
- if [ $# -lt 1 ]; then
- echo
- echo "${FUNCNAME}(): Wrong number of arguments"
- echo " command was: \"${FUNCNAME}() $*\""
- exit ${EXIT_FAILURE}
- fi
-
- local PACKAGE=${1}
- local LABEL=${PACKAGE}
- shift
- local CONFIGURE_OPTS=${*}
-
- ipkg ${PACKAGE} cis-ac-nobuild ${LABEL} ${CONFIGURE_OPTS}
+ static_ipkg cis-ac-nobuild ${*}
}
# Installation of a GNOME package.
# Remaining arguments: additional configure options
ipkg_gnome()
{
- # Checking for correct number of arguments
- if [ $# -ne 1 ]; then
- echo
- echo "${FUNCNAME}(): Wrong number of arguments"
- echo " command was: \"${FUNCNAME}() $*\""
- exit ${EXIT_FAILURE}
- fi
-
- local PACKAGE=${1}
- local LABEL=${PACKAGE}
- shift
- local CONFIGURE_OPTS=${*}
-
- ipkg ${PACKAGE} cis-gnome ${LABEL} ${CONFIGURE_OPTS}
+ static_ipkg cis-gnome ${*}
}
# Installation of a PERL module
AUTOMAKE="automake-1.11.1"
BABL="babl-0.1.2"
-BASH="bash-4.0"
+BASH="bash-4.1"
BC="bc-1.06"
-BISON="bison-2.4.1"
+BISON="bison-2.4.2"
BIND="bind-9.6.1-P3"
BINUTILS="binutils-2.20.1"
ARM_BINUTILS=${BINUTILS}
CLAMAV="clamav-0.93.3"
CLOOG_PPL="cloog-ppl-0.15.9"
CONSOLEKIT="ConsoleKit-0.4.1"
-COREUTILS="coreutils-7.6"
+COREUTILS="coreutils-8.5"
CPIO="cpio-2.9"
CUPS="cups-1.4.2"
CUPS_PDF="cups-pdf-2.5.0"
DEJAGNU="dejagnu-1.4.4"
DESKTOP_FILE_UTILS="desktop-file-utils-0.15"
DHCP="dhcp-3.0.6"
-DIFFUTILS="diffutils-2.8.7"
+DIFFUTILS="diffutils-3.0"
DOCBOOK_DSSSL_VER="1.79"
DOCBOOK_DSSSL="docbook-dsssl-${DOCBOOK_DSSSL_VER}"
DOCBOOK_UTILS="docbook-utils-0.6.14"
DVDFS="dvdfs-0.2"
DVDRWTOOLS="dvd+rw-tools-7.1"
-E2FSPROGS="e2fsprogs-1.41.9"
+E2FSPROGS="e2fsprogs-1.41.12"
EASYTAG="easytag-2.1"
ED="ed-1.4"
EGGDBUS="eggdbus-0.6"
FRIBIDI="fribidi-0.10.9"
FUSE="fuse-2.8.3"
-GAWK="gawk-3.1.7"
+GAWK="gawk-3.1.8"
GC="gc6.8"
GCC="gcc-4.5.1"
# Specify bug-fixing patches manually
GEDA_GATTRIB="geda-gattrib-1.2.0"
GEGL="gegl-0.1.2"
GETDATE="getdate_rfc868-1.2"
-GETTEXT="gettext-0.17"
+GETTEXT="gettext-0.18.1.1"
GHOSTSCRIPT="ghostscript-8.71"
GHOSTSCRIPT_FONTS_STD="ghostscript-fonts-std-8.11"
GHOSTSCRIPT_FONTS_OTHER="ghostscript-fonts-other-6.0"
GOFFICE="goffice-0.2.2"
GNUMERIC="gnumeric-1.6.3"
GNUPG="gnupg-1.4.9"
-GREP="grep-2.5.4"
+GREP="grep-2.6.3"
GRIP="grip-3.3.1"
GROFF="groff-1.20.1"
GRUB="grub-0.97"
GTK_ENGINES="gtk-engines-2.18.5"
GTKMM="gtkmm-2.18.2"
GUILE="guile-1.8.7"
-GZIP="gzip-1.3.12"
+GZIP="gzip-1.4"
HAL="hal-0.5.14"
HAL_INFO="hal-info-20091130"
LTSP_UTILS="ltsp-utils-0.25-0"
MAILMAN="mailman-2.1.8"
-MAKE_PACKAGE="make-3.81"
+MAKE_PACKAGE="make-3.82"
MAN_DB="man-db-2.5.6"
MANPAGES="man-pages-3.23"
METACITY="metacity-2.18.5"
-MFOUR="m4-1.4.13"
+MFOUR="m4-1.4.14"
MILTER_GREYLIST="milter-greylist-4.0"
MILTER_SPF="smf-spf-2.0.1"
-MODULE_INIT_TOOLS="module-init-tools-3.11.1"
+MODULE_INIT_TOOLS="module-init-tools-3.12"
MPC="mpc-0.8.2"
MPFR="mpfr-3.0.0"
MUTT="mutt-1.5.20"
PANGO="pango-1.26.2"
PANGOMM="pangomm-2.26.0"
PARTED="parted-1.9.0"
-PATCH_PACKAGE="patch-2.5.9"
+PATCH_PACKAGE="patch-2.6"
PCIUTILS="pciutils-3.1.4"
PCMANFM="pcmanfm-0.5"
PCRE="pcre-8.00"
T1LIB="t1lib-5.1.2"
TANGO_ICON_THEME="tango-icon-theme-0.8.90"
TANGO_ICON_THEME_EXTRAS="tango-icon-theme-extras-0.1.0"
-TAR_PACKAGE="tar-1.22"
+TAR_PACKAGE="tar-1.23"
TCPDUMP="tcpdump-4.0.0"
TCL="tcl8.5.8-src"
TCPWRAPPERS="tcp_wrappers_7.6"
TK="tk8.5.8-src"
TRANSMISSION="transmission-1.34"
-UDEV="udev-151"
+UDEV="udev-160"
UDEV_CONFIG="udev-config-20100128"
UML_UTILITIES="uml_utilities_20070815"
UNRAR="unrar-3.7.8"
UNZIP="unzip-5.52"
UPSTART="upstart-0.6.3"
USBUTILS="usbutils-0.86"
-UTIL_LINUX_NG="util-linux-ng-2.16.1"
+UTIL_LINUX_NG="util-linux-ng-2.18"
UW_IMAP="imap-2004g"
VORBIS_TOOLS="vorbis-tools-1.1.1"
ZIP="zip-3.0"
-ZLIB="zlib-1.2.3"
+ZLIB="zlib-1.2.5"
# Prevents the configure script from setting LD_LIBRARY_PATH when it finds PPL.
# This will prevent any conflicts with libraries from the host system:
-cd ${LFS_TMP}/${PACKAGE}
-cp -v configure{,.orig}
-sed "/LD_LIBRARY_PATH=/d" configure.orig > configure
+sed -e "/LD_LIBRARY_PATH=/d" -i ${LFS_TMP}/${PACKAGE}/configure
cd ${LFS_TMP}/${PACKAGE}-build
../${PACKAGE}/configure \
case "${HVL_TARGET}" in
x86*)
ipkg_ac ${FILE_PKG}
- ipkg_cust ${NCURSES} cis-ncurses "--without-debug --without-shared"
+ ipkg_cust ${NCURSES} cis-ncurses "\
+ --without-debug \
+ --without-shared"
;;
esac
CPPFLAGS=-fexceptions \
ipkg_ac ${GMP} "--enable-cxx"
-LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
- ipkg_ac ${MPFR} "--enable-shared --with-gmp=/cross-tools"
-
-LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
- ipkg_ac ${MPC} "--enable-shared \
- --with-gmp=/cross-tools \
- --with-mpfr=/cross-tools"
-
-LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
- ipkg_ac ${PPL} "--enable-shared \
- --enable-interfaces=c,cxx \
- --disable-optimization \
- --with-libgmp-prefix=/cross-tools \
- --with-libgmpxx-prefix=/cross-tools"
-
-LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
- ipkg_cust ${CLOOG_PPL} cis-cloog-ppl "--enable-shared --with-bits=gmp \
- --with-gmp=/cross-tools --with-ppl=/cross-tools"
+export LDFLAGS="-Wl,-rpath,/cross-tools/lib"
+
+ipkg_ac ${MPFR} "\
+ --enable-shared \
+ --with-gmp=/cross-tools"
+ipkg_ac ${MPC} "\
+ --with-gmp=/cross-tools \
+ --with-mpfr=/cross-tools"
+ipkg_ac ${PPL} "\
+ --enable-shared \
+ --enable-interfaces=c,cxx \
+ --disable-optimization \
+ --with-libgmp-prefix=/cross-tools \
+ --with-libgmpxx-prefix=/cross-tools"
+ipkg_cust ${CLOOG_PPL} cis-cloog-ppl "\
+ --enable-shared \
+ --with-bits=gmp \
+ --with-gmp=/cross-tools \
+ --with-ppl=/cross-tools"
+
+LDFLAGS=""
ipkg_cust ${BINUTILS} cis-binutils
ipkg ${GCC} cis-gcc-pass1 "${GCC}-pass1"
--- /dev/null
+#!/bin/bash
+
+build_custom()
+{
+ ${HVMAKE}
+ ${HVMAKE} install
+
+ ln -svfT bash /tools/bin/sh
+}
--- /dev/null
+#!/bin/bash
+
+build_custom()
+{
+ ${HVMAKE} configure-host
+ ${HVMAKE}
+ ${HVMAKE} install
+}
--- /dev/null
+#!/bin/bash
+
+build_custom()
+{
+ # When PPL is cross-compiled, it does not check whether GMP was compiled
+ # with support for exceptions, and simply assumes it was not. This
+ # assumption is incorrect, so we will fix that:
+ echo '#define PPL_GMP_SUPPORTS_EXCEPTIONS 1' >> confdefs.h
+
+ ${HVMAKE}
+ ${HVMAKE} install
+}
--- /dev/null
+#!/bin/bash
+
+build_custom()
+{
+ ${HVMAKE} -C tools/gnulib/lib
+ ${HVMAKE} -C tools
+ ${HVMAKE}
+ ${HVMAKE} install
+}
--- /dev/null
+#!/bin/bash
+set -o errexit
+
+# First argument of this script is the package name.
+# Remaining arguments are additional configure options.
+
+PACKAGE=${1}
+shift
+CONFIGURE_OPTS=${*}
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${PACKAGE}
+
+cd ${LFS_TMP}/${PACKAGE}
+
+CC="${CC} ${CLFS_BUILDFLAGS}" CXX="${CXX} ${CLFS_BUILDFLAGS}" \
+ ./configure \
+ --prefix=/tools \
+ --build=${CLFS_HOST} \
+ --host=${CLFS_TARGET} \
+ ${CONFIGURE_OPTS}
+${HVMAKE}
+${HVMAKE} install
+
+exit $?
+++ /dev/null
-#!/bin/bash
-set -o errexit
-
-# First argument of this script is the package name.
-# Remaining arguments are additional configure options.
-
-PACKAGE=${1}
-shift
-CONFIGURE_OPTS=${*}
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${PACKAGE}
-
-cd ${LFS_TMP}/${PACKAGE}-build
-
-# When Bash is cross-compiled, it cannot test for the presence of named pipes,
-# among other things. If you used su to become an unprivileged user, this
-# combination will cause Bash to build without process substitution, which
-# will break one of the C++ test scripts in eglibc. The following prevents
-# future problems by skipping the check for named pipes, as well as other tests
-# that can not run while cross-compiling or that do not run properly:
-cat > config.cache << "EOF"
-ac_cv_func_mmap_fixed_mapped=yes
-ac_cv_func_strcoll_works=yes
-ac_cv_func_working_mktime=yes
-bash_cv_func_sigsetjmp=present
-bash_cv_getcwd_malloc=yes
-bash_cv_job_control_missing=present
-bash_cv_printf_a_format=yes
-bash_cv_sys_named_pipes=present
-bash_cv_ulimit_maxfds=yes
-bash_cv_under_sys_siglist=yes
-bash_cv_unusable_rtsigs=no
-gt_cv_int_divbyzero_sigfpe=yes
-EOF
-
-${SCRDIR}/cis-common ${PACKAGE} "${CONFIGURE_OPTS} --without-bash-malloc --cache-file=config.cache"
-
-ln -svfT bash /tools/bin/sh
-
-exit $?
+++ /dev/null
-#!/bin/bash
-set -o errexit
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1}
-
-case "${HVL_TARGET}" in
- "x86_64")
- # This adds 64 bit support to Binutils.
- TARGET_CONFIGURE_OPTS="--enable-64-bit-bfd"
- ;;
-esac
-
-# --prefix=/tools
-# This tells the configure script to prepare to install the package in the /tools directory.
-# --host=${CLFS_HOST}
-# --target=${CLFS_TARGET}
-# Creates a cross-architecture executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_HOST}.
-# --with-lib-path=/tools/lib
-# Specify the library search path during the compilation of Binutils, resulting in /tools/lib
-# being passed to the linker. This prevents the linker from searching through library directories on the host.
-# --disable-nls
-# This disables internationalization as i18n is not needed for the cross-compile tools.
-# --enable-shared
-# Enable the creation of the shared libraries.
-# --disable-multilib
-# This option disables the building of a multilib capable Binutils.
-# --enable-64-bit-bfd
-# This adds 64 bit support to Binutils.
-cd ${LFS_TMP}/${1}-build
-CC="${CC} ${CLFS_BUILDFLAGS}" \
- ../${1}/configure \
- --prefix=/tools \
- --build=${CLFS_HOST} \
- --host=${CLFS_TARGET} \
- --target=${CLFS_TARGET} \
- --with-lib-path=/tools/lib \
- --disable-nls \
- --enable-shared \
- --disable-multilib \
- ${TARGET_CONFIGURE_OPTS}
-${HVMAKE} configure-host
-${HVMAKE}
-${HVMAKE} install
-
-exit $?
# Bzip2's default Makefile target automatically runs the testsuite as well.
# Disable the tests since they won't work on a multi-architecture build:
-cp -v Makefile{,.orig}
-sed -e 's@^\(all:.*\) test@\1@g' Makefile.orig > Makefile
+sed -e 's@^\(all:.*\) test@\1@g' -i Makefile
# This package doesn't have a configure script...
${HVMAKE} CC="${CC} ${CLFS_BUILDFLAGS}" AR="${AR}" RANLIB="${RANLIB}"
source ${SCRDIR}/../functions
source ${SCRDIR}/../packages-list
+suf=$(get_pkg_name ${PACKAGE})
+for scrtype in configure.pre build; do
+ myscr=${SCRDIR}/${scrtype}.${suf}
+
+ if [ -f ${myscr} ]; then
+ source ${myscr}
+ fi
+done
+
cd ${LFS_TMP}/${PACKAGE}-build
+# Execute pre-configure function if applicable
+if function_exists configure_pre ; then
+ echo "Running configure pre-script"
+ configure_pre
+fi
+
CC="${CC} ${CLFS_BUILDFLAGS}" CXX="${CXX} ${CLFS_BUILDFLAGS}" \
../${PACKAGE}/configure \
--prefix=/tools \
--build=${CLFS_HOST} \
--host=${CLFS_TARGET} \
${CONFIGURE_OPTS}
-${HVMAKE}
-${HVMAKE} install
+
+if function_exists build_custom ; then
+ # Execute custom build function if applicable
+ echo "Running custom build function"
+ build_custom
+else
+ # Standard build
+ ${HVMAKE}
+ ${HVMAKE} install
+fi
exit $?
+++ /dev/null
-#!/bin/bash
-set -o errexit
-
-# First argument of this script is the package name.
-# Remaining arguments are additional configure options.
-
-PACKAGE=${1}
-shift
-CONFIGURE_OPTS=${*}
-
-# Reading system configuration informations, functions and package versions.
-source ${SCRDIR}/../sysinfos
-source ${SCRDIR}/../functions
-source ${SCRDIR}/../packages-list
-
-cd ${LFS_TMP}/${PACKAGE}-build
-
-CC="${CC} ${CLFS_BUILDFLAGS}" CXX="${CXX} ${CLFS_BUILDFLAGS}" \
- ../${PACKAGE}/configure \
- --build=${CLFS_HOST} \
- --host=${CLFS_TARGET} \
- ${CONFIGURE_OPTS}
-
-exit $?
+++ /dev/null
-#!/bin/bash
-set -o errexit
-
-# First argument of this script is the package name.
-# Remaining arguments are additional configure options.
-
-PACKAGE=${1}
-shift
-CONFIGURE_OPTS=${*}
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${PACKAGE}
-
-# Fix a bug with help2man???
-cd ${LFS_TMP}/${PACKAGE}
-touch man/hostname.1
-touch man/uname.1
-
-cd ${LFS_TMP}/${PACKAGE}-build
-
-# Configure can not properly determine how to get free space when
-# cross-compiling - as a result, the df program will not be built. Add the
-# following entries to config.cache to correct this, and fix various
-# cross-compiling issues:
-cat > config.cache << EOF
-fu_cv_sys_stat_statfs2_bsize=yes
-gl_cv_func_rename_trailing_slash_bug=no
-gl_cv_func_working_mkstemp=yes
-EOF
-
-${SCRDIR}/cis-common ${PACKAGE} "${CONFIGURE_OPTS} --enable-install-program=hostname --cache-file=config.cache"
-
-exit $?
../${PACKAGE}/configure \
--prefix=/tools \
--enable-elf-shlibs \
- --with-cc="${CC} ${CLFS_BUILDFLAGS}" \
--with-linker=${LD} \
--host=${CLFS_TARGET} \
--disable-libblkid \
+++ /dev/null
-#!/bin/bash
-set -o errexit
-
-# First argument of this script is the package name.
-# Remaining arguments are additional configure options.
-
-PACKAGE=${1}
-shift
-CONFIGURE_OPTS=${*}
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${PACKAGE}
-
-cd ${LFS_TMP}/${PACKAGE}-build
-
-# The following cache entries set the values for tests that do not run while
-# cross-compiling:
-cat > config.cache << EOF
-gl_cv_func_wcwidth_works=yes
-ac_cv_func_fnmatch_gnu=yes
-EOF
-
-${SCRDIR}/cis-common ${PACKAGE} "${CONFIGURE_OPTS} --cache-file=config.cache"
-
-exit $?
+++ /dev/null
-#!/bin/bash
-set -o errexit
-
-# First argument of this script is the package name.
-# Remaining arguments are additional configure options.
-
-PACKAGE=${1}
-shift
-CONFIGURE_OPTS=${*}
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${PACKAGE}
-
-cd ${LFS_TMP}/${PACKAGE}
-
-# Make sure that Flex doesn't try to include headers from /usr/include.
-cp -v Makefile.in{,.orig}
-sed "s/-I@includedir@//g" Makefile.in.orig > Makefile.in
-
-cd ${LFS_TMP}/${PACKAGE}-build
-
-# When Cross Compiling the configure script does not determine the correct
-# values for the following, Set the values manually:
-cat > config.cache << EOF
-ac_cv_func_malloc_0_nonnull=yes
-ac_cv_func_realloc_0_nonnull=yes
-EOF
-
-${SCRDIR}/cis-common ${PACKAGE} "${CONFIGURE_OPTS} --cache-file=config.cache"
-
-exit $?
source ../functions
source ../packages-list
-# Manually applying patches
-apply_patch ${1}-branch_update-1.patch ${1}
+# Manually applying patches if specified
+if [ -n "${GCC_PATCHES}" ]; then
+ for p in ${GCC_PATCHES}; do
+ apply_patch ${1}-${p}.patch ${1}
+ done
+fi
case "${HVL_TARGET}" in
"x86")
--enable-__cxa_atexit \
--enable-languages=c,c++
# Prevent GCC from looking in the wrong directories for headers and libraries:
-cp Makefile{,.orig}
-sed "/^HOST_\(GMP\|PPL\|CLOOG\)\(LIBS\|INC\)/s:-[IL]/\(lib\|include\)::" \
- Makefile.orig > Makefile
+sed -e "/^HOST_\(GMP\|PPL\|CLOOG\)\(LIBS\|INC\)/s:-[IL]/\(lib\|include\)::" \
+ -i Makefile
${HVMAKE} AS_FOR_TARGET="${AS}" LD_FOR_TARGET="${LD}"
${HVMAKE} install
+++ /dev/null
-#!/bin/bash
-set -o errexit
-
-# First argument of this script is the package name.
-# Remaining arguments are additional configure options.
-
-PACKAGE=${1}
-shift
-CONFIGURE_OPTS=${*}
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${PACKAGE}
-
-cd ${LFS_TMP}/${PACKAGE}-build
-
-# Configure can not properly determine the results of the following tests:
-cat > config.cache << EOF
-gl_cv_func_btowc_eof=yes
-gl_cv_func_mbrtowc_incomplete_state=yes
-gl_cv_func_mbrtowc_sanitycheck=yes
-gl_cv_func_mbrtowc_null_arg=yes
-gl_cv_func_mbrtowc_retval=yes
-gl_cv_func_mbrtowc_nul_retval=yes
-gl_cv_func_wcrtomb_retval=yes
-gl_cv_func_wctob_works=yes
-EOF
-
-${SCRDIR}/cis-common ${PACKAGE} "${CONFIGURE_OPTS} --cache-file=config.cache"
-
-exit $?
--- /dev/null
+#!/bin/bash
+set -o errexit
+
+# First argument of this script is the package name.
+# Remaining arguments are additional configure options.
+
+PACKAGE=${1}
+shift
+CONFIGURE_OPTS=${*}
+
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
+source ../functions
+source ../packages-list
+
+# Applying patches (if any)
+apply_patches ${PACKAGE}
+
+cd ${LFS_TMP}/${PACKAGE}-build
+
+CC="${CC} ${CLFS_BUILDFLAGS}" CXX="${CXX} ${CLFS_BUILDFLAGS}" \
+ ../${PACKAGE}/configure \
+ --prefix=/tools \
+ --build=${CLFS_HOST} \
+ --host=${CLFS_TARGET} \
+ ${CONFIGURE_OPTS}
+# When PPL is cross-compiled, it does not check whether GMP was compiled with
+# support for exceptions, and simply assumes it was not. This assumption is
+# incorrect, so we will fix that:
+echo '#define PPL_GMP_SUPPORTS_EXCEPTIONS 1' >> confdefs.h
+
+${HVMAKE}
+${HVMAKE} install
+
+exit $?
+++ /dev/null
-#!/bin/bash
-set -o errexit
-
-# First argument of this script is the package name.
-# Remaining arguments are additional configure options.
-
-PACKAGE=${1}
-shift
-CONFIGURE_OPTS=${*}
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${PACKAGE}
-
-cd ${LFS_TMP}/${PACKAGE}-build
-
-# Configure can not properly determine the results of a few tests. Set them manually:
-cat > config.cache << EOF
-gl_cv_func_wcwidth_works=yes
-gl_cv_func_btowc_eof=yes
-ac_cv_func_malloc_0_nonnull=yes
-ac_cv_func_realloc_0_nonnull=yes
-gl_cv_func_mbrtowc_incomplete_state=yes
-gl_cv_func_mbrtowc_nul_retval=yes
-gl_cv_func_mbrtowc_null_arg=yes
-gl_cv_func_mbrtowc_retval=yes
-gl_cv_func_wcrtomb_retval=yes
-EOF
-
-${SCRDIR}/cis-common ${PACKAGE} "${CONFIGURE_OPTS} --cache-file=config.cache"
-
-exit $?
+++ /dev/null
-#!/bin/bash
-set -o errexit
-
-# First argument of this script is the package name.
-# Remaining arguments are additional configure options.
-
-PACKAGE=${1}
-shift
-CONFIGURE_OPTS=${*}
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${PACKAGE}
-
-cd ${LFS_TMP}/${PACKAGE}-build
-
-CC="${CC} ${CLFS_BUILDFLAGS}" CXX="${CXX} ${CLFS_BUILDFLAGS}" \
- ../${PACKAGE}/configure \
- --prefix=/tools \
- --build=${CLFS_HOST} \
- --host=${CLFS_TARGET} \
- ${CONFIGURE_OPTS}
-${HVMAKE} -C tools/gnulib/lib
-${HVMAKE} -C tools
-${HVMAKE}
-${HVMAKE} install
-
-exit $?
# Applying patches (if any)
apply_patches ${PACKAGE}
-${SCRDIR}/cis-common2 ${PACKAGE} "${CONFIGURE_OPTS} --enable-login-utils --disable-makeinstall-chown"
cd ${LFS_TMP}/${PACKAGE}-build
+
+CC="${CC} ${CLFS_BUILDFLAGS}" CXX="${CXX} ${CLFS_BUILDFLAGS}" \
+ ../${PACKAGE}/configure \
+ --build=${CLFS_HOST} \
+ --host=${CLFS_TARGET} \
+ --enable-login-utils \
+ --disable-makeinstall-chown
${HVMAKE}
${HVMAKE} DESTDIR=${LFS} install
cd ${LFS_TMP}/${1}
CC="${CC} ${CLFS_BUILDFLAGS}" ./configure \
- --prefix=/tools \
- --shared
+ --prefix=/tools
${HVMAKE}
# Installing the shared library
--- /dev/null
+# When Bash is cross-compiled, it cannot test for the presence of named pipes,
+# among other things. If you used su to become an unprivileged user, this
+# combination will cause Bash to build without process substitution, which
+# will break one of the C++ test scripts in eglibc. The following prevents
+# future problems by skipping the check for named pipes, as well as other tests
+# that can not run while cross-compiling or that do not run properly:
+
+ac_cv_func_mmap_fixed_mapped=yes
+ac_cv_func_strcoll_works=yes
+ac_cv_func_working_mktime=yes
+bash_cv_func_sigsetjmp=present
+bash_cv_getcwd_malloc=yes
+bash_cv_job_control_missing=present
+bash_cv_printf_a_format=yes
+bash_cv_sys_named_pipes=present
+bash_cv_ulimit_maxfds=yes
+bash_cv_under_sys_siglist=yes
+bash_cv_unusable_rtsigs=no
+gt_cv_int_divbyzero_sigfpe=yes
--- /dev/null
+# Configure can not properly determine how to get free space when
+# cross-compiling - as a result, the df program will not be built. Add the
+# following entries to config.cache to correct this, and fix various
+# cross-compiling issues:
+fu_cv_sys_stat_statfs2_bsize=yes
+gl_cv_func_working_mkstemp=yes
--- /dev/null
+# The following cache entries set the values for tests that do not run while
+# cross-compiling:
+gl_cv_func_wcwidth_works=yes
+ac_cv_func_fnmatch_gnu=yes
--- /dev/null
+# When Cross Compiling the configure script does not determine the correct
+# values for the following, Set the values manually:
+ac_cv_func_malloc_0_nonnull=yes
+ac_cv_func_realloc_0_nonnull=yes
--- /dev/null
+# When cross-compiling the Gettext configure script assumes we don't have a
+# working wcwidth when we do. The following will fix possible compilation
+# errors because of this assumption:
+gl_cv_func_wcwidth_works=yes
--- /dev/null
+ac_cv_func_malloc_0_nonnull=yes
+ac_cv_func_realloc_0_nonnull=yes
--- /dev/null
+# Configure can not properly determine the results of the following tests:
+gl_cv_func_btowc_eof=yes
+gl_cv_func_mbrtowc_incomplete_state=yes
+gl_cv_func_mbrtowc_sanitycheck=yes
+gl_cv_func_mbrtowc_null_arg=yes
+gl_cv_func_mbrtowc_retval=yes
+gl_cv_func_mbrtowc_nul_retval=yes
+gl_cv_func_wcrtomb_retval=yes
+gl_cv_func_wctob_works=yes
--- /dev/null
+# Configure can not properly determine the results of a few tests.
+gl_cv_func_wcwidth_works=yes
+gl_cv_func_btowc_eof=yes
+ac_cv_func_malloc_0_nonnull=yes
+ac_cv_func_realloc_0_nonnull=yes
+gl_cv_func_mbrtowc_incomplete_state=yes
+gl_cv_func_mbrtowc_nul_retval=yes
+gl_cv_func_mbrtowc_null_arg=yes
+gl_cv_func_mbrtowc_retval=yes
+gl_cv_func_wcrtomb_retval=yes
--- /dev/null
+#!/bin/bash
+
+configure_pre()
+{
+ case "${HVL_TARGET}" in
+ "x86_64")
+ # This adds 64 bit support to Binutils.
+ CONFIGURE_OPTS="${CONFIGURE_OPTS} --enable-64-bit-bfd"
+ ;;
+ esac
+}
--- /dev/null
+#!/bin/bash
+
+# Prevents the configure script from setting LD_LIBRARY_PATH when it finds PPL.
+# This will prevent any conflicts with libraries from the host system.
+configure_pre()
+{
+ sed -e "/LD_LIBRARY_PATH=/d" -i ${LFS_TMP}/${PACKAGE}/configure
+}
--- /dev/null
+#!/bin/bash
+
+configure_pre()
+{
+ # Fix a bug when the uname patch is automatically applied
+ touch ${LFS_TMP}/${PACKAGE}/man/{uname,hostname}.1
+}
--- /dev/null
+#!/bin/bash
+
+configure_pre()
+{
+ # Make sure that Flex doesn't try to include headers from /usr/include.
+ sed -e "s/-I@includedir@//g" -i ${LFS_TMP}/${PACKAGE}/Makefile.in
+}
--- /dev/null
+#!/bin/bash
+
+configure_pre()
+{
+ # Add a missing include statement into one of the source files:
+ sed -e '/"m4.h"/i\#include <sys/stat.h>' -i ${LFS_TMP}/${PACKAGE}/src/path.c
+}
HOST_CC=gcc CPPFLAGS=-fexceptions \
ipkg_ac ${GMP} "--enable-cxx"
ipkg_ac ${MPFR} "--enable-shared"
+ipkg_ac ${MPC}
ipkg_ac ${PPL} "\
--enable-shared \
--enable-interfaces=c,cxx \
--with-gmp=/tools \
--with-ppl=/tools"
ipkg_cust ${ZLIB} cis-zlib
-ipkg_cust ${BINUTILS} cis-binutils
+ipkg_ac ${BINUTILS} "\
+ --target=${CLFS_TARGET} \
+ --with-lib-path=/tools/lib \
+ --disable-nls \
+ --enable-shared \
+ --disable-multilib"
ipkg_cust ${GCC} cis-gcc
-ipkg_ac ${NCURSES} "--with-shared --without-debug --without-ada --enable-overwrite --with-build-cc=gcc"
-ipkg_cust ${BASH} cis-bash
+ipkg_ac ${NCURSES} "\
+ --with-shared \
+ --without-debug \
+ --without-ada \
+ --enable-overwrite \
+ --with-build-cc=gcc"
+ipkg_ac ${BASH} "--without-bash-malloc"
ipkg_ac ${BISON}
ipkg_cust ${BZIP2} cis-bzip2
-ipkg_cust ${COREUTILS} cis-coreutils
+ipkg_ac ${COREUTILS} "--enable-install-program=hostname"
ipkg_ac ${DIFFUTILS}
-ipkg_cust ${FINDUTILS} cis-findutils
+ipkg_ac ${FINDUTILS}
ipkg_ac ${FILE_PKG}
-ipkg_cust ${FLEX} cis-flex
-ipkg_ac ${GAWK} "--disable-libsigsegv"
+ipkg_ac ${FLEX}
+ipkg_ac ${GAWK}
ipkg_cust ${GETTEXT} cis-gettext
-ipkg_ac ${GREP} "--disable-perl-regexp --without-included-regex"
+ipkg_ac ${GREP} "\
+ --disable-perl-regexp \
+ --without-included-regex"
ipkg_ac ${GZIP}
-ipkg_cust ${MFOUR} cis-m4
+ipkg_ac ${MFOUR}
ipkg_ac ${MAKE_PACKAGE}
ipkg_ac ${PATCH_PACKAGE}
ipkg_ac ${SED}
-ipkg_cust ${TAR_PACKAGE} cis-tar
-ipkg_cust ${TEXINFO} cis-texinfo
+ipkg_ac ${TAR_PACKAGE}
+ipkg_ac ${TEXINFO}
ipkg_ac ${XZ_UTILS}
# Chapter 7
rscr once "Creating directory structure" create-directories
rscr once "Creating symbolic links" create-symlinks
-ipkg_ac ${NANO} --enable-color --enable-multibuffer
+ipkg_ac ${NANO} "--enable-color --enable-multibuffer"
ipkg_cust ${UTIL_LINUX_NG} cis-util-linux-ng
ipkg_cust ${E2FSPROGS} cis-e2fsprogs
ipkg_cust ${SYSVINIT} cis-sysvinit
# These packages are already downloaded for stage0:
lpkg 0 ${GMP}
lpkg 0 ${MPFR}
+lpkg 0 ${MPC}
lpkg 0 ${PPL}
lpkg 0 ${CLOOG_PPL}
lpkg 0 ${BINUTILS}
fpkg_gnu ${BISON}
fpkg ${BZIP2} "http://www.bzip.org/$(get_pkg_ver ${BZIP2})"
fpkg_gnu ${COREUTILS}
-fpkg ${DIFFUTILS} "ftp://alpha.gnu.org/gnu/diffutils"
+fpkg_gnu ${DIFFUTILS}
fpkg_gnu ${FINDUTILS}
fpkg_sf ${FLEX}
fpkg_gnu ${GAWK}