From 9d8145ce431a34e88096705f0870ef04a7cf6f1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Thu, 9 Jun 2016 19:35:27 +0000 Subject: Followup to : - Disable linking bash and coreutils statically until the necessary fixes to psxstub and psxscl have been committed upstream. Replace non-portable `tar -axf' invokations with {bunzip2,gunzip,xz} -d | tar -xf - depending on the ${PKG_FNAME} file extension. --- pkg.build | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'pkg.build') diff --git a/pkg.build b/pkg.build index c0051c4b..e56e9c50 100644 --- a/pkg.build +++ b/pkg.build @@ -20,7 +20,21 @@ if test_cmd pkg_${PKG_NAME}_finish; then elif [ "${PKG_URL_TYPE:-wget}" = wget ] &&\ ! is_build_script_done extract; then rm_if_exists ${PKG_SUBDIR}; - tar -axf ${PKG_FNAME}; + if [ "${PKG_FNAME##*.tar.}" = "bz2" ]; then + bunzip2 -d < ${PKG_FNAME} | tar -xf -; + elif [ "${PKG_FNAME##*.tar.}" = "gz" ]; then + gunzip -d < ${PKG_FNAME} | tar -xf -; + elif [ "${PKG_FNAME##*.tar.}" = "xz" ]; then + xz -d < ${PKG_FNAME} | tar -xf -; + elif [ "${PKG_FNAME##*.t}" = "bz2" ]; then + bunzip2 -d < ${PKG_FNAME} | tar -xf -; + elif [ "${PKG_FNAME##*.t}" = "gz" ]; then + gunzip -d < ${PKG_FNAME} | tar -xf -; + elif [ "${PKG_FNAME##*.t}" = "xz" ]; then + xz -d < ${PKG_FNAME} | tar -xf -; + else + tar -xf ${PKG_FNAME}; + fi; if test_cmd pkg_${PKG_NAME}_extract_post; then pkg_${PKG_NAME}_extract_post; fi; -- cgit v1.2.3