Remove cruft (#2942)

* remove autotools

It seems to all work. I tested with gtk-doc enabled. I probably missed a
few things argh.

* remove some old cruft

* oop, forgot m4/

* remove version check

since we no longer have a wrapper script
This commit is contained in:
John Cupitt 2022-07-24 11:18:30 +01:00 committed by GitHub
parent 538aa2a841
commit ffe13810fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 0 additions and 487 deletions

View File

@ -1,18 +0,0 @@
VIPS SMP benchmark
------------------
This is adapted from the system used to generate images for a Print On Demand project at The National Gallery.
Images from a 10k by 10k studio digital camera are colour processed, resized,
cropped and sharpened.
This thing was originally processing images off a remote server over a 100Mbit/s
network. No attempt was made to make it quick (there was no point): you
could make it a lot faster very easily. But it still serves as a benchmark which
has been tested over many years. It is getting to < 1s per run now though!
See
https://github.com/libvips/libvips/wiki/Benchmarks
for results. Feel free to contribute your own.

View File

@ -1,45 +0,0 @@
#!/bin/bash
uname -a
gcc --version
vips --version
# how large an image do you want to process?
# sample2.v is 290x442 pixels ... replicate this many times horizontally and
# vertically to get a highres image for the benchmark
tile=13
# how complex an operation do you want to run?
# this sets the number of copies of the benchmark we chain together:
# higher values run more slowly and are more likely to be CPU-bound
chain=1
echo building test image ...
echo "tile=$tile"
vips im_replicate sample2.v temp.v $tile $tile
if [ $? != 0 ]; then
echo "build of test image failed -- out of disc space?"
exit 1
fi
echo -n "test image is" `vipsheader -f width temp.v`
echo " by" `vipsheader -f height temp.v` "pixels"
max_cpus=`vips im_concurrency_get`
echo "max cpus = $max_cpus"
echo "starting benchmark ..."
echo /usr/bin/time vips \
--vips-concurrency=xx \
im_benchmarkn temp.v temp2.v $chain
for((cpus = 1; cpus <= max_cpus; cpus++)); do
echo cpus = $cpus
/usr/bin/time vips \
--vips-concurrency=$cpus \
im_benchmarkn temp.v temp2.v $chain 2>&1
/usr/bin/time vips \
--vips-concurrency=$cpus \
im_benchmarkn temp.v temp2.v $chain 2>&1
/usr/bin/time vips \
--vips-concurrency=$cpus \
im_benchmarkn temp.v temp2.v $chain 2>&1
done

View File

@ -1,60 +0,0 @@
#!/bin/bash
uname -a
gcc --version
vips --version
# how large an image do you want to process?
# sample2.v is 290x442 pixels ... replicate this many times horizontally and
# vertically to get a highres image for the benchmark
tile=13
# how complex an operation do you want to run?
# this sets the number of copies of the benchmark we chain together:
# higher values run more slowly and are more likely to be CPU-bound
chain=1
echo building test image ...
echo "tile=$tile"
vips im_replicate sample2.v temp.v $tile $tile
if [ $? != 0 ]; then
echo "build of test image failed -- out of disc space?"
exit 1
fi
echo -n "test image is" `vipsheader -f width temp.v`
echo " by" `vipsheader -f height temp.v` "pixels"
max_cpus=`vips im_concurrency_get`
echo "max cpus = $max_cpus"
echo "starting benchmark ..."
echo /usr/bin/time -f %e vips \
--vips-concurrency=xx \
im_benchmarkn temp.v temp2.v $chain
echo reported real-time is best of three runs
echo cpus real-time
for((cpus = 1; cpus <= max_cpus; cpus++)); do
t1=`/usr/bin/time -f %e vips \
--vips-concurrency=$cpus \
im_benchmarkn temp.v temp2.v $chain 2>&1`
if [ $? != 0 ]; then
echo "benchmark failed -- install problem?"
exit 1
fi
t2=`/usr/bin/time -f %e vips \
--vips-concurrency=$cpus \
im_benchmarkn temp.v temp2.v $chain 2>&1`
t3=`/usr/bin/time -f %e vips \
--vips-concurrency=$cpus \
im_benchmarkn temp.v temp2.v $chain 2>&1`
# echo $t1 $t2 $t3
if [[ $t2 < $t1 ]]; then
t1=$t2
fi
if [[ $t3 < $t1 ]]; then
t1=$t3
fi
echo $cpus $t1
done

Binary file not shown.

View File

@ -7,15 +7,6 @@
. ./variables.sh
# verify that the version number on the wrapper script is correct
version=$($vips --version)
major=$(echo $version | cut -b6- | cut -d. -f1)
minor=$(echo $version | cut -b6- | cut -d. -f2)
if ! test -f $top_srcdir/tools/vips-$major.$minor; then
echo version number in vips wrapper is not correct
exit 1
fi
# is a difference beyond a threshold? return 0 (meaning all ok) or 1 (meaning
# error, or outside threshold)
#

View File

@ -1,46 +0,0 @@
#!/bin/sh
# Crop a set of image files
#
# usage:
#
# example% batch_crop left top width height image1 image2 etc
#
# writes output images crop_image1, crop_image2
# default prefix
VIPSHOME=${VIPSHOME-@prefix@}
name=`basename $0`
# check args
if [ $# -lt 5 ]; then
echo "usage: $name left top width height image1 image2 ..."
echo
echo "$name writes a new set of images called crop_image1, "
echo "crop_image2, etc., each cropped to the specified size"
exit 1
fi
left=$1
top=$2
width=$3
height=$4
shift 4
# convert each argument
for i in $*; do
dir=`dirname $i`
file=`basename $i`
new=$dir/crop_$file
echo "Cropping $file as $new ..."
if [ -f $new ]; then
echo "$new exists, skipping"
else
$VIPSHOME/bin/vips im_extract_area $i $new $left $top $width $height
fi
done

View File

@ -1,44 +0,0 @@
#!/bin/sh
# Convert a set of image files to new file format
#
# usage:
#
# example% batch_image_convert <new image type> image1 image2 etc
#
# writes output images image1.* and image2.* where * is the new file type.
# default prefix
VIPSHOME=${VIPSHOME-@prefix@}
name=`basename $0`
# check args
if [ $# -lt 2 ]; then
echo "usage: $name <new image type> image1 image2 ..."
echo
echo "$name uses VIPS to convert a group of image files of"
echo "any image format into a new group of images all of the same"
echo "image format. VIPS can read almost any standard image format"
echo "but it can only write VIPS, JPEG, TIFF, PPM/PBM/PGM or PNG."
exit 1
fi
type=$1
shift
# convert each argument
for i in $*; do
# drop the suffix on the filename
base=${i%*.*}
echo "Converting $i to $base.$type ..."
if [ -f $base.$type ]; then
echo "$base.$type already exists skiping $i"
else
$VIPSHOME/bin/vips im_copy $i $base.$type
fi
done

View File

@ -1,39 +0,0 @@
#!/bin/sh
# Corrects a set of image files for lens distortion using a preprepared
# recombination matrix
# usage:
#
# example% batch_rubber_sheet matrix_file image1 image2 ..
#
# writes output images rsc_image1.v, rsc_image2.v ..
# default prefix
VIPSHOME=${VIPSHOME-@prefix@}
# get name we were run as
name=`basename $0`
# check args
if [ $# -lt 2 ]; then
echo "usage: $name matrix image1 image2 ..."
echo "writes rsc_image1, rsc_image2, ..."
echo
echo "$name uses VIPS to correct a set of images for lens distortion"
echo "using a matrix calculated by the 'resample' function."
exit 1
fi
rec=$1
shift
# transform each argument
for i in $*; do
echo "Transforming $i to rsc_$i ..."
# bilinear interp., don't wrap edges
$VIPSHOME/bin/vips im_transform $i rsc_$i $rec 1 0
done

View File

@ -1,57 +0,0 @@
#!/bin/sh
# correct a set of files for illumination errors
# usage:
#
# example% light_correct grey.v im1.v im2.v
#
# writes output images ic_im1.v and ic_im2.v
# default prefix
VIPSHOME=${VIPSHOME-@prefix@}
# get name we were run as
name=$0
bname=`basename $name`
# names of our temp files
t1=light_correct_temp1
t2=light_correct_temp2
# check args
if [ $# -lt 2 ]; then
echo "${bname}: usage: $bname <grey> <image1> <image2> ..."
exit 1
fi
echo "Preparing grey ..."
grey=$1
shift
# find image size
width=`$VIPSHOME/bin/vips im_header_int Xsize $grey`
height=`$VIPSHOME/bin/vips im_header_int Ysize $grey`
# smooth the grey out
$VIPSHOME/bin/vips im_shrink $grey $t1.v 20 20
$VIPSHOME/bin/vips im_resize_linear $t1.v $t2.v $width $height
# and make the correction image
mean=`$VIPSHOME/bin/vips im_avg $t2.v`
$VIPSHOME/bin/vips im_powtra $t2.v $t1.v -1
$VIPSHOME/bin/vips im_lintra $mean $t1.v 0 $t2.v
# grey correct images in order
for i in "$@"; do
echo "Correcting $i as ic_$i ..."
$VIPSHOME/bin/vips im_multiply $t2.v "$i" $t1.v
$VIPSHOME/bin/vips im_clip $t1.v "ic_$i"
# remove the .desc as well
name=`echo $name | sed -e 's/\.[^\.]*//'`
/bin/rm -f "ic_$name.desc"
done
# more cleanup
echo "Cleaning up ..."
/bin/rm -f $t1.v $t1.desc
/bin/rm -f $t2.v $t2.desc

View File

@ -13,30 +13,8 @@ foreach tool : tools
)
endforeach
scripts = [
'light_correct.in',
'shrink_width.in',
'batch_image_convert.in',
'batch_rubber_sheet.in',
'batch_crop.in',
]
script_data = configuration_data()
script_data.set('prefix', get_option('prefix'))
foreach script : scripts
configure_file(
input: script,
output: '@BASENAME@',
install: true,
install_dir: get_option('prefix') / get_option('bindir'),
install_mode: 'rwxr-xr-x',
configuration: script_data
)
endforeach
install_data(
'vipsprofile',
'vips-8.13',
install_dir: get_option('prefix') / get_option('bindir'),
install_mode: 'rwxr-xr-x',
)

View File

@ -1,18 +0,0 @@
#!/bin/sh
# shrink to a target width
# default prefix
VIPSHOME=${VIPSHOME-@prefix@}
name=$0
bname=`basename $0`
if [ $# != 3 ]; then
echo "${bname}: usage: $bname <in> <out> <target width>"
exit 1
fi
inwidth=`$VIPSHOME/bin/vips im_header_int Xsize $1`
factor=`(echo scale=10; echo $inwidth / $3) | bc`
$VIPSHOME/bin/vips im_shrink $1 $2 $factor $factor

View File

@ -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 vipsthumbnail"
echo " $bname vips 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 various paths
prepend_var MANPATH $VIPSHOME/share/man
case `uname` in
HPUX)
libvar=SHLIB_PATH
;;
Darwin)
libvar=DYLD_LIBRARY_PATH
;;
*)
libvar=LD_LIBRARY_PATH
;;
esac
prepend_var $libvar $VIPSHOME/lib
prepend_var PATH $VIPSHOME/bin
prepend_var PKG_CONFIG_PATH $VIPSHOME/lib/pkgconfig
prepend_var GI_TYPELIB_PATH $VIPSHOME/lib/girepository-1.0
# run, passing in args we were passed
exec $*