You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

166 lines
4.1 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../uclibc/uclibc.conf
# Copyright (C) 2006 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
. $confdir/functions.in
# create /etc/ld.so.conf
hook_add postinstall 5 'uclibc_ldsoconf'
uclibc_ldsoconf() {
cat > $root/etc/ld.so.conf <<-EOT
/lib
/usr/lib
/usr/X11/lib
/opt/*/lib
EOT
}
# rulesets
var_append conffiles ' ' $confdir/clean_arch.config
hook_add preconf 3 "default_config > $builddir/.config"
var_append conffiles ' ' $builddir/.config
# add custom/target configuration from $targetdir
if [ -e $targetdir/uclibc.config ] ; then
var_append conffiles ' ' $targetdir/uclibc.config
fi
default_config()
{
echo "X TARGET_$( echo $arch | arch2uname )"
# case "$arch" in
# i386) cpu
# echo "X CONFIG_$( echo SDECFG_X86_OPT )"
# esac
if [ "$arch_bigendian" = "yes" ]; then
echo "X ARCH_BIG_ENDIAN"
echo "X ARCH_WANTS_BIG_ENDIAN"
else
echo "X ARCH_LITTLE_ENDIAN"
echo "X ARCH_WANTS_LITTLE_ENDIAN"
fi
# PREFIX
if atstage toolchain; then
echo "X KERNEL_SOURCE \"$base/build/$SDECFG_ID/usr\""
else
echo "X KERNEL_SOURCE \"$root/usr\""
fi
echo "X RUNTIME_PREFIX \"/\""
#echo "X DEVEL_PREFIX \"/usr/lib/uclibc\"" # NOTE: why there?
echo "X DEVEL_PREFIX \"/usr\""
if [ "$SDECFG_STATIC" = 0 ]; then
echo "X SHARED_LIB_LOADER_PREFIX \"/lib\""
# ld.so preload
echo "X LDSO_PRELOAD_FILE_SUPPORT"
else
echo "O HAVE_SHARED"
fi
# locale
if [ "$SDECFG_DISABLE_NLS" = "0" ]; then
echo "X UCLIBC_HAS_LOCALE"
fi
# turning off locale will break ncurses
# util-linux needs it to build some mounts
# FIXME: this has to be done in the oposite way (disable those mounts
# if libc doesn't have support)
echo "X UCLIBC_HAS_RPC"
echo "X UCLIBC_HAS_FULL_RPC"
# to get rint (iproute2)
echo "X DO_C99_MATH"
# to make reiserfsprogs happy
echo "X UCLIBC_HAS_GLIBC_CUSTOM_PRINTF"
# to make sed happy
echo "X UCLIBC_HAS_WCHAR"
# I want V6
echo "X UCLIBC_HAS_IPV6"
# needed for attr
echo "X UCLIBC_HAS_FTW"
# needed for acl (among others)
echo "X UCLIBC_HAS_GETTEXT_AWARENESS"
# make make happy :)
echo "X MALLOC_GLIBC_COMPAT"
echo "X UCLIBC_HAS_GNU_GETOPT"
echo "X UCLIBC_HAS_GLOB"
echo "X UCLIBC_HAS_FLOATS"
}
if [ "$SDECFG_DISABLE_NLS" = "0" ]; then
uclibc_preparelocale() {
find ./charmaps -name "*.pairs" > codesets.txt
cp -v LOCALES locales.txt
}
hook_add preconf 5 '( cd extra/locale; uclibc_preparelocale )'
var_append patchfiles ' ' $confdir/make_locale_after_headers.diff
fi
runconf=0
# FIXME: inject X options early - so 2 loops are enough
hook_add premake 5 "auto_config 3"
var_remove_regex makeopt ' ' 'prefix=[^ ]*'
if atstage toolchain; then
var_append makeopt ' ' PREFIX=$base/build/$SDECFG_ID
else
var_append makeopt ' ' "PREFIX=$root"
fi
makeinstopt="$makeopt"
if atstage toolchain; then
var_append makeopt ' ' "headers"
var_append makeinstopt ' ' "install_headers"
else
var_append makeopt ' ' "pregen"
var_append makeopt ' ' "all"
var_append makeopt ' ' "utils"
var_append makeinstopt ' ' "install_dev"
var_append makeinstopt ' ' "install_runtime"
var_append makeinstopt ' ' "install_utils"
fi
hook_add prepatch 5 'sanitize_makefile'
sanitize_makefile() {
sed -i -e 's,\($(RM)\) $(PREFIX)$(DEVEL_PREFIX)\(.*\.h\),\1 \2,' Makefile.in
}
# inject kernel symlinks
hook_add preconf 5 'uclibc_kernellinks'
uclibc_kernellinks() {
local x=
rm -rvf include/scsi
for x in $( ls -1d $root/usr/include/{asm,asm-*,scsi,linux} 2> /dev/null ); do
ln -svf $x include/
done
}
# remove symlinks to avoid shares (install_dev)
hook_add inmake 5 'rm -vf include/{asm,asm-*,scsi,linux}'
hook_add postdoc 5 'cp -v .config $root/$docdir/'