aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorBenjamin Trigona-Harany <bosth@alumni.sfu.ca>2010-06-23 16:07:40 -0500
committerErik Hanson <erik@slackbuilds.org>2010-06-29 00:36:35 -0500
commita4e30f9f3e827cd1b0245e72fcba87cb8d9b1a60 (patch)
tree189b64a89edb75d59f7be8e913e1d36d196a8498 /graphics
parent5e48145d7d7d792a5033872202b8b40a809082d3 (diff)
graphics/exact-image: Added (image processing library)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/exact-image/README9
-rw-r--r--graphics/exact-image/exact-image.SlackBuild77
-rw-r--r--graphics/exact-image/exact-image.info10
-rw-r--r--graphics/exact-image/fixup-python_and_perl_paths.diff22
-rw-r--r--graphics/exact-image/png.cc-libpng14.diff62
-rw-r--r--graphics/exact-image/slack-desc19
6 files changed, 199 insertions, 0 deletions
diff --git a/graphics/exact-image/README b/graphics/exact-image/README
new file mode 100644
index 0000000000000..50317b273d1bd
--- /dev/null
+++ b/graphics/exact-image/README
@@ -0,0 +1,9 @@
+ExactImage is an image processing library which reimplements ImageMagick
+functions with a significant speed improvement. The library also provides
+several new algorithms: lossless JPEG transforms and creation of searchable
+PDFs from hOCR annotated HTML. There are bindings for PHP, Lua, Perl, and
+Python. See /usr/doc/exact-image-*/examples/ for information on using
+exactimage with Perl, Python, PHP and Lua.
+
+This requires agg. lua and evas are optional dependencies, as is bardecode,
+but bardecode is not available from SlackBuilds.org.
diff --git a/graphics/exact-image/exact-image.SlackBuild b/graphics/exact-image/exact-image.SlackBuild
new file mode 100644
index 0000000000000..d99176051ac19
--- /dev/null
+++ b/graphics/exact-image/exact-image.SlackBuild
@@ -0,0 +1,77 @@
+#!/bin/sh
+# Slackware build script for exact-image
+# Written by Benjamin Trigona-Harany <bosth@alumni.sfu.ca>
+
+PRGNAM=exact-image
+VERSION=${VERSION:-0.8.1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Patch to fix libpng linkage
+patch -p1 --verbose < $CWD/png.cc-libpng14.diff
+
+# Patch to fix python and perl paths
+eval $(perl -V:vendorlib)
+sed "s,@vendorlib@,$vendorlib,g" $CWD/fixup-python_and_perl_paths.diff | patch -p1
+
+./configure \
+ --bindir=/usr/bin \
+ --libdir=/usr/lib${LIBDIRSUFFIX}
+
+make CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS"
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE README TODO CODING examples $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/graphics/exact-image/exact-image.info b/graphics/exact-image/exact-image.info
new file mode 100644
index 0000000000000..738aa895a9763
--- /dev/null
+++ b/graphics/exact-image/exact-image.info
@@ -0,0 +1,10 @@
+PRGNAM="exact-image"
+VERSION="0.8.1"
+HOMEPAGE="http://www.exactcode.de/site/open_source/exactimage/"
+DOWNLOAD="http://dl.exactcode.de/oss/exact-image/exact-image-0.8.1.tar.bz2"
+MD5SUM="f6c5a068a21a90c314ba557f0a601352"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Benjamin Trigona-Harany"
+EMAIL="bosth@alumni.sfu.ca"
+APPROVED="rworkman"
diff --git a/graphics/exact-image/fixup-python_and_perl_paths.diff b/graphics/exact-image/fixup-python_and_perl_paths.diff
new file mode 100644
index 0000000000000..2620628c13a87
--- /dev/null
+++ b/graphics/exact-image/fixup-python_and_perl_paths.diff
@@ -0,0 +1,22 @@
+diff -Nur exact-image-0.8.1.orig//api/perl/Makefile exact-image-0.8.1/api/perl/Makefile
+--- exact-image-0.8.1.orig//api/perl/Makefile 2008-12-09 03:42:19.000000000 -0600
++++ exact-image-0.8.1/api/perl/Makefile 2010-06-23 08:57:13.015010261 -0500
+@@ -20,5 +20,6 @@
+ all:: $($(X_MODULE)_BINARY)
+ install:: $($(X_MODULE)_BINARY)
+ $(Q)echo "INSTALL PERL module $^"
+- $(Q)mkdir -p $(DESTDIR)$(libdir)/perl5/site_perl/
+- $(Q)install $^ $(dir $^)/ExactImage.pm $(DESTDIR)$(libdir)/perl5/site_perl/
++ eval `perl -V:vendorlib`
++ $(Q)mkdir -p $(DESTDIR)@vendorlib@
++ $(Q)install $^ $(dir $^)/ExactImage.pm $(DESTDIR)@vendorlib@
+diff -Nur exact-image-0.8.1.orig//api/python/Makefile exact-image-0.8.1/api/python/Makefile
+--- exact-image-0.8.1.orig//api/python/Makefile 2010-04-05 10:28:40.000000000 -0500
++++ exact-image-0.8.1/api/python/Makefile 2010-06-23 08:58:08.206169868 -0500
+@@ -20,5 +20,5 @@
+ all:: $($(X_MODULE)_BINARY)
+ install:: $($(X_MODULE)_BINARY)
+ $(Q)echo "INSTALL PYTHON module $^"
+- $(Q)mkdir -p $(DESTDIR)$(libdir)/python2.5/site-packages/
++ $(Q)mkdir -p $(DESTDIR)$(shell python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib()')
+ $(Q)install $(dir $^)/ExactImage.py $^ $(DESTDIR)$(shell python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib()')/
diff --git a/graphics/exact-image/png.cc-libpng14.diff b/graphics/exact-image/png.cc-libpng14.diff
new file mode 100644
index 0000000000000..d6f639ff4accb
--- /dev/null
+++ b/graphics/exact-image/png.cc-libpng14.diff
@@ -0,0 +1,62 @@
+diff -Naur exact-image-0.8.1-old/codecs/png.cc exact-image-0.8.1/codecs/png.cc
+--- exact-image-0.8.1-old/codecs/png.cc 2010-06-16 02:46:40.349543689 +0300
++++ exact-image-0.8.1/codecs/png.cc 2010-06-16 02:57:50.156542917 +0300
+@@ -71,7 +71,7 @@
+ /* Allocate/initialize the memory for image information. REQUIRED. */
+ info_ptr = png_create_info_struct(png_ptr);
+ if (info_ptr == NULL) {
+- png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, NULL, NULL);
+ return 0;
+ }
+
+@@ -82,7 +82,7 @@
+
+ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* Free all of the memory associated with the png_ptr and info_ptr */
+- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ /* If we get here, we had a problem reading the file */
+ return 0;
+ }
+@@ -99,7 +99,7 @@
+ png_read_info (png_ptr, info_ptr);
+
+ png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
+- &interlace_type, int_p_NULL, int_p_NULL);
++ &interlace_type, NULL, NULL);
+
+ image.w = width;
+ image.h = height;
+@@ -196,11 +196,11 @@
+ for (int pass = 0; pass < number_passes; ++pass)
+ for (unsigned int y = 0; y < height; ++y) {
+ row_pointers[0] = image.getRawData() + y * stride;
+- png_read_rows(png_ptr, row_pointers, png_bytepp_NULL, 1);
++ png_read_rows(png_ptr, row_pointers, NULL, 1);
+ }
+
+ /* clean up after the read, and free any memory allocated - REQUIRED */
+- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+
+ /* that's it */
+ return true;
+@@ -224,7 +224,7 @@
+ /* Allocate/initialize the memory for image information. REQUIRED. */
+ info_ptr = png_create_info_struct(png_ptr);
+ if (info_ptr == NULL) {
+- png_destroy_write_struct(&png_ptr, png_infopp_NULL);
++ png_destroy_write_struct(&png_ptr, NULL);
+ return false;
+ }
+
+@@ -244,8 +244,6 @@
+ else if (quality > Z_BEST_COMPRESSION) quality = Z_BEST_COMPRESSION;
+ png_set_compression_level(png_ptr, quality);
+
+- png_info_init (info_ptr);
+-
+ /* Set up our STL stream output control */
+ png_set_write_fn (png_ptr, stream, &stdstream_write_data, &stdstream_flush_data);
+
diff --git a/graphics/exact-image/slack-desc b/graphics/exact-image/slack-desc
new file mode 100644
index 0000000000000..2224712d7ddfe
--- /dev/null
+++ b/graphics/exact-image/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+exact-image: exact-image (fast generic image processing library)
+exact-image:
+exact-image: ExactImage is an image processing library which reimplements
+exact-image: ImageMagick functions with a significant speed improvement.
+exact-image: The library also provides several new algorithms, e.g. lossless
+exact-image: JPEG transforms and the creation of searchable PDFs from hOCR
+exact-image: annotated HTML. There are bindings for PHP, Lua, Python and Perl.
+exact-image:
+exact-image:
+exact-image:
+exact-image: