Unverified Commit 900b39c4 authored by Cosimo Lupo's avatar Cosimo Lupo
Browse files

[library_builders] allow to override tar.gz extension in build_simple

Some libraries use 'tar.bz2' instead of 'tar.gz' as source archive format.
This patch allows to pass a fourth argument to `build_simple` function to specify an alternative extension to the default `tar.gz`.

The `untar` function in common_utils.sh, used by `fetch_unpack`, already supports the following archive formats: tar, gz, bz2, zip and xz.
parent 38056941
...@@ -51,12 +51,13 @@ function build_simple { ...@@ -51,12 +51,13 @@ function build_simple {
local name=$1 local name=$1
local version=$2 local version=$2
local url=$3 local url=$3
local ext=${4:-tar.gz}
if [ -e "${name}-stamp" ]; then if [ -e "${name}-stamp" ]; then
return return
fi fi
local name_version="${name}-${version}" local name_version="${name}-${version}"
local targz=${name_version}.tar.gz local archive=${name_version}.${ext}
fetch_unpack $url/$targz fetch_unpack $url/$archive
(cd $name_version \ (cd $name_version \
&& ./configure --prefix=$BUILD_PREFIX \ && ./configure --prefix=$BUILD_PREFIX \
&& make \ && make \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment