CRUX-ARM :
Home
Home
::
Documentation
::
Download
::
Development
::
Community
::
Ports
::
Packages
::
Bugs
::
Links
::
About
::
Donors
development
/
pkgutils-cross.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'upstream/master' into 3.1
[pkgutils-cross.git]
/
pkgmk.in
diff --git
a/pkgmk.in
b/pkgmk.in
index 4379f653e2eca3875a7de06fb6b240625fbb7b37..45406c6b5e1d5bdb83dd61d2c8239092b0ea0d8c 100755
(executable)
--- a/
pkgmk.in
+++ b/
pkgmk.in
@@
-3,7
+3,10
@@
# pkgutils
#
# Copyright (c) 2000-2005 Per Liden
# pkgutils
#
# Copyright (c) 2000-2005 Per Liden
-# Copyright (c) 2006-2007 by CRUX team (http://crux.nu)
+# Copyright (c) 2006-2013 by CRUX team (http://crux.nu)
+#
+# Patches for crosscompilation by Jose V Beneyto <sepen@crux.nu>
+# (CRUX-ARM System Team <devel@crux-arm.nu>)
#
# 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
#
# 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
@@
-174,7
+177,7
@@
unpack_source() {
for FILE in ${source[@]}; do
LOCAL_FILENAME=`get_filename $FILE`
case $LOCAL_FILENAME in
for FILE in ${source[@]}; do
LOCAL_FILENAME=`get_filename $FILE`
case $LOCAL_FILENAME in
- *.tar.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tbz2|*.tar.xz|*.txz|*.tar.lzma|*.zip|*.rpm)
+ *.tar
|*.tar
.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tbz2|*.tar.xz|*.txz|*.tar.lzma|*.zip|*.rpm)
COMMAND="bsdtar -p -o -C $SRC -xf $LOCAL_FILENAME" ;;
*)
COMMAND="cp $LOCAL_FILENAME $SRC" ;;
COMMAND="bsdtar -p -o -C $SRC -xf $LOCAL_FILENAME" ;;
*)
COMMAND="cp $LOCAL_FILENAME $SRC" ;;
@@
-278,13
+281,13
@@
strip_files() {
find . -type f -printf "%P\n" | $FILTER | while read FILE; do
case $(file -b "$FILE") in
*ELF*executable*not\ stripped)
find . -type f -printf "%P\n" | $FILTER | while read FILE; do
case $(file -b "$FILE") in
*ELF*executable*not\ stripped)
-
strip
--strip-all "$FILE"
+
$STRIP_CMD
--strip-all "$FILE"
;;
*ELF*shared\ object*not\ stripped)
;;
*ELF*shared\ object*not\ stripped)
-
strip
--strip-unneeded "$FILE"
+
$STRIP_CMD
--strip-unneeded "$FILE"
;;
current\ ar\ archive)
;;
current\ ar\ archive)
-
strip
--strip-debug "$FILE"
+
$STRIP_CMD
--strip-debug "$FILE"
esac
done
}
esac
done
}
@@
-314,6
+317,13
@@
compress_manpages() {
done
}
done
}
+fix_cross_paths() {
+ # remove the last / from CLFS path if appeared
+ CLFS=${CLFS%*/}
+
+ find $PKG -type f -name '*.la' -exec sed -e "s|$CLFS||g" -e "s|$CROSTOOLS/$CTARGET|/usr|g" -i {} \;
+}
+
check_footprint() {
local FILE="$PKGMK_WORK_DIR/.tmp"
check_footprint() {
local FILE="$PKGMK_WORK_DIR/.tmp"
@@
-390,8
+400,9
@@
build_package() {
if [ "$PKGMK_NO_STRIP" = "no" ]; then
strip_files
fi
if [ "$PKGMK_NO_STRIP" = "no" ]; then
strip_files
fi
-
+
compress_manpages
compress_manpages
+ fix_cross_paths
cd $PKG
info "Build result:"
cd $PKG
info "Build result:"