/[gentoo-x86]/eclass/unpacker.eclass
Gentoo

Diff of /eclass/unpacker.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.16 Revision 1.17
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/unpacker.eclass,v 1.16 2014/02/27 00:20:57 ottxor Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/unpacker.eclass,v 1.17 2014/05/01 19:27:14 ottxor Exp $
4 4
5# @ECLASS: unpacker.eclass 5# @ECLASS: unpacker.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: helpers for extraneous file formats and consistent behavior across EAPIs 8# @BLURB: helpers for extraneous file formats and consistent behavior across EAPIs
27 27
28# @ECLASS-VARIABLE: UNPACKER_LZIP 28# @ECLASS-VARIABLE: UNPACKER_LZIP
29# @DEFAULT_UNSET 29# @DEFAULT_UNSET
30# @DESCRIPTION: 30# @DESCRIPTION:
31# Utility to use to decompress lzip files. Will dynamically pick between 31# Utility to use to decompress lzip files. Will dynamically pick between
32# `pdlzip` and `lzip`. Make sure your choice accepts the "-dc" options. 32# `plzip`, `pdlzip` and `lzip`. Make sure your choice accepts the "-dc" options.
33# Note: this is meant for users to set, not ebuilds. 33# Note: this is meant for users to set, not ebuilds.
34 34
35# for internal use only (unpack_pdv and unpack_makeself) 35# for internal use only (unpack_pdv and unpack_makeself)
36find_unpackable_file() { 36find_unpackable_file() {
37 local src=$1 37 local src=$1
350 *.z|*.gz|*.tgz) 350 *.z|*.gz|*.tgz)
351 comp="gzip -dc" ;; 351 comp="gzip -dc" ;;
352 *.lzma|*.xz|*.txz) 352 *.lzma|*.xz|*.txz)
353 comp="xz -dc" ;; 353 comp="xz -dc" ;;
354 *.lz) 354 *.lz)
355 : ${UNPACKER_LZIP:=$(type -P pdlzip || type -P lzip)} 355 : ${UNPACKER_LZIP:=$(type -P plzip || type -P pdlzip || type -P lzip)}
356 comp="${UNPACKER_LZIP} -dc" ;; 356 comp="${UNPACKER_LZIP} -dc" ;;
357 *) comp="" ;; 357 *) comp="" ;;
358 esac 358 esac
359 359
360 # then figure out if there are any archiving aspects 360 # then figure out if there are any archiving aspects
447 *.xz) 447 *.xz)
448 d="app-arch/xz-utils" ;; 448 d="app-arch/xz-utils" ;;
449 *.zip) 449 *.zip)
450 d="app-arch/unzip" ;; 450 d="app-arch/unzip" ;;
451 *.lz) 451 *.lz)
452 d="|| ( app-arch/pdlzip app-arch/lzip )" ;; 452 d="|| ( app-arch/plzip app-arch/pdlzip app-arch/lzip )" ;;
453 esac 453 esac
454 deps+=" ${d}" 454 deps+=" ${d}"
455 done 455 done
456 456
457 echo "${deps}" 457 echo "${deps}"

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.20