mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 07:33:48 +02:00
Remove unzip helper and make pkg add a build dep to unzip.
That way we can simply check for unzip bin being installed and error out if it's not, it's simpler. --HG-- extra : convert_revision : 8fd6c5f11a54742403a16fa10c3ed1db7f12955b
This commit is contained in:
parent
4bbeb31d60
commit
25a6af5a07
3 changed files with 8 additions and 61 deletions
|
@ -1,44 +0,0 @@
|
||||||
#
|
|
||||||
# This helper is used in templates using extract_sufx=".zip".
|
|
||||||
# This checks if unzip is installed and installs it if it's not.
|
|
||||||
#
|
|
||||||
# If unzip is already installed just return immediately.
|
|
||||||
|
|
||||||
extract_unzip()
|
|
||||||
{
|
|
||||||
local file="$1"
|
|
||||||
local dest="$2"
|
|
||||||
|
|
||||||
[ ! -f $file ] && exit 1
|
|
||||||
|
|
||||||
$XBPS_MASTERDIR/usr/bin/unzip -q -x $file -d $dest
|
|
||||||
return $?
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ ! -x "$XBPS_MASTERDIR/usr/bin/unzip" ]; then
|
|
||||||
unzip_version="5.52"
|
|
||||||
|
|
||||||
# Save pkgname before installing unzip.
|
|
||||||
save_pkgname=$pkgname
|
|
||||||
|
|
||||||
check_installed_pkg unzip $unzip_version
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "=> $save_pkgname package requires unzip for extraction."
|
|
||||||
#
|
|
||||||
# Install dependencies required by unzip.
|
|
||||||
#
|
|
||||||
install_builddeps_required_pkg unzip-$unzip_version
|
|
||||||
#
|
|
||||||
# Install the unzip package now.
|
|
||||||
#
|
|
||||||
install_pkg unzip
|
|
||||||
#
|
|
||||||
# Continue with previous template that called us.
|
|
||||||
#
|
|
||||||
reset_tmpl_vars
|
|
||||||
setup_tmpl $save_pkgname
|
|
||||||
fi
|
|
||||||
|
|
||||||
unset save_pkgname
|
|
||||||
unset unzip_version
|
|
||||||
fi
|
|
|
@ -15,4 +15,5 @@ long_desc="
|
||||||
software has also been submitted to the ISO for inclusion in the JPEG-2000
|
software has also been submitted to the ISO for inclusion in the JPEG-2000
|
||||||
Part-5 standard (as an official reference implementation)."
|
Part-5 standard (as an official reference implementation)."
|
||||||
|
|
||||||
|
build_depends="unzip-5.52"
|
||||||
run_depends="glibc-2.8"
|
run_depends="glibc-2.8"
|
||||||
|
|
24
xbps.sh
24
xbps.sh
|
@ -397,24 +397,14 @@ extract_distfiles()
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
.zip)
|
.zip)
|
||||||
if [ -f "$XBPS_TMPLHELPDIR/unzip-extraction.sh" ]; then
|
if [ -x $XBPS_MASTERDIR/usr/bin/unzip ]; then
|
||||||
# Save vars!
|
$XBPS_MASTERDIR/usr/bin/unzip \
|
||||||
tmpf=$curfile
|
-q -x $XBPS_SRCDISTDIR/$curfile -d $lwrksrc
|
||||||
tmpsufx=$cursufx
|
if [ $? -ne 0 ]; then
|
||||||
tmpwrksrc=$lwrksrc
|
msg_error "extracting $curfile into $lwrksrc."
|
||||||
. $XBPS_TMPLHELPDIR/unzip-extraction.sh
|
fi
|
||||||
# Restore vars!
|
|
||||||
curfile=$tmpf
|
|
||||||
cursufx=$tmpsufx
|
|
||||||
lwrksrc=$tmpwrksrc
|
|
||||||
unset tmpf tmpsufx tmpwrksrc
|
|
||||||
else
|
else
|
||||||
msg_error "cannot find unzip helper."
|
msg_error "cannot find unzip bin for extraction"
|
||||||
fi
|
|
||||||
|
|
||||||
extract_unzip $XBPS_SRCDISTDIR/$curfile $lwrksrc
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
msg_error "extracting $curfile into $lwrksrc."
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Add table
Reference in a new issue