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.
89 lines
3.3 KiB
89 lines
3.3 KiB
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../coreutils/coreutils.conf |
|
# Copyright (C) 2006 - 2013 The OpenSDE Project |
|
# Copyright (C) 2004 - 2006 The T2 SDE Project |
|
# Copyright (C) 1998 - 2003 Clifford Wolf |
|
# |
|
# 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 --- |
|
|
|
# cross-compile: build a 'make-prime-list' which runs on the build host |
|
# idea taken from Cross Linux From Scratch (http://cross-lfs.org) |
|
hostcc_make_prime_list() { |
|
cp -v Makefile{,.orig} |
|
sed -e '/src_make_prime_list/d' \ |
|
-e '/hostname.1/d' Makefile.orig > Makefile |
|
depbase=`echo src/make-prime-list.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ |
|
$HOSTCC -std=gnu99 -I. -I./lib -Ilib -I./lib -Isrc -I./src -I$root$includedir \ |
|
-fdiagnostics-show-option -funit-at-a-time -g -O2 -MT \ |
|
src/make-prime-list.o -MD -MP -MF $depbase.Tpo -c -o src/make-prime-list.o \ |
|
src/make-prime-list.c && |
|
mv -f $depbase.Tpo $depbase.Po |
|
$HOSTCC -std=gnu99 -fdiagnostics-show-option -funit-at-a-time -g -O2 \ |
|
-Wl,--as-needed -o src/make-prime-list src/make-prime-list.o |
|
} |
|
|
|
if atstage cross; then |
|
# http://bugs.gentoo.org/show_bug.cgi?id=269256 |
|
var_append configcache ' ' 'gl_cv_func_rename_trailing_dest_slash_bug=no' |
|
var_append configcache ' ' 'gl_cv_func_rename_trailing_slash_bug=no' |
|
|
|
# cannot be tested while cross-compiling |
|
var_append configcache ' ' 'gl_cv_func_fstatat_zero_flag=yes' |
|
|
|
# 'make-prime-list' needs to be run on the build host |
|
hook_add premake 5 'hostcc_make_prime_list' |
|
fi |
|
|
|
# apply the patches defined in the coreutils.desc |
|
for x in $(match_source_file -p patch); do |
|
var_append patchfiles ' ' "$x" |
|
done |
|
|
|
# at native stages the configure script is bailing out telling us that running |
|
# configure as root is a bad thing, and we need to set FORCE_UNSAFE_CONFIGURE=1 |
|
# to bypass this check. |
|
if atstage native; then |
|
var_insert configprefix ' ' "FORCE_UNSAFE_CONFIGURE=1" |
|
fi |
|
|
|
# install libstdbuf.so into /usr/lib/coreutils instead of /usr/libexec/coreutils |
|
var_append extraconfopt ' ' "--libexecdir=$libdir" |
|
|
|
# without injecting coreutils won't build |
|
var_append GCC_WRAPPER_INSERT ' ' '-std=gnu99' |
|
|
|
# Move programs to the locations specified by the FHS |
|
var_append INSTALL_WRAPPER_FILTER "|" \ |
|
"sed -e 's,usr/bin/\ |
|
\(cat\|chgrp\|chmod\|chown\|cp\|date\|dd\|df\|echo\ |
|
\|false\|hostname\|ln\|ls\|mkdir\|mknod\|mv\|pwd\|rm\ |
|
\|rmdir\|stty\|sync\|true\|uname\),bin/\1,' \ |
|
-e 's,usr/bin/\(chroot\),usr\/sbin/\1,'" |
|
|
|
# As /usr may not be available during the early stages of booting, |
|
# those binaries need to be on the root partition |
|
var_append INSTALL_WRAPPER_FILTER "|" \ |
|
"sed -e 's,usr/bin/\ |
|
\(cut\|head\|tail\|sleep\|sort\|touch\|readlink\),bin/\1,'" |
|
|
|
hook_add postmake 5 'ln -sf install $root/usr/bin/ginstall' |
|
|
|
# install hostname |
|
var_append confopt ' ' '--enable-install-program=hostname' |
|
|
|
noinstall= |
|
for x in mktemp procps:uptime util-linux:kill; do |
|
if pkginstalled "${x%:*}"; then |
|
var_append noinstall ',' "${x#*:}" |
|
fi |
|
done |
|
[ -z "$noinstall" ] || |
|
var_append confopt ' ' "--enable-no-install-program=$noinstall"
|
|
|