Skip to content
Browse files

New version of cairo have .xz file format

  • Loading branch information...
1 parent 40593df commit df8c1816bc78a380ff23de29964daaf8e403e381 @jviereck jviereck committed with tj
Showing with 14 additions and 2 deletions.
  1. +14 −2 install
View
16 install
@@ -2,7 +2,7 @@
PKG_CONFIG="http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz"
PIXMAN="http://www.cairographics.org/releases/pixman-0.28.0.tar.gz"
-CAIRO="http://cairographics.org/releases/cairo-1.12.8.tar.gz"
+CAIRO="http://cairographics.org/releases/cairo-1.12.8.tar.xz"
FREETYPE="http://download.savannah.gnu.org/releases/freetype/freetype-2.4.10.tar.gz"
LIBPNG="ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.40.tar.gz"
PREFIX=${1-/usr/local}
@@ -29,6 +29,18 @@ fetch() {
&& install $dir
}
+fetch_xz() {
+ local tarball=`basename $1`
+ echo "... downloading $tarball"
+ local dir=${tarball/.tar.xz/}
+ curl -# -L $1 -o $tarball \
+ && echo "... unpacking" \
+ && tar -xJf $tarball \
+ && echo "... removing tarball" \
+ && rm -fr $tarball \
+ && install $dir
+}
+
install() {
local dir=$1
echo "... installing $1"
@@ -47,4 +59,4 @@ test `which pkg-config` || fetch $PKG_CONFIG
require 'pkg-config'
fetch $FREETYPE
fetch $PIXMAN
-fetch $CAIRO
+fetch_xz $CAIRO

0 comments on commit df8c181

Please sign in to comment.
Something went wrong with that request. Please try again.