CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
src/pkgmk.in: fix_cross_paths function.
authorVictor Martinez <pitillo@ono.com>
Tue, 5 Apr 2011 11:00:51 +0000 (11:00 +0000)
committerVictor Martinez <pitillo@ono.com>
Tue, 5 Apr 2011 11:00:51 +0000 (11:00 +0000)
src/pkgmk.in

index c69329f4e765416779cc759178a2e1a23634582d..ddce5e78cce83c38e1faf489729f60f10c30c45f 100755 (executable)
@@ -316,6 +316,13 @@ compress_manpages() {
        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"
        
@@ -393,7 +400,8 @@ build_package() {
                        strip_files
                fi
                
-               compress_manpages
+                compress_manpages
+                fix_cross_paths
                
                cd $PKG
                info "Build result:"