]> spindle.queued.net Git - midori/commitdiff
Allow to extract files from mingw packages using w64 toolchain
authorPaweł Forysiuk <tuxator@o2.pl>
Thu, 28 Apr 2011 20:30:41 +0000 (22:30 +0200)
committerChristian Dywan <christian@twotoasts.de>
Fri, 29 Apr 2011 00:54:04 +0000 (02:54 +0200)
http://mingw-w64.sourceforge.net/

win32/x86-mingw32-opensuse/install.sh

index 909a523f895aa313c2593a945400d8a5f663b2d7..3d54e09700d9fb02c655c6310c7317516278b594 100644 (file)
@@ -56,13 +56,29 @@ do
   pushd $BUILD_PATH
   # extract rpm
   rpm2cpio $DOWNLOAD_PATH/$line | cpio -i -d
-  # convert pkgconfig files
-  if [ -d $BUILD_PATH/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig ]
+
+  if [ -d $BUILD_PATH/usr/i686-pc-ming32/sys-root/mingw ]
   then
-    sed -i -e 's@^prefix=.*@prefix='$INSTALL_PATH'@' -e 's@/usr/i686-pc-mingw32/sys-root/mingw@${prefix}@' $BUILD_PATH/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig/*.pc
+    # convert pkgconfig files
+    if [ -d $BUILD_PATH/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig ]
+    then
+      sed -i -e 's@^prefix=.*@prefix='$INSTALL_PATH'@' -e 's@/usr/i686-pc-mingw32/sys-root/mingw@${prefix}@' $BUILD_PATH/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig/*.pc
+    fi
+    # install the package
+    cp -rf $BUILD_PATH/usr/i686-pc-mingw32/sys-root/mingw/* $INSTALL_PATH/
   fi
-  # install the package
-  cp -rf $BUILD_PATH/usr/i686-pc-mingw32/sys-root/mingw/* $INSTALL_PATH/
+
+  if [ -d $BUILD_PATH/usr/i686-w64-mingw32/sys-root/mingw ]
+  then
+    # convert pkgconfig files
+    if [ -d $BUILD_PATH/usr/i686-w64=mingw32/sys-root/mingw/lib/pkgconfig ]
+    then
+      sed -i -e 's@^prefix=.*@prefix='$INSTALL_PATH'@' -e 's@/usr/i686-w64-mingw32/sys-root/mingw@${prefix}@' $BUILD_PATH/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig/*.pc
+    fi
+    # install the package
+    cp -rf $BUILD_PATH/usr/i686-w64-mingw32/sys-root/mingw/* $INSTALL_PATH/
+  fi
+
   # remove the extracted file
   rm -rf $BUILD_PATH/usr
   popd