On AIX, we don't use GNU binutils ar, and the ar out there isn't
authorFabian Groffen <grobian@gentoo.org>
Thu, 12 Apr 2007 17:17:48 +0000 (17:17 -0000)
committerFabian Groffen <grobian@gentoo.org>
Thu, 12 Apr 2007 17:17:48 +0000 (17:17 -0000)
compatible as well (like odcctools' one), so we have to resort to using
deb2targz on that platform.

svn path=/main/branches/prefix/; revision=6381

bin/ebuild.sh

index 98d337929622bc03014b4bf9cda2a912ebf2e092..0fd83b4c9ae4e644bd12d9b5fea798fa641f81f6 100755 (executable)
@@ -524,7 +524,19 @@ unpack() {
                        LHa|LHA|lha|lzh)
                                lha xqf "${srcdir}/${x}" || die "$myfail"
                                ;;
-                       a|deb)
+                       deb)
+                               # unpacking .deb archives can only be done with a GNU
+                               # binutils (compatible) ar.  So if we don't have that,
+                               # which only is on AIX for the moment, use deb2targz and
+                               # unpack that one
+                               if [[ ${CHOST} == *-aix* ]]; then
+                                       deb2targz "${srcdir}/${x}" || die "$myfail"
+                                       mv "${srcdir}/${x/.deb/.tar.gz}" data.tar.gz
+                               else
+                                       ar x "${srcdir}/${x}" || die "$myfail"
+                               fi
+                               ;;
+                       a)
                                ar x "${srcdir}/${x}" || die "$myfail"
                                ;;
                        *)