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.
197 lines
6.3 KiB
197 lines
6.3 KiB
#!/bin/sh -x |
|
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../uclibc/parse-config-9 |
|
# 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 --- |
|
if [ "$SDECFG_LIBC" == "uclibc" ]; then |
|
pkg_uclibc_dir=$base/package/base/uclibc |
|
|
|
if [ $pkg != "gettext" ]; then |
|
var_append flistdel "|" "usr/share/locale/locale.alias" |
|
fi |
|
|
|
# the most tipical fix is to config.sub |
|
# |
|
uclibc_fix_configsub() { |
|
local x; for x; do |
|
echo "uclibc_fix_configsub: adding uclibc_arch_target support to $x" |
|
cp -f $x $x.orig |
|
sed -e 's,\([-]\?linux\)-gnu\*,\1-gnu\* | \1-uclibc\*,g' $x.orig > $x |
|
diff -u $x.orig $x || true |
|
done |
|
} |
|
uclibc_auto_fix_configsub() { |
|
local f |
|
for f in . ./config ./support; do |
|
if [ -e $f/config.sub ] ; then |
|
if ! grep -q '\-uclibc' $f/config.sub; then |
|
uclibc_fix_configsub $f/config.sub |
|
fi |
|
fi |
|
done |
|
} |
|
uclibc_findall_fix_configsub() { |
|
local f |
|
for f in `find . -name config.sub`; do |
|
uclibc_fix_configsub $f |
|
done |
|
} |
|
|
|
|
|
# FIXME: i forgot what makes uclibc_fix_addcases different than uclibc_fix_configsub //mnemoc |
|
uclibc_fix_addcases() { |
|
local file; for file; do |
|
echo "uclibc_fix_addcases: adding *-linux-uclibc* support to $file" |
|
cp -f $file $file.orig |
|
sed -i -e 's,\([^ ]*\)linux-gnu\*\(.*\)\([\)\\]\),\1linux-gnu* | \1linux-uclibc*\2\3,g' $file |
|
diff -u $file.orig $file || true |
|
done |
|
} |
|
|
|
uclibc_fix_addcases2() { |
|
local file; for file; do |
|
echo "uclibc_fix_addcases2: adding *-linux-uclibc* support to $file" |
|
cp -f $file $file.orig |
|
sed -i -e 's,\( *.*\)linux-gnu\*)\(.*\)\;\;$,\1linux-uclibc*)\2;;\n\1linux-gnu*)\2;;,g' \ |
|
-e 's,\( *.*\)linux-gnu\*)\(.*[^;][^;]\)$,\1linux-uclibc* \| \\\n\1linux-gnu*)\2,g' \ |
|
$file |
|
diff -u $file.orig $file || true |
|
done |
|
} |
|
# fix tipical locations |
|
hook_add postpatch 5 'uclibc_auto_fix_configsub' |
|
|
|
# and some others |
|
case "$pkg" in |
|
gcc) |
|
hook_add postpatch 6 'uclibc_fix_configsub libjava/libltdl/config.sub' |
|
;; |
|
apache|minicom|nmap|expat|libiconv) |
|
hook_add postpatch 6 'uclibc_findall_fix_configsub' |
|
;; |
|
ntp) |
|
hook_add postpatch 6 'uclibc_fix_configsub sntp/config.sub' |
|
;; |
|
lzo) |
|
hook_add postpatch 6 'uclibc_fix_configsub autoconf/config.sub' |
|
;; |
|
binutils) |
|
hook_add postpatch 4 'uclibc_fix_addcases ./bfd/config.bfd ./bfd/configure \ |
|
./bfd/configure.in ./ld/configure.tgt' |
|
hook_add postpatch 5 'uclibc_fix_addcases2 ./gas/configure ./gas/configure.in' |
|
;; |
|
gdb) |
|
hook_add postpatch 4 'uclibc_fix_addcases ./bfd/config.bfd ./bfd/configure' |
|
;; |
|
bdb) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./dist/config.sub' |
|
;; |
|
bdb33) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./dist/config.sub' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./dist/configure' |
|
;; |
|
a2ps) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./auxdir/config.sub' |
|
;; |
|
pidentd) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./aux/config.sub' |
|
;; |
|
apollon) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./admin/config.sub' |
|
;; |
|
openldap) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./contrib/ldapc++/config.sub' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./build/config.sub' |
|
;; |
|
pkgconfig) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./configure' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./glib-1.2.8/ltconfig' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./glib-1.2.8/config.sub' |
|
;; |
|
libsigc++12) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./scripts/config.sub' |
|
;; |
|
libsigc++1) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./scripts/config.sub' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./scripts/ltconfig' |
|
;; |
|
jasper) |
|
# jasper is autoextract=0 so postpatch is never evaluated |
|
hook_add preconf 6 'uclibc_fix_configsub ./acaux/config.sub' |
|
hook_add preconf 6 'uclibc_fix_configsub ./configure' |
|
hook_add preconf 6 'uclibc_fix_configsub ./aclocal.m4' |
|
;; |
|
gdbm) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./configure' |
|
;; |
|
mono) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./libgc/config.sub' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./libgc/configure' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./libgc/libtool.m4' |
|
;; |
|
gsmlib) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./configure' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./aclocal.m4' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./scripts/config.sub' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./scripts/ltconfig' |
|
;; |
|
libxml1|librep) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./configure' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./aclocal.m4' |
|
;; |
|
fribidi) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./configure' |
|
;; |
|
rpm) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./*/config.sub' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./*/configure' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./*/aclocal.m4' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./*/*/config.sub' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./*/*/configure' |
|
;; |
|
libgd) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./configure' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./aclocal.m4' |
|
hook_add postpatch 6 'uclibc_fix_configsub ./config/config.sub' |
|
;; |
|
device-mapper|lvm2) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./autoconf/config.sub' |
|
;; |
|
libdvdcss|libdvbpsi3|libmpeg2|a52dec) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./autotools/config.sub' |
|
;; |
|
apr|apr-util) |
|
hook_add postpatch 6 'uclibc_fix_configsub ./build/config.sub' |
|
;; |
|
esac |
|
|
|
# same package translations to look for patches |
|
case "$pkg" in |
|
linux24*) |
|
pkg_uclibc_pkg=linux24 ;; |
|
linux26*|linux-header) |
|
pkg_uclibc_pkg=linux26 ;; |
|
*) |
|
pkg_uclibc_pkg=$pkg ;; |
|
esac |
|
|
|
pkg_uclubc_patches=$( ls -1 $pkg_uclibc_dir/pkg_patch/$pkg_uclibc_pkg-*.patch 2> /dev/null | tr '\n' ' ' ) |
|
if [ -n "$pkg_uclubc_patches" ]; then |
|
echo_status "uClibc: appending patches ..." |
|
var_append patchfiles ' ' "$pkg_uclubc_patches" |
|
fi |
|
|
|
if [ -f $pkg_uclibc_dir/pkg_conf/$pkg_uclibc_pkg.conf ]; then |
|
. $pkg_uclibc_dir/pkg_conf/$pkg_uclibc_pkg.conf |
|
fi |
|
fi
|
|
|