diff --git a/README.md b/README.md index ca76e62b..46f4b197 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,8 @@ Checkout the latest sources with: $ git clone git://github.com/jcupitt/libvips.git -Building from git needs more packages. You'll need at least swig and gtk-doc, -see the dependencies section below. For example: +Building from git needs more packages. You'll need at least swig, gtk-doc and +gobject-introspection, see the dependencies section below. For example: $ brew install gtk-doc swig @@ -116,8 +116,8 @@ Static analysis with: # Dependencies -libvips has to have gettext, glib-2.x and libxml-2.0. The build system -needs sh, pkg-config, swig, gtk-doc-tools, automake, gobject-introspection +libvips has to have gettext, glib-2.0 and libxml-2.0. The build system +needs sh, pkg-config, swig, gtk-doc-tools, autoconf, gobject-introspection and gnu make. # Optional dependencies diff --git a/tools/vips-7.42 b/tools/vips-7.42 deleted file mode 100755 index bcc1007b..00000000 --- a/tools/vips-7.42 +++ /dev/null @@ -1,129 +0,0 @@ -#!/bin/bash -# -# Start script for VIPS - -# need extended regexps, hence we insist on bash above -shopt -s extglob -# set -x - -# name we were invoked as -bname=`basename $0` - -# check args -if [[ $# < 1 ]]; then - echo "usage: $bname [command ...]" - echo "examples:" - echo " $bname man im_invert" - echo " $bname vips im_invert /pics/tmp/fred.jpg /pics/tmp/fred2.tif" - exit 1 -fi - -# prepend a path component to an environment variable -# be careful to avoid trailing : characters if the var is not defined, they -# can cause security problems -function prepend_var () { - # we have to use eval to do double indirection, I think - eval value="\$$1" - if [ "x$value" = x ]; then - export $1=$2 - else - export $1=$2:$value - fi -} - -# try to extract the prefix from a path to an executable -# eg. "/home/john/vips/bin/fred" -> "/home/john/vips" -function find_prefix () { - # try to canonicalise the path - ep_canon=$1 - - # relative path? prefix with pwd - if [ ${ep_canon:0:1} != "/" ]; then - ep_canon=`pwd`/$ep_canon - fi - - # replace any "/./" with "/" - ep_canon=${ep_canon//\/.\//\/} - - # any "xxx/../" can go - ep_canon=${ep_canon//+([^\/])\/..\//} - - # trailing "xxx/.." can go - ep_canon=${ep_canon/%+([^\/])\/../} - - # remove trailing "/bin/xxx" to get the prefix - ep_prefix=${ep_canon/%\/bin\/+([^\/])/} - - # was there anything to remove in that final step? if not, the path - # must be wrong - if [ x$ep_prefix == x$ep_canon ]; then - return 1 - fi - - echo $ep_prefix; - - return 0 -} - -# try to guess the install prefix from $0 -function guess_prefix () { - # $0 is a file? must be us - if [ -f $0 ]; then - find_prefix $0 - return - fi - - # nope, extract program name from $0 and try looking along the - # searchpath for it - name=`basename $0` - - fred=$PATH - while [ x$fred != x"" ]; do - path=${fred/:*/}/$name - fred=${fred/*([^:])?(:)/} - - if [ -f $path ]; then - find_prefix $path - return - fi - done - - # not found on path either ... give up! - return 1 -} - -prefix=`guess_prefix`; - -if [ $? != 0 ]; then - echo "unable to find $0 from the file name, or from your PATH" - echo "either run directly, or add the install bin area to " - echo "your PATH" - exit 1 -fi - -export VIPSHOME=$prefix - -# add VIPSHOME to man pages -prepend_var MANPATH $VIPSHOME/man - -# add the VIPS lib area to the library path -case `uname` in -HPUX) - libvar=SHLIB_PATH - ;; - -Darwin) - libvar=DYLD_LIBRARY_PATH - ;; - -*) - libvar=LD_LIBRARY_PATH - ;; -esac -prepend_var $libvar $VIPSHOME/lib - -# add VIPS bin area to path -prepend_var PATH $VIPSHOME/bin - -# run, passing in args we were passed -exec $* diff --git a/tools/vips-8.0 b/tools/vips-8.0 index bcc1007b..c24c839c 100755 --- a/tools/vips-8.0 +++ b/tools/vips-8.0 @@ -13,8 +13,8 @@ bname=`basename $0` if [[ $# < 1 ]]; then echo "usage: $bname [command ...]" echo "examples:" - echo " $bname man im_invert" - echo " $bname vips im_invert /pics/tmp/fred.jpg /pics/tmp/fred2.tif" + echo " $bname man vipsthumbnail" + echo " $bname vips invert /pics/tmp/fred.jpg /pics/tmp/fred2.tif" exit 1 fi @@ -103,10 +103,9 @@ fi export VIPSHOME=$prefix -# add VIPSHOME to man pages -prepend_var MANPATH $VIPSHOME/man +# add VIPSHOME to various paths +prepend_var MANPATH $VIPSHOME/share/man -# add the VIPS lib area to the library path case `uname` in HPUX) libvar=SHLIB_PATH @@ -122,8 +121,10 @@ Darwin) esac prepend_var $libvar $VIPSHOME/lib -# add VIPS bin area to path prepend_var PATH $VIPSHOME/bin +prepend_var PKG_CONFIG_PATH $VIPSHOME/lib/pkgconfig +prepend_var GI_TYPELIB_PATH $VIPSHOME/lib/girepository-1.0 +prepend_var PYTHONPATH $VIPSHOME/lib/python2.7/site-packages # run, passing in args we were passed exec $*