CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Fixed installation of .la files which were affected due to crosscompilation paths.
authorJose V Beneyto <sepen@crux.nu>
Tue, 18 May 2010 10:16:37 +0000 (12:16 +0200)
committerJose V Beneyto <sepen@crux.nu>
Tue, 18 May 2010 10:16:37 +0000 (12:16 +0200)
pkgmk-cross
src/pkgmk.in

index 49d0065e83c031a72ba17fc5e747f6ea83efae26..f5ecafce82438384bb913b7f98298a9db6e51e94 100755 (executable)
@@ -19,7 +19,7 @@ while [ "$1" ]; do
 done
 
 if [ ! -z "$PKGMK_OPTIMIZE" ]; then
-       _cflags="$(grep "^${PKGMK_OPTIMIZE}_CFLAGS=" $PKGMK_CONF | cut -d'=' -f2- | sed 's|"||g')"
+  _cflags="$(grep "^${PKGMK_OPTIMIZE}_CFLAGS=" $PKGMK_CONF | cut -d'=' -f2- | sed 's|"||g')"
   if [ ! -z "$_cflags" ]; then
     sed '/_CFLAGS=/d' $PKGMK_CONF | sed "s|CFLAGS=.*|CFLAGS=\"$_cflags\"|" > $TMP_CONF
     PKGMK_CONF="$TMP_CONF"
index 7378def28e515e5531c5ac5c69986f8ad485d257..9c20c67026faed4fa1d73b1a8beb593182a5468a 100755 (executable)
@@ -305,6 +305,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 "s|$CLFS||g" -i {} \;
+}
+
 check_footprint() {
        local FILE="$PKGMK_WORK_DIR/.tmp"
        
@@ -377,6 +384,7 @@ build_package() {
                fi
                
                compress_manpages
+               fix_cross_paths
                
                cd $PKG
                info "Build result:"